[GHC] #14220: GeneralizedNewtypeDeriving and polymorphic arguments don't play nicely together
GHC
ghc-devs at haskell.org
Tue Sep 12 09:33:01 UTC 2017
#14220: GeneralizedNewtypeDeriving and polymorphic arguments don't play nicely
together
---------------------------------+--------------------------------------
Reporter: ivanm | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.2
Resolution: | Keywords:
Operating System: MacOS X | Architecture: x86_64 (amd64)
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
---------------------------------+--------------------------------------
Comment (by Iceland_jack):
Doesn't panic for 8.0.1
{{{
$ ghci -ignore-dot-ghci /tmp/a.hs
GHCi, version 7.8.4: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
[1 of 1] Compiling Main ( /tmp/a.hs, interpreted )
/tmp/a.hs:10:13:
Could not coerce from ‘proxy Int’ to ‘proxy MyInt’
because ‘proxy Int’ and ‘proxy MyInt’ are different types.
arising from the coercion of the method ‘nameOf’ from type
‘forall (proxy :: * -> *). proxy Int -> String’ to type
‘forall (proxy :: * -> *). proxy MyInt -> String’
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (NameOf MyInt)
Failed, modules loaded: none.
Prelude>
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14220#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list