Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
A value constructed using qq
that attempts to match
a JSON document.
Hole (Maybe HoleSig) (Maybe Text) | Optionally typed, optionally named _hole. If a type is provided, the _hole only matches those values that have that type. If a name is provided, the matched value is returned to the user. |
Null | |
Bool Bool | |
Number Scientific | |
String Text | |
StringCI (CI Text) | Case-insensitive strings |
Array (Array ext) | |
ArrayUO (Array ext) | Unordered arrays |
Object (Object ext) | |
Ext ext | External values spliced into a |
A wrapper for those matchers that support the ...
syntax.
_hole type signature
_hole type
BoolT | _ : bool |
NumberT | _ : number |
StringT | _ : string |
StringCIT | _ : ci-string |
ArrayT | _ : array |
ArrayUOT | _ : unordered-array |
ObjectT | _ : object |
quote :: Matcher Exp -> Q Exp Source #
It may be tempting to make this the Lift
instance for Matcher
, but I don't
think it would be correct. We can get a lot from re-using Lift
machinery: namely,
we can cpmpletely bypass manual Exp
construction. But, fundamentally, Lift
is
for "serializing" Haskell values and it is not what we are attempting here.