#28: Cannot make existential type instance of class with fundep -------------------------+-------------------------------------------------- Reporter: guest | Owner: nobody Type: defect | Status: new Priority: minor | Milestone: Component: type system | Version: 200605 Keywords: | -------------------------+-------------------------------------------------- There seems to be a problem when combining !FunDeps and Existential Types. The code below (works on ghci) causes an error: - ''ERROR "Existential.hs":8 - Existentially quantified variable escapes from pattern !FooObj a''. {{{ class Foo a b | a -> b where foo :: a -> (String,b) data FooA = A instance Foo FooA String where foo _ = ("tyA","A-specific") data FooObj = forall a b. Foo a b => FooObj a instance Foo FooObj () where foo (FooObj a) = (fst (foo a),()) -- !!! }}} best regards, benedikt -- Ticket URL: http://hackage.haskell.org/trac/hugs/ticket/28 Hugs http://www.haskell.org/hugs/ Hugs 98, an interpreter for Haskell