#4459: Polymorphic Data.Dynamic
Vivian McPhail
haskell.vivian.mcphail at gmail.com
Thu Jul 21 05:50:44 CEST 2011
> #4459: Polymorphic Data.Dynamic
>
> -----------------------------------------------------+----------------------
> Reporter: vivian | Owner: vivian
> Type: feature request | Status: new
> Priority: normal | Milestone: 7.4.1
> Component: GHC API | Version: 7.1
> Keywords: polymorphic, dynamic, class, linking | Testcase:
> Blockedby: | Difficulty:
> Os: Unknown/Multiple | Blocking: 4316
> Architecture: Unknown/Multiple | Failure:
> None/Unknown
>
> -----------------------------------------------------+----------------------
>
> Comment(by simonpj):
>
> Maybe we should move this thread to ghc-users? You are programming with
> the GHC API, which is great, but it's not now about changing GHC itself I
> think.
>
It is possible to implement `dynApply :: Dynamic -> Dynamic -> Dyn (Maybe
Dynamic)` and `dynLoad :: [DFlags] -> String -> String -> Dyn Dynamic` by
using the GHC API, however, `toDynamic` and `fromDynamic` (the first point
in simonpj's earlier comment) requires a modification to GHC.
* There needs to be a primitive `typeOf :: a -> Type` that demotes a type to
a value (this primitive has to use the same type for `Type` as the compiler,
which is the difference between this and the monomorphic `Typeable`. It
seems to me that this could be implemented as a pass over type-checked code?
* Also, exposing a function that typechecks and does not rename would
require an addition to the API.
Vivian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20110721/08ab0c18/attachment.htm>
More information about the Glasgow-haskell-bugs
mailing list