exinst-aeson-0.2: Derive instances for the `aeson` library for your existential types.

Safe HaskellNone
LanguageHaskell2010

Exinst.Instances.Aeson

Contents

Description

This module exports FromJSON and ToJSON instances for Some1, Some2, Some3 and Some4 from Exinst.Singletons, provided situable Dict1, Dict2, Dict3 and Dict4 instances are available.

See the README file in the exinst package for more general documentation: https://hackage.haskell.org/package/exinst#readme

Orphan instances

(SingKind k1, ToJSON (DemoteRep k1), Dict1 k1 * ToJSON f1) => ToJSON (Some1 k1 f1) Source # 

Methods

toJSON :: Some1 k1 f1 -> Value #

toEncoding :: Some1 k1 f1 -> Encoding #

toJSONList :: [Some1 k1 f1] -> Value #

toEncodingList :: [Some1 k1 f1] -> Encoding #

(SingKind k1, FromJSON (DemoteRep k1), Dict1 k1 * FromJSON f1) => FromJSON (Some1 k1 f1) Source # 

Methods

parseJSON :: Value -> Parser (Some1 k1 f1) #

parseJSONList :: Value -> Parser [Some1 k1 f1] #

(SingKind k2, SingKind k1, ToJSON (DemoteRep k2), ToJSON (DemoteRep k1), Dict2 k1 k2 * ToJSON f2) => ToJSON (Some2 k1 k2 f2) Source # 

Methods

toJSON :: Some2 k1 k2 f2 -> Value #

toEncoding :: Some2 k1 k2 f2 -> Encoding #

toJSONList :: [Some2 k1 k2 f2] -> Value #

toEncodingList :: [Some2 k1 k2 f2] -> Encoding #

(SingKind k2, SingKind k1, FromJSON (DemoteRep k2), FromJSON (DemoteRep k1), Dict2 k1 k2 * FromJSON f2) => FromJSON (Some2 k1 k2 f2) Source # 

Methods

parseJSON :: Value -> Parser (Some2 k1 k2 f2) #

parseJSONList :: Value -> Parser [Some2 k1 k2 f2] #

(SingKind k3, SingKind k2, SingKind k1, ToJSON (DemoteRep k3), ToJSON (DemoteRep k2), ToJSON (DemoteRep k1), Dict3 k1 k2 k3 * ToJSON f3) => ToJSON (Some3 k1 k2 k3 f3) Source # 

Methods

toJSON :: Some3 k1 k2 k3 f3 -> Value #

toEncoding :: Some3 k1 k2 k3 f3 -> Encoding #

toJSONList :: [Some3 k1 k2 k3 f3] -> Value #

toEncodingList :: [Some3 k1 k2 k3 f3] -> Encoding #

(SingKind k3, SingKind k2, SingKind k1, FromJSON (DemoteRep k3), FromJSON (DemoteRep k2), FromJSON (DemoteRep k1), Dict3 k1 k2 k3 * FromJSON f3) => FromJSON (Some3 k1 k2 k3 f3) Source # 

Methods

parseJSON :: Value -> Parser (Some3 k1 k2 k3 f3) #

parseJSONList :: Value -> Parser [Some3 k1 k2 k3 f3] #

(SingKind k4, SingKind k3, SingKind k2, SingKind k1, ToJSON (DemoteRep k4), ToJSON (DemoteRep k3), ToJSON (DemoteRep k2), ToJSON (DemoteRep k1), Dict4 k1 k2 k3 k4 * ToJSON f4) => ToJSON (Some4 k1 k2 k3 k4 f4) Source # 

Methods

toJSON :: Some4 k1 k2 k3 k4 f4 -> Value #

toEncoding :: Some4 k1 k2 k3 k4 f4 -> Encoding #

toJSONList :: [Some4 k1 k2 k3 k4 f4] -> Value #

toEncodingList :: [Some4 k1 k2 k3 k4 f4] -> Encoding #

(SingKind k4, SingKind k3, SingKind k2, SingKind k1, FromJSON (DemoteRep k4), FromJSON (DemoteRep k3), FromJSON (DemoteRep k2), FromJSON (DemoteRep k1), Dict4 k1 k2 k3 k4 * FromJSON f4) => FromJSON (Some4 k1 k2 k3 k4 f4) Source # 

Methods

parseJSON :: Value -> Parser (Some4 k1 k2 k3 k4 f4) #

parseJSONList :: Value -> Parser [Some4 k1 k2 k3 k4 f4] #