hedn-0.2.0.0: EDN parsing and encoding

Safe HaskellNone
LanguageHaskell2010

Data.EDN

Synopsis

Documentation

data Tagged tag a Source #

Constructors

Tagged !tag !tag !a 
NoTag !a 
Instances
FromEDN TaggedValue Source # 
Instance details

Defined in Data.EDN.Class

ToEDN TaggedValue Source # 
Instance details

Defined in Data.EDN.Class

Functor (Tagged tag) Source # 
Instance details

Defined in Data.EDN.AST.Types.Tagged

Methods

fmap :: (a -> b) -> Tagged tag a -> Tagged tag b #

(<$) :: a -> Tagged tag b -> Tagged tag a #

(Eq tag, Eq a) => Eq (Tagged tag a) Source # 
Instance details

Defined in Data.EDN.AST.Types.Tagged

Methods

(==) :: Tagged tag a -> Tagged tag a -> Bool #

(/=) :: Tagged tag a -> Tagged tag a -> Bool #

(Data tag, Data a) => Data (Tagged tag a) Source # 
Instance details

Defined in Data.EDN.AST.Types.Tagged

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Tagged tag a -> c (Tagged tag a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Tagged tag a) #

toConstr :: Tagged tag a -> Constr #

dataTypeOf :: Tagged tag a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Tagged tag a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Tagged tag a)) #

gmapT :: (forall b. Data b => b -> b) -> Tagged tag a -> Tagged tag a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Tagged tag a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Tagged tag a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Tagged tag a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Tagged tag a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Tagged tag a -> m (Tagged tag a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Tagged tag a -> m (Tagged tag a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Tagged tag a -> m (Tagged tag a) #

(Ord tag, Ord a) => Ord (Tagged tag a) Source # 
Instance details

Defined in Data.EDN.AST.Types.Tagged

Methods

compare :: Tagged tag a -> Tagged tag a -> Ordering #

(<) :: Tagged tag a -> Tagged tag a -> Bool #

(<=) :: Tagged tag a -> Tagged tag a -> Bool #

(>) :: Tagged tag a -> Tagged tag a -> Bool #

(>=) :: Tagged tag a -> Tagged tag a -> Bool #

max :: Tagged tag a -> Tagged tag a -> Tagged tag a #

min :: Tagged tag a -> Tagged tag a -> Tagged tag a #

(Show tag, Show a) => Show (Tagged tag a) Source # 
Instance details

Defined in Data.EDN.AST.Types.Tagged

Methods

showsPrec :: Int -> Tagged tag a -> ShowS #

show :: Tagged tag a -> String #

showList :: [Tagged tag a] -> ShowS #

Data a => Lift (Tagged Text a) Source # 
Instance details

Defined in Data.EDN.QQ

Methods

lift :: Tagged Text a -> Q Exp #

stripTag :: Tagged tag a -> a Source #

data Value Source #

Instances
Eq Value Source # 
Instance details

Defined in Data.EDN.AST.Types.Value

Methods

(==) :: Value -> Value -> Bool #

(/=) :: Value -> Value -> Bool #

Data Value Source # 
Instance details

Defined in Data.EDN.AST.Types.Value

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Value -> c Value #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Value #

toConstr :: Value -> Constr #

dataTypeOf :: Value -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Value) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Value) #

gmapT :: (forall b. Data b => b -> b) -> Value -> Value #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Value -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Value -> r #

gmapQ :: (forall d. Data d => d -> u) -> Value -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Value -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Value -> m Value #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Value -> m Value #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Value -> m Value #

Ord Value Source # 
Instance details

Defined in Data.EDN.AST.Types.Value

Methods

compare :: Value -> Value -> Ordering #

(<) :: Value -> Value -> Bool #

(<=) :: Value -> Value -> Bool #

(>) :: Value -> Value -> Bool #

(>=) :: Value -> Value -> Bool #

max :: Value -> Value -> Value #

min :: Value -> Value -> Value #

Show Value Source # 
Instance details

Defined in Data.EDN.AST.Types.Value

Methods

showsPrec :: Int -> Value -> ShowS #

show :: Value -> String #

showList :: [Value] -> ShowS #

Lift Value Source # 
Instance details

Defined in Data.EDN.QQ

Methods

lift :: Value -> Q Exp #

FromEDN Value Source # 
Instance details

Defined in Data.EDN.Class

FromEDN TaggedValue Source # 
Instance details

Defined in Data.EDN.Class

ToEDN Value Source # 
Instance details

Defined in Data.EDN.Class

ToEDN TaggedValue Source # 
Instance details

Defined in Data.EDN.Class

class ToEDN a where Source #

A type that can be converted to EDN AST.

Minimal complete definition

toEDN | toEDNv

Methods

toEDN :: a -> TaggedValue Source #

toEDNv :: a -> Value Source #

Instances
ToEDN Bool Source # 
Instance details

Defined in Data.EDN.Class

ToEDN Char Source # 
Instance details

Defined in Data.EDN.Class

ToEDN Double Source # 
Instance details

Defined in Data.EDN.Class

ToEDN Int Source # 
Instance details

Defined in Data.EDN.Class

ToEDN () Source # 
Instance details

Defined in Data.EDN.Class

Methods

toEDN :: () -> TaggedValue Source #

toEDNv :: () -> Value Source #

ToEDN Void Source # 
Instance details

Defined in Data.EDN.Class

ToEDN Text Source # 
Instance details

Defined in Data.EDN.Class

ToEDN Text Source # 
Instance details

Defined in Data.EDN.Class

ToEDN UTCTime Source # 
Instance details

Defined in Data.EDN.Class

ToEDN UUID Source # 
Instance details

Defined in Data.EDN.Class

ToEDN Value Source # 
Instance details

Defined in Data.EDN.Class

ToEDN TaggedValue Source # 
Instance details

Defined in Data.EDN.Class

ToEDN a => ToEDN [a] Source # 
Instance details

Defined in Data.EDN.Class

Methods

toEDN :: [a] -> TaggedValue Source #

toEDNv :: [a] -> Value Source #

ToEDN a => ToEDN (Maybe a) Source # 
Instance details

Defined in Data.EDN.Class

ToEDN a => ToEDN (Set a) Source # 
Instance details

Defined in Data.EDN.Class

ToEDN a => ToEDN (Vector a) Source # 
Instance details

Defined in Data.EDN.Class

(ToEDN a, ToEDN b) => ToEDN (a, b) Source # 
Instance details

Defined in Data.EDN.Class

Methods

toEDN :: (a, b) -> TaggedValue Source #

toEDNv :: (a, b) -> Value Source #

(ToEDN k, ToEDN v) => ToEDN (Map k v) Source # 
Instance details

Defined in Data.EDN.Class

Methods

toEDN :: Map k v -> TaggedValue Source #

toEDNv :: Map k v -> Value Source #

(ToEDN a, ToEDN b, ToEDN c) => ToEDN (a, b, c) Source # 
Instance details

Defined in Data.EDN.Class

Methods

toEDN :: (a, b, c) -> TaggedValue Source #

toEDNv :: (a, b, c) -> Value Source #

(ToEDN a, ToEDN b, ToEDN c, ToEDN d) => ToEDN (a, b, c, d) Source # 
Instance details

Defined in Data.EDN.Class

Methods

toEDN :: (a, b, c, d) -> TaggedValue Source #

toEDNv :: (a, b, c, d) -> Value Source #

decodeText :: (FromEDN a, Monad m) => String -> Text -> m a Source #

class FromEDN a where Source #

A type that can be converted from EDN, with a possibility of failure.

When writing an instance, use empty, mzero, or fail to make a conversion fail, e.g. if an Map is missing a required key, or the value is of the wrong type.

Minimal complete definition

parseEDN | parseEDNv

Instances
FromEDN Bool Source # 
Instance details

Defined in Data.EDN.Class

FromEDN Char Source # 
Instance details

Defined in Data.EDN.Class

FromEDN Double Source # 
Instance details

Defined in Data.EDN.Class

FromEDN Int Source # 
Instance details

Defined in Data.EDN.Class

FromEDN () Source # 
Instance details

Defined in Data.EDN.Class

FromEDN Void Source # 
Instance details

Defined in Data.EDN.Class

FromEDN Text Source # 
Instance details

Defined in Data.EDN.Class

FromEDN Text Source # 
Instance details

Defined in Data.EDN.Class

FromEDN UTCTime Source # 
Instance details

Defined in Data.EDN.Class

FromEDN UUID Source # 
Instance details

Defined in Data.EDN.Class

FromEDN Value Source # 
Instance details

Defined in Data.EDN.Class

FromEDN TaggedValue Source # 
Instance details

Defined in Data.EDN.Class

FromEDN a => FromEDN [a] Source # 
Instance details

Defined in Data.EDN.Class

FromEDN a => FromEDN (Maybe a) Source # 
Instance details

Defined in Data.EDN.Class

(FromEDN a, Ord a) => FromEDN (Set a) Source # 
Instance details

Defined in Data.EDN.Class

FromEDN a => FromEDN (Vector a) Source # 
Instance details

Defined in Data.EDN.Class

(FromEDN a, FromEDN b) => FromEDN (a, b) Source # 
Instance details

Defined in Data.EDN.Class

Methods

parseEDN :: TaggedValue -> Parser (a, b) Source #

parseEDNv :: Value -> Parser (a, b) Source #

(FromEDN k, FromEDN v, Ord k) => FromEDN (Map k v) Source # 
Instance details

Defined in Data.EDN.Class

(FromEDN a, FromEDN b, FromEDN c) => FromEDN (a, b, c) Source # 
Instance details

Defined in Data.EDN.Class

Methods

parseEDN :: TaggedValue -> Parser (a, b, c) Source #

parseEDNv :: Value -> Parser (a, b, c) Source #

(FromEDN a, FromEDN b, FromEDN c, FromEDN d) => FromEDN (a, b, c, d) Source # 
Instance details

Defined in Data.EDN.Class

Methods

parseEDN :: TaggedValue -> Parser (a, b, c, d) Source #

parseEDNv :: Value -> Parser (a, b, c, d) Source #

fromEDN :: (FromEDN a, Monad m) => TaggedValue -> m a Source #

withSymbol :: (Text -> Text -> Parser a) -> Value -> Parser a Source #

withIntegral :: Integral i => (i -> Parser a) -> Value -> Parser a Source #