[clean-list] State-transformer monad and uniqueness typing...
Isabelle
isabelle.todescato@libertysurf.fr
Tue, 23 Jan 2001 05:33:49 +0100
Martin Wierich wrote:
> Isabelle wrote:
> > I have defined as follows the state-transformer monad type :
> >
> > :: STM s x = { stm :: s -> ( s , x ) }
> ...
> > I do not send detailed sources here because I suspect there is a basic
> > flaw in the STM type definition, clashing with uniqueness typing, but I
> > can't see where...
>
> Try
>
> :: STM *s x = { stm :: .(s -> ( s , x )) }
> ...
Thanks Martin, it works.
I discovered also that
:: STM .s x = { stm :: .( s -> .( s , x ) ) }
is correct.
Now it remains for me to understand exactly why :-)
Fabien Todescato