Module
Classless.EncodeJson.Generic
- Package
- purescript-classless-encode-json
- Repository
- thought2/purescript-classless-encode-json
#EncodeRep Source
class EncodeRep :: Row Type -> Type -> Constraint
class EncodeRep sumSpec r | r -> sumSpec where
Members
encodeRepWith :: Record sumSpec -> Encoding -> r -> Json
Instances
EncodeRep () NoConstructors
(TypeEquals a (Constructor name xx), Cons name x sumSpec' sumSpec, Cons name x () sumSpec'', EncodeRep sumSpec'' a, EncodeRep sumSpec' b, IsSymbol name, Lacks name sumSpec') => EncodeRep sumSpec (Sum a b)
(IsSymbol name, Cons name NoArgs () sumSpec) => EncodeRep sumSpec (Constructor name NoArguments)
(IsSymbol name, EncodeRepArgs prodSpec a, Cons name prodSpec () sumSpec) => EncodeRep sumSpec (Constructor name a)
#EncodeRepArgs Source
class EncodeRepArgs prodSpec r | r -> prodSpec where
Members
encodeRepArgs :: prodSpec -> r -> Array Json
Instances
EncodeRepArgs NoArgs NoArguments
(EncodeRepArgs sa a, EncodeRepArgs sb b) => EncodeRepArgs (ProductSpec sa sb) (Product a b)
EncodeRepArgs (a -> Json) (Argument a)