Copyright | (C) 2016, The University of Kansas |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Andy Gill |
Stability | Alpha |
Portability | GHC |
Safe Haskell | Safe |
Language | Haskell2010 |
- data ApplicativePacket c p a where
- Command :: ApplicativePacket c p b -> c -> ApplicativePacket c p b
- Procedure :: ApplicativePacket c p (a -> b) -> p a -> ApplicativePacket c p b
- Pure :: a -> ApplicativePacket c p a
- superCommand :: ApplicativePacket c p a -> Maybe a
The remote applicative
data ApplicativePacket c p a where Source
A Remote Applicative, that can encode both commands and procedures, bundled together.
Command :: ApplicativePacket c p b -> c -> ApplicativePacket c p b | |
Procedure :: ApplicativePacket c p (a -> b) -> p a -> ApplicativePacket c p b | |
Pure :: a -> ApplicativePacket c p a |
Utility
superCommand :: ApplicativePacket c p a -> Maybe a Source
This simulates a ApplicativePacket
, to see if it only contains commands, and if so,
returns the static result. The commands still need executed. The term super-command
is a play on Hughes' super-combinator terminology.