Hi,
There is no doc or test with generics.
data SumOfConst
= SumOfConstA
| SumOfConstB
derive instance eqActivationFun :: Eq SumOfConst
derive instance genericActivationFun :: Generic SumOfConst _
instance showActivationFun :: Show SumOfConst where
show u = genericShow u
instance EncodeAeson SumOfConst where
encodeAeson x = gEncodeAeson x (Proxy :: Proxy _)
gEncodeAeson returns Object a. I could get a via Foreign.Object.values but it returns an array which could be empty. So to avoid partial function some empty Aeson should be returned if array is empty. It doesn't look like correct way of using the library.
Hi,
There is no doc or test with generics.
gEncodeAeson returns
Object a. I could getaviaForeign.Object.valuesbut it returns an array which could be empty. So to avoid partial function some empty Aeson should be returned if array is empty. It doesn't look like correct way of using the library.