[Haskell-cafe] unsafeDestructiveAssign?

Job Vranish jvranish at gmail.com
Wed Aug 12 10:36:36 EDT 2009


Yeah I'm thinking that even if I had such a function, it might be impossible
to make it play nicely. I think I can do a restricted form of what I want
with STRefs and StableNames (still dangerous) so I think I'll stick with
that at least while experimenting in haskell.

DCC looks extremely interesting! In fact it looks like I can do what I'm
wanting out of the box!
I will definitely have to experiment with it :)
Thanks,

On Wed, Aug 12, 2009 at 12:46 AM, Bernie Pope <florbitous at gmail.com> wrote:

> 2009/8/12 Job Vranish <jvranish at gmail.com>:
> > Does anybody know if there is some unsafe IO function that would let me
> do
> > destructive assignment?
> > Something like:
> >
> > a = 5
> > main = do
> >   veryUnsafeAndYouShouldNeverEveryCallThisFunction_DestructiveAssign a 8
> >   print a
> >> 8
>
> I doubt you will be able to achieve that in Haskell, but there is
> another language which does support what you want which is very close
> to Haskell. It is called Disciple, and there is a compiler for it
> called DDC:
>
>   http://www.haskell.org/haskellwiki/DDC
>
> DDC is rather young, so it depends on what you are doing as to whether
> it will fulfil all your needs.
>
> Cheers,
> Bernie.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090812/bc0a48db/attachment.html


More information about the Haskell-Cafe mailing list