-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Purely Functional Lazy Interaction with the outer world -- -- This package implements a data structure and operations on it for -- making interactive program without using explicitly IO monads. @package oi @version 0.0.3 module Data.OI data OI a type :-> a b = OI a -> b -- | Convert an IO to an interaction function iooi :: IO a -> (a :-> a) -- | Drive an interaction function run :: (a :-> b) -> IO b -- | Binding operator (=:) :: a -> a :-> a -- | Dereference operator (?) :: a :-> a -- | Reference operator (#) :: a -> OI a idA :: a :-> a (<.>) :: (b :-> c) -> (a :-> b) -> (a :-> c) arrA :: (a -> b) -> (a :-> b) firstA :: (a :-> b) -> (a, c) :-> (b, c) -- | Embed interactions into tuple deTuple :: (a, b) :-> (OI a, OI b) -- | Embed interactions into list deList :: [a] :-> Maybe (OI a, OI [a]) -- | Connect two interactions into an interaction (<|) :: (b -> c :-> d) -> (a :-> b) -> (a, c) :-> d -- | Map interaction function on an interaction list mapOI :: (a :-> b) -> [a] :-> [b] -- | Map interaction function on an interaction list (return results and -- remainings) mapOI' :: (a :-> b) -> [a] :-> (OI [a], [b]) -- | Zip a list and an interaction list zipWithOI :: (a -> b :-> c) -> [a] -> [b] :-> [c] -- | Zip a list and an interaction list (return results and remainings) zipWithOI' :: (a -> b :-> c) -> [a] -> [b] :-> (OI [b], [c]) -- | Sequencing interaction functions sequenceOI :: [a :-> b] -> [a] :-> () -- | Sequencing interaction functions (return remainings) sequenceOI' :: [a :-> b] -> [a] :-> OI [a] instance Comonad OI instance Extend OI instance Applicative OI instance Monad OI instance Functor OI