JsonGrammar-0.1: Combinators for bidirectional JSON parsing

Data.Iso.Common

Contents

Description

Constructor-destructor isomorphisms for some common datatypes.

Synopsis

()

unit :: Iso t (() :- t)Source

Maybe a

just :: Iso (a :- t) (Maybe a :- t)Source

maybe :: Iso t (a :- t) -> Iso t (Maybe a :- t)Source

[a]

nil :: Iso t ([a] :- t)Source

cons :: Iso (a :- ([a] :- t)) ([a] :- t)Source

Either a b

left :: Iso (a :- t) (Either a b :- t)Source

right :: Iso (b :- t) (Either a b :- t)Source

either :: Iso t1 (a :- t2) -> Iso t1 (b :- t2) -> Iso t1 (Either a b :- t2)Source

Bool