hedn-0.3.0.4: EDN parsing and encoding
Safe HaskellNone
LanguageHaskell2010

Data.EDN.QQ

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 #

liftTyped :: Value -> Q (TExp Value) #

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

Methods

lift :: Tagged Text a -> Q Exp #

liftTyped :: Tagged Text a -> Q (TExp (Tagged Text a)) #