| ... | ... | @@ -29,6 +29,9 @@ data SomeFoo = exists a . Foo a => SomeFoo a |
|
|
|
|
|
|
|
would have to carry around a dictionary for Num as well as Foo in dictionary passing implementation of type classes. In general some sort of fixpoint iteration would be needed to determine the set of dictionaries needed on an existential type.
|
|
|
|
|
|
|
|
|
|
|
|
This would not affect typecase based implementations of classes such as jhcs.
|
|
|
|
|
|
|
|
## Cons
|
|
|
|
|
|
|
|
- In the absence of this restriction, a type-preserving translation of a type system including either [AssociatedTypes](associated-types) or [FunctionalDependencies](functional-dependencies) becomes much more difficult (see Section 4.3.4 of [ Associated Types with Class](http://www.cse.unsw.edu.au/~chak/papers/CKPM05.html), POPL'05, and [ClassMethodTypes/TypedTrans](class-method-types/typed-trans)). Even if we adopt neither of these two type system features for Haskell', we will impact future directions of Haskell.
|
| ... | ... | |