mirror of
https://github.com/byteverse/colonnade.git
synced 2026-09-05 19:53:48 +02:00
document types better
This commit is contained in:
parent
3240edd8ec
commit
8f70dbe1d1
@ -31,7 +31,7 @@ newtype Indexed a = Indexed { getIndexed :: Int }
|
|||||||
deriving (Eq,Ord,Functor,Show,Read)
|
deriving (Eq,Ord,Functor,Show,Read)
|
||||||
|
|
||||||
data HeadingError content = HeadingError
|
data HeadingError content = HeadingError
|
||||||
{ headingErrorMissing :: Vector content -- ^ headers that were missing
|
{ headingErrorMissing :: Vector content -- ^ headers that were missing
|
||||||
, headingErrorDuplicate :: Vector (content,Int) -- ^ headers that occurred more than once
|
, headingErrorDuplicate :: Vector (content,Int) -- ^ headers that occurred more than once
|
||||||
} deriving (Show,Read)
|
} deriving (Show,Read)
|
||||||
|
|
||||||
@ -49,11 +49,11 @@ instance Contravariant Headless where
|
|||||||
-- Check out @Control.Applicative.Free@ in the @free@ library to
|
-- Check out @Control.Applicative.Free@ in the @free@ library to
|
||||||
-- learn more about this.
|
-- learn more about this.
|
||||||
data Decoding f content a where
|
data Decoding f content a where
|
||||||
DecodingPure :: !a
|
DecodingPure :: !a -- ^ function
|
||||||
-> Decoding f content a
|
-> Decoding f content a
|
||||||
DecodingAp :: !(f content)
|
DecodingAp :: !(f content) -- ^ header
|
||||||
-> !(content -> Either String a)
|
-> !(content -> Either String a) -- ^ decoding function
|
||||||
-> !(Decoding f content (a -> b))
|
-> !(Decoding f content (a -> b)) -- ^ next decoding
|
||||||
-> Decoding f content b
|
-> Decoding f content b
|
||||||
|
|
||||||
instance Functor (Decoding f content) where
|
instance Functor (Decoding f content) where
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user