-
Notifications
You must be signed in to change notification settings - Fork 6
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
Compile Error Message On GHC < 8.2 and Warning on GHC 8.2 #11
Comments
Yeah, that is weird. What helps (with myfunc :: HasEot a => Proxy a -> String
myfunc p = f
where
f :: String
f = head (namesOfFields p) or use your code and enable @Woody88: Now that the code examples in the tutorial have |
This is a hard question. Is it something that most people that decide to tackle generic programming should understand? I have just been using Haskell for almost a year now, so I cant really answer this question. On the other hand, if its an extension problem issue.. I don't think that everyone have knowledge of all the possible extension that GHC contains.. maybe mentioning this new found issue and solution for versions of GHC earlier than 8.2 might be a good idea since the error message isn't really helpful. What are your thoughts? |
What do you think about #22? Is that the right place to add that information, i.e. would you have found it? Does it make sense? |
It's my first time trying generic programming forgive me if this is not accept as an issue.
I was facing an issue trying this library. I tried the code below using GHC 8.0 compiler, and I was getting the error message pasted below. I am not sure if its something that should be obvious, however, the only reference I had was the Generics.Eot.Tutorial doc on Hackage. The "The Generic instance: Don't forget!!!" section states that if one were to get the compile error message that I got below, the chances are that the user forgot to derive generic instance on their ADT. I believe that the code below follows all the requirements dictated on the Tutorial but I am was getting the same error.
With the help of a nice person on #haskell IRC, compiling the code below with GHC 8.2 only resulted in a warning message specifying how to fix the potential error.
In conclusion, I thought that it would be worth mentioning the error here.
GHC 8.0 Compile Error Message
GHC 8.2 Warning Error Message
Code
The text was updated successfully, but these errors were encountered: