Ticket #3227 (closed bug: duplicate)
Can't specify type signature of value typed with type families
Description
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
Change History
Note: See
TracTickets for help on using
tickets.
