Copyright | (c) Nobuo Yamashita 2011-2016 |
---|---|
License | BSD3 |
Safe Haskell | None |
Language | Haskell2010 |
Author : Nobuo Yamashita Maintainer : nobsun@sampou.org Stability : experimental
- data OI a
- type (:->) a b = OI a -> b
- (??) :: OI a -> a
- (##) :: a -> OI a
- (=:) :: a -> OI a -> a
- dePair :: OI (a, b) -> (OI a, OI b)
- deList :: OI [a] -> Maybe (OI a, OI [a])
- deTriple :: OI (a, b, c) -> (OI a, OI b, OI c)
- deTuple4 :: OI (a, b, c, d) -> (OI a, OI b, OI c, OI d)
- deTuple5 :: OI (a, b, c, d, e) -> (OI a, OI b, OI c, OI d, OI e)
- deTuple6 :: OI (a, b, c, d, e, f) -> (OI a, OI b, OI c, OI d, OI e, OI f)
- deTuple7 :: OI (a, b, c, d, e, f, g) -> (OI a, OI b, OI c, OI d, OI e, OI f, OI g)
- deLeft :: OI (Either a b) -> Either (OI a) (OI b)
- deRight :: OI (Either a b) -> Either (OI a) (OI b)
- runInteraction :: (OI a -> b) -> IO b
- data IOResult a
- iooi :: IO a -> OI a -> a
- iooi' :: IO a -> OI (IOResult a) -> IOResult a
Types
Datatype for intermediating interaction:
OI
has two states (programmer cannot distinguish), non-expressed and exressed.
`Non-expressed' indicates that no computation is assigned.
In other words, it's value is never denotated by any expression.
So, if you refer the value then the process will be suspended
until other process determins the value.
Non-expressed value can be determined to become expressed
for a value by a expression at most once.
Expressed
indicates that some computation is assigned for the value.
Once expressed, the value never be back to non-expressed nor be changed.
type (:->) a b = OI a -> b infixr 0 Source
Interaction (a function from a intermediating type to another type) type
Primitive operators on OI
Assign operator
Splitters against OI
datatype
deTuple6 :: OI (a, b, c, d, e, f) -> (OI a, OI b, OI c, OI d, OI e, OI f) Source
Decomposer for 6-tuple
deTuple7 :: OI (a, b, c, d, e, f, g) -> (OI a, OI b, OI c, OI d, OI e, OI f, OI g) Source
Decomposer for 7-tuple
Interaction driver
runInteraction :: (OI a -> b) -> IO b Source
Drive interaction
IO converters
IOResult
for error handling