oi-0.0.4: Purely Functional Lazy Interaction with the outer world

Safe HaskellSafe-Infered

Data.OI

Contents

Synopsis

Data type

type :-> a b = OI a -> bSource

Converter an IO to an interaction function

iooi :: IO a -> a :-> aSource

Convert an IO to an interaction function

Drive an interaction function

run :: (a :-> b) -> IO bSource

Drive an interaction function

Primitive operators on the interaction data

(=:) :: a -> a :-> aSource

Binding operator

(?) :: a :-> aSource

Dereference operator

(#) :: a -> OI aSource

Reference operator

Category class methods on (:->)

idA :: a :-> aSource

(<.>) :: (b :-> c) -> (a :-> b) -> a :-> cSource

Arrow class methods on (:->)

arrA :: (a -> b) -> a :-> bSource

firstA :: (a :-> b) -> (a, c) :-> (b, c)Source

Embeding interaction data in data structure

deTuple :: (a, b) :-> (OI a, OI b)Source

Embed interactions into tuple

deTriple :: (a, b, c) :-> (OI a, OI b, OI c)Source

Embed interactions into triple

deList :: [a] :-> Maybe (OI a, OI [a])Source

Embed interactions into list

Interaction combinators

(<|) :: (b -> c :-> d) -> (a :-> b) -> (a, c) :-> dSource

Connect two interactions into an interaction

mapOI :: (a :-> b) -> [a] :-> [b]Source

Map interaction function on an interaction list

mapOI' :: (a :-> b) -> [a] :-> (OI [a], [b])Source

Map interaction function on an interaction list (return results and remainings)

zipWithOI :: (a -> b :-> c) -> [a] -> [b] :-> [c]Source

Zip a list and an interaction list

zipWithOI' :: (a -> b :-> c) -> [a] -> [b] :-> (OI [b], [c])Source

Zip a list and an interaction list (return results and remainings)

sequenceOI :: [a :-> b] -> [a] :-> ()Source

Sequencing interaction functions

sequenceOI' :: [a :-> b] -> [a] :-> OI [a]Source

Sequencing interaction functions (return remainings)

mergeOI :: [a] -> [a] -> [a] :-> [a]Source

Merging two lists by using oracles