[GHC] #3227: Can't specify type signature of value typed with type
families
GHC
trac at galois.com
Wed May 13 03:21:54 EDT 2009
#3227: Can't specify type signature of value typed with type families
---------------------------+------------------------------------------------
Reporter: Ashley Yakeley | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.10.3 | Severity: normal
Keywords: | Testcase:
Os: Linux | Architecture: x86_64 (amd64)
---------------------------+------------------------------------------------
Compiling this:
{{{
{-# LANGUAGE TypeFamilies #-}
module Bug where
class C a where
type T a
p :: T a
p = undefined
q :: T a
q = p
}}}
give this:
{{{
$ ghc -c Bug.hs -o Bug.o
Bug.hs:10:6:
Couldn't match expected type `T a1' against inferred type `T a'
In the expression: p
In the definition of `q': q = p
}}}
It compiles successfully if the type signature for `q` is omitted.
{{{
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.10.3
$ uname -a
Linux glastonbury 2.6.28-12-generic #43-Ubuntu SMP Fri May 1 19:31:32 UTC
2009 x86_64 GNU/Linux
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3227>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list