[Haskell-cafe] Reification in Haskell, was: To yi or not to yi
Pasqualino 'Titto' Assini
tittoassini at gmail.com
Wed Jun 20 03:30:32 EDT 2007
Hi everybody,
What is the situation with respect to reification of function/thunks in
Haskell?
Does any current implementation support it ?
And, is there any plan for GHC to support it?
Claus's comments on this, follow.
titto
On Monday 18 June 2007 23:45:23 Claus Reinke wrote:
> > Is there any fundamental reasons why Haskell functions/closures
> > cannot be serialised?
>
> no, and that is part of the problem: the language would need to be
> extended, but the academically interesting issues have been tackled,
> all that is left is a lot of work (that is why these things would be so
> valuable: complex implementation machinery, controlled by very
> small language extensions, sometimes even language simplifications,
> such as lifting existing restrictions on i/o), preferably with very good
> planning, so that all the work does not become useless right after it
> is finished. there isn't much hope that this issue is going to be settled
> via the usual academic funding sources.
> > Most languages, even Java, have a reflection capability to dynamically
> > inspect an object. It is surprising that Haskell doesn't offer it.
>
> it has to be done with care, or it will invalidate *all* your nice
> reasoning about haskell programs. random example
>
> reify (f . g) == [| f . g |] =/= [| \x-> f (g x) |] == reify (\x-> f (g
> x))
>
> reification is not a referentially transparent program context.
More information about the Haskell-Cafe
mailing list