json-sop-0.1.0.3: Generics JSON (de)serialization using generics-sop

Safe HaskellNone
LanguageHaskell2010

Generics.SOP.JSON.Model

Contents

Synopsis

Documentation

gjsonModel :: forall a. (HasDatatypeInfo a, All2 JsonModel (Code a), SingI (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 s b :: k -> * -> *

A Tagged s b value is a value b 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 Tagged s b can't try to use the argument s 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"

Constructors

Tagged 

Fields

unTagged :: b
 

Instances

Monad (Tagged k s) 
Functor (Tagged k s) 
Applicative (Tagged k s) 
Foldable (Tagged k s) 
Traversable (Tagged k s) 
Typeable (k -> * -> *) (Tagged k) 
Bounded b => Bounded (Tagged k s b) 
Enum a => Enum (Tagged k s a) 
Eq b => Eq (Tagged k s b) 
Floating a => Floating (Tagged k s a) 
Fractional a => Fractional (Tagged k s a) 
Integral a => Integral (Tagged k s a) 
(Data s, Data b) => Data (Tagged * s b) 
Num a => Num (Tagged k s a) 
Ord b => Ord (Tagged k s b) 
Read b => Read (Tagged k s b) 
Real a => Real (Tagged k s a) 
RealFloat a => RealFloat (Tagged k s a) 
RealFrac a => RealFrac (Tagged k s a) 
Show b => Show (Tagged k s b) 
Ix b => Ix (Tagged k s b) 
Monoid a => Monoid (Tagged k s a) 

untag :: Tagged k s b -> b

Alias for unTagged