| ... | ... | @@ -8,4 +8,13 @@ type Any = exists a . Typeable a => a |
|
|
|
|
|
|
|
sameType :: Any -> Any -> Bool
|
|
|
|
sameType x y = typeOf x == typeOf y
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
When existentials appear in the contravarient position such as above, they can be desugared into rank-n types with foralls. if existentials are allowed in the covarient position, then support for FirstClassExistentials? is needed.
|
|
|
|
|
|
|
|
## Support
|
|
|
|
|
|
|
|
|
|
|
|
Jhc currently supports the existential syntax anywhere a type is accepted, but will report an error if one is used in a covariant position. |