[GHC] #11282: Error warns about non-injectivity of injective type family
GHC
ghc-devs at haskell.org
Mon Jul 9 22:01:03 UTC 2018
#11282: Error warns about non-injectivity of injective type family
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: (none)
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 7.11
Resolution: duplicate | Keywords: TypeFamilies
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect | Unknown/Multiple
warning at compile-time | Test Case:
Blocked By: | Blocking:
Related Tickets: #14369 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):
* status: new => closed
* resolution: => duplicate
* related: => #14369
Comment:
Closing as a duplicate of #14369. After commit
8846a7fdcf2060dd37e66b4d1f89bd8fdfad4620 (which fixed #14369), the error
message no longer claims that `F` may not be injective:
{{{
$ /opt/ghc/8.4.3/bin/ghc Bug.hs -XTypeFamilyDependencies
[1 of 1] Compiling Bug ( Bug.hs, Bug.o )
Bug.hs:10:9: error:
• Could not deduce: F a ~ F a0
from the context: G a0
bound by the type signature for:
meth :: G a0 => F a0
at Bug.hs:10:9-26
The type variable ‘a0’ is ambiguous
• In the ambiguity check for ‘meth’
To defer the ambiguity check to use sites, enable
AllowAmbiguousTypes
In the type signature: meth :: (G a => F a) -> ()
|
10 | meth :: (G a => F a) -> ()
| ^^^^^^^^^^^^^^^^^^
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11282#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list