Explicit Universal Quantification Bug?
Simon Peyton-Jones
simonpj@microsoft.com
Fri, 25 Jan 2002 01:39:51 -0800
| I'm trying to learn more about Explicit Universal=20
| Quantification so I decide to run the following supposedly=20
| correct code from the ghc user
| guide:
|=20
| >module Dummy where
| >
| >import ST
| >
| >newtype TIM s a =3D TIM (ST s (Maybe a))
| >
| >runTIM :: (forall s. TIM s a) -> Maybe a
| >runTIM t =3D case t of {TIM l -> runST l}
This is a hopeless bug in the user manual. Sorry about that.
It's not there any more in any case.
As you discovered, the correct way to say it is
runTIM t =3D runST (case t of {TIM l -> l})
Simon