Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fay.Convert doesn't check for newtypes #413

Open
bergmark opened this issue Sep 11, 2014 · 0 comments
Open

Fay.Convert doesn't check for newtypes #413

bergmark opened this issue Sep 11, 2014 · 0 comments
Labels

Comments

@bergmark
Copy link
Member

λ> 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.

@bergmark bergmark added the bug label Sep 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant