-
Notifications
You must be signed in to change notification settings - Fork 7
Help with help #19
Copy link
Copy link
Open
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels