Hello Jan,

> > [..write your own Clean compiler...]
> How difficult would this be?

Writing it from scratch would be lots and lots of work. Translating to
Haskell would also be far from easy. You can not simply throw away
uniqueness information. It is essential for doing side-effects.

> type checking the uniqueness annotations would be possible

Type checking in the presence of uniqueness annotations and classes is
ridiculously hard. When I tried to implement monads with unique types I
bumped into parts of the type checker that were undefined; resulting in a
compiler crash. I think by now they have solved this, but reinventing this
yourself can take a long, long time.

> What would be the best approach to tackle this problem?

I would suggest not to do it. Use Haskell if you want to fool around with
the source code of the compiler.

Bye,
  Arjan



Reply via email to