prototype: prototype-based programming on Haskell
prototype-based programming on Haskell
You can download source codes by git.
git clone git://github.com/YoshikuniJujo/prototype.git prototype
Example code
module Main where import Control.Prototype main :: IO () main = flip evalProt initProtEnv $ do ( dog, setName, sit ) <- package "dog" $ do dog <- clone object name <- makeMember "name" setName <- makeMember "setName" sit <- makeMember "sit" setMethod dog setName $ \this [ n ] -> do setMember this name n return [ ] setMethod dog sit $ \this _ -> do n <- member this name liftProt $ putStrLn $ fromPrimStr n ++ " sitting." return [ ] return ( dog, setName, sit ) myDog <- clone dog method myDog setName [ primStr "John" ] method myDog sit [ ] return ()
Another sample
module Main where import MyToolkit main :: IO () main = runToolKit $ do ( textView, setText, setContentView ) <- importMyToolkit myTV <- clone textView method myTV setText [ primStr "Hello, world!" ] method myTV setContentView [ ] return ()
Downloads
- prototype-0.5.3.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 0.1, 0.2, 0.3, 0.4.1, 0.5.0, 0.5.3 |
---|---|
Dependencies | base (>3 && <5), monads-tf [details] |
License | BSD-3-Clause |
Author | Yoshikuni Jujo <PAF01143@nifty.ne.jp> |
Maintainer | Yoshikuni Jujo <PAF01143@nifty.ne.jp> |
Category | Development |
Uploaded | by YoshikuniJujo at 2011-08-15T05:51:38Z |
Distributions | |
Reverse Dependencies | 1 direct, 0 indirect [details] |
Downloads | 4392 total (0 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs uploaded by user Build status unknown [no reports yet] |