Can't specify type signature of value typed with type families
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
Trac metadata
Trac field | Value |
---|---|
Version | 6.10.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |