hedn-0.2.0.1: EDN parsing and encoding

Safe HaskellNone
LanguageHaskell2010

Data.EDN.QQ

Contents

Synopsis

Documentation

edn :: QuasiQuoter Source #

Quasiquoter for TaggedValue.

Tagged "foo" "bar" Nil === [edn| #foo/bar nil |]

ednList :: QuasiQuoter Source #

Quasiquoter for untagged Value wrapped in a List.

[ednList| #foo/bar nil |]
===
List [ Tagged "foo" "bar" Nil ]

ednMap :: QuasiQuoter Source #

Quasiquoter for untagged Value wrapped in a Map.

[ednMap| :key value |]
===
Map [ (NoTag (Keyword "key"), NoTag (Symbol "" "value")) ]

ednVec :: QuasiQuoter Source #

Quasiquoter for untagged Value wrapped in a Vec.

[ednVec| #foo/bar nil |]
===
Vec [ Tagged "foo" "bar" Nil ]

ednSet :: QuasiQuoter Source #

Quasiquoter for untagged Value wrapped in a Set.

[ednList| #foo/bar nil |]
===
List [ Tagged "foo" "bar" Nil ]

fromEDN :: forall a. (Lift a, FromEDN a) => QuasiQuoter Source #

Specializable QuasiQuoter for compile-time decoding.

ednPerson = fromEDN @Person

And in another module (a TH restriction):

theFred = [ednPerson| #myapp/Person { :first "Fred" } |]

Orphan instances

Lift Value Source # 
Instance details

Methods

lift :: Value -> Q Exp #

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

Methods

lift :: Tagged Text a -> Q Exp #