Module
Classless.DecodeJson.Generic
- Package
- purescript-classless-decode-json
- Repository
- thought2/purescript-classless-decode-json
#DecodeRep Source
class DecodeRep :: Row Type -> Type -> Constraint
class DecodeRep sumSpec r | r -> sumSpec where
Members
decodeRepWith :: Record sumSpec -> Encoding -> Json -> Either JsonDecodeError r
Instances
DecodeRep () NoConstructors
(DecodeRep specA a, DecodeRep specB b, TypeEquals a (Constructor sym x), Cons sym s specB spec, Cons sym s () specA, Lacks sym specB, IsSymbol sym, Union specA specB spec, Union specB specA spec) => DecodeRep spec (Sum a b)
(IsSymbol name, Cons name NoArgs () spec) => DecodeRep spec (Constructor name NoArguments)
(IsSymbol name, Cons name (Json -> Either JsonDecodeError a) () spec) => DecodeRep spec (Constructor name (Argument a))
(IsSymbol name, DecodeRepArgs specA a, Cons name specA () spec) => DecodeRep spec (Constructor name a)
#DecodeRepArgs Source
class DecodeRepArgs spec r | r -> spec where
Members
decodeRepArgs :: spec -> Array Json -> Either JsonDecodeError { init :: r, rest :: Array Json }
Instances
DecodeRepArgs Unit NoArguments
(DecodeRepArgs specA a, DecodeRepArgs specB b) => DecodeRepArgs (ProductSpec specA specB) (Product a b)
DecodeRepArgs (Json -> Either JsonDecodeError a) (Argument a)