You are here: Home PIK Members Daniel Lincke Software specifications Origami-spec

Origami-spec

The type-declarations for the Origami-library.

Haskell source code icon Origami.hs — Haskell source code, 1 KB

File contents

-- data Fix s a = In (s a (Fix s a))
out :: Fix s a -> s a (Fix s a)

class Bifunctor s where
    bimap :: ((a->c), (b->d), s a b) -> s c d

map    :: Bifunctor s => (a -> b) ->  (Fix s a ->  Fix s b)
fold   :: Bifunctor s => (s a b -> b) -> Fix s a -> b
unfold :: Bifunctor s => (b -> s a b) -> b -> Fix s a
hylo   :: Bifunctor s => (b -> s a b) -> (s a c -> c) -> b -> c

Document Actions