More translation questions (Was Re: [clean-list] translation of Haskell
newtype?)
John van Groningen
johnvg@cs.kun.nl
Thu, 1 Aug 2002 11:59:35 +0200
Brian Rogoff writes:
>...
>Thanks, that's a help. I take it that this won't work then if I want to
>create new unboxed Integer or Real types which can be used in unboxed
>arrays?
Arrays with unboxed records are supported in Clean. If the record contains
just an unboxed integer or real, both the record and integer or real
are unboxed, so the representation is just as efficient as for an {#Int}
or {#Real}.
For example:
:: R = {i :: !Int};
f :: {#R};
f = {{i=1}};
>Also, I find that some of the "Haskell" code I want to translate uses
>multi-parameter type classes with functional dependencies. Is there a
>workaround there too? If not, will we see them (or some similar
>functionality) in a future Clean? I'm not whining much yet, since I
>don't real programming experience with this feature, I'm just playing with
>some ideas from Haskell papers and I want to translate them to Clean,
>however fundeps look like a really useful feature if you have MPTC.
We currently have no plans to implement functional dependencies.
Regards,
John van Groningen