|Reported by:||vivian||Owned by:||vivian|
|Keywords:||polymorphic, dynamic, class, linking||Cc:||haskell.vivian.mcphail@…, mmitar@…, leather@…|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Rev(s):|
Description (last modified by igloo)
At some point in the compilation process an expression acquires a fully-specified, possibly polymorphic, type. If we add an operation that join that type and that expresssion, say TypedAny, then we can implement the part of #4316 requested by mitar.
In GHCi we can evaluate HValues and also string them together with bind statements.
applyDynamic :: TypedAny -> TypedAny -> Maybe TypedAny
includes in its implementation a dictionary lookup and possible dynamic object linking for class methods.
fromDynamic :: TypedAny -> Maybe a
like applyDynamic, runs the typechecker at runtime to unify (and possibly link) the dynamic type (TypedAny) and the static type (a).
Conjecture Since we already have typecase (classes), with type families, this feature provides/simulates dependent types.
Change History (33)
comment:28 Changed 4 years ago by igloo
- Milestone changed from 7.4.1 to 7.6.1
- Priority changed from normal to low