The following hugs   module is rejected under Hugs 1.3c.

module Oops where

class Foo t s where
  foo :: t -> s

class    (Foo t s) => Bar t s where
  bar :: t -> s
  
instance (Foo t s) => Bar t s where
  bar = foo

with the message:

ERROR "Oops.hs" (line 9): Cannot build superclass instance
*** Instance            : Bar a b
*** Context supplied    : Foo a b (bad type)
*** Required superclass : Foo a b

Is this a bug, implementation restriction or user error?

Lex

-- 
Name:           dr.ir. Lex Augusteijn
Address:        WL 1.1.13
                Philips Research Laboratories
                Prof. Holstlaan 4
                5656 AA Eindhoven
                The Netherlands
Phone:          (+31 40 27)43938
Fax:            (+31 40 27)44004
E-Mail:         [EMAIL PROTECTED]

Reply via email to