Ticket #28 (new defect)
Cannot make existential type instance of class with fundep
| Reported by: | guest | Owned by: | nobody |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | type system | Version: | 200605 |
| Keywords: | Cc: |
Description
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
Change History
Note: See
TracTickets for help on using
tickets.
