| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Alien.Interaction
Synopsis
- modulate :: IntList -> [Bool]
- demodulate :: [Bool] -> IntList
- makeClick :: Monad m => (IntList -> m IntList) -> (AlienState -> m ()) -> alienValue -> AlienState -> (Integer, Integer) -> m (AlienState, [Drawing])
- runInteraction :: Monad m => (IntList -> m IntList) -> ([Drawing] -> m (Integer, Integer)) -> (AlienState -> m ()) -> alienValue -> AlienState -> m ()
Documentation
demodulate :: [Bool] -> IntList Source #
Decode a squiggly into a structure
Arguments
| :: Monad m | |
| => (IntList -> m IntList) | Callback to contact the alien ship | 
| -> (AlienState -> m ()) | Executed on every change of state | 
| -> alienValue | |
| -> AlienState | |
| -> (Integer, Integer) | Click coordinates | 
| -> m (AlienState, [Drawing]) | 
Loop the interaction until it demands a "click".
Arguments
| :: Monad m | |
| => (IntList -> m IntList) | Callback to contact the alien ship | 
| -> ([Drawing] -> m (Integer, Integer)) | Callback for displaying a list of  | 
| -> (AlienState -> m ()) | Executed on every change of state | 
| -> alienValue | |
| -> AlienState | Initial state | 
| -> m () | 
Loop the interaction.