[GHC] #9838: PatternSynonyms and ConstraintKinds should not be required at the use site.
GHC
ghc-devs at haskell.org
Thu Nov 27 04:25:25 UTC 2014
#9838: PatternSynonyms and ConstraintKinds should not be required at the use site.
-------------------------------------+-------------------------------------
Reporter: ekmett | Owner:
Type: feature | Status: new
request | Milestone:
Priority: normal | Version: 7.8.3
Component: Compiler | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Unknown
Unknown/Multiple | Blocked By:
Type of failure: | Related Tickets:
None/Unknown |
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Comment (by goldfire):
Here's a test case for the !ConstraintKinds problem:
{{{
{-# LANGUAGE ConstraintKinds #-}
module A where
type EqShow a = (Eq a, Show a)
}}}
{{{
module B where
import A
foo :: EqShow a => a -> String
foo x = show x ++ show (x == x)
}}}
Compiling yields
{{{
B.hs:5:8:
Illegal tuple constraint: EqShow a
(Use ConstraintKinds to permit this)
In the type signature for ‘foo’: foo :: EqShow a => a -> String
}}}
I'd love to see this fix get in for 7.10, but I won't have a chance to
work on this before the (new) freeze date on Friday.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9838#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list