[GHC] #9893: Switching on TypeFamilies extension stops code from typechecking
GHC
ghc-devs at haskell.org
Wed Dec 17 15:09:16 UTC 2014
#9893: Switching on TypeFamilies extension stops code from typechecking
-------------------------------------+-------------------------------------
Reporter: phischu | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.3
Resolution: invalid | Keywords:
Operating System: | Architecture: x86_64 (amd64)
Unknown/Multiple | Difficulty: Unknown
Type of failure: GHC | Blocked By:
rejects valid program | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Changes (by simonpj):
* status: new => closed
* resolution: => invalid
Comment:
This is confusing, but it's by design.
With `TypeFamilies` we also get `MonoLocalBinds`, so that `f`'s definition
(which is local) is not generalised. But `runST` requires a polymorphic
`f`; and a monomorphic `f` isn't good enough. Hence the error.
Giving a type signature to `f` is enough. (Giving a type signature to its
right hand side, on the other hand, is not enough
Simon
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9893#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list