You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Hi,
There is no doc or test with generics.
gEncodeAeson returns
Object a
. I could geta
viaForeign.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.The text was updated successfully, but these errors were encountered: