[Haskell-cafe] Simple GADTs, type families and type classes combination with type error.

Felipe Almeida Lessa felipe.lessa at gmail.com
Fri Jul 22 17:21:52 CEST 2011


On Fri, Jul 22, 2011 at 12:12 PM, Serguey Zefirov <sergueyz at gmail.com> wrote:
> Why does GHC complains on the code below ? (I'll explain in a second a
> requirement to do just so)

I don't why =(.  But you can workaround by using

  class CPU cpu where
    data CPUFunc cpu

Note that you don't need the class constraint 'CPU cpu =>' inside the
GADT since 'cpu' is not an existential.

Cheers, =)

-- 
Felipe.



More information about the Haskell-Cafe mailing list