Safe Haskell | None |
---|---|
Language | Haskell2010 |
Generics.SOP.JSON.Model
Contents
Documentation
gjsonModel :: forall a. (HasDatatypeInfo a, All2 JsonModel (Code a)) => JsonOptions -> Tagged a Value Source #
Generic computation of the JSON model
Do NOT use for recursive types, you will get an infinite model.
Re-exports
newtype Tagged k s b :: forall k. k -> * -> * #
A
value is a value Tagged
s bb
with an attached phantom type s
.
This can be used in place of the more traditional but less safe idiom of
passing in an undefined value with the type, because unlike an (s -> b)
,
a
can't try to use the argument Tagged
s bs
as a real value.
Moreover, you don't have to rely on the compiler to inline away the extra argument, because the newtype is "free"
Tagged
has kind k -> * -> *
if the compiler supports PolyKinds
, therefore
there is an extra k
showing in the instance haddocks that may cause confusion.
Instances