λ> showToFay (NewType 1)
Just (Object (fromList [("instance",String "NewType"),("slot1",Number 1.0)]))
The result should be Just (Number 1.0).
Currently we're using Data.Data for this and afaict it can't check for newtypes. GHC Generics can but only in >= 7.8. In the short term #412 provides a solution by removing the newtype optimizations so you'll be able to use that if you need to pass newtypes through the server side.
Another user workaround is to use a normal data type for types that are shared with the server side.
I think we need to wait a bit before dropping GHC 7.6 support, let me know if this is a hindrance for anyone.
The result should be
Just (Number 1.0)
.Currently we're using
Data.Data
for this and afaict it can't check for newtypes. GHC Generics can but only in>= 7.8
. In the short term #412 provides a solution by removing the newtype optimizations so you'll be able to use that if you need to pass newtypes through the server side.Another user workaround is to use a normal data type for types that are shared with the server side.
I think we need to wait a bit before dropping GHC 7.6 support, let me know if this is a hindrance for anyone.