
Now fixed in the 5.04 branch. The fix will get into the HEAD when I merge in the Template Haskell stuff. Thanks for the report Simon | -----Original Message----- | From: Simon Peyton-Jones [mailto:simonpj@microsoft.com] | Sent: 28 August 2002 12:21 | To: Ashley Yakeley | Cc: Haskell Cafe List | Subject: RE: Question aboutthe use of an inner forall | | | No, this is a bug, thank you. Will fix. | | Simon | | | -----Original Message----- | | From: Ashley Yakeley [mailto:ashley@semantic.org] | | Sent: 19 August 2002 11:31 | | To: Jay Cox; Haskell Cafe List | | Subject: Re: Question aboutthe use of an inner forall | | | | | | At 2002-08-18 20:19, Jay Cox wrote: | | | | >#ST> runST (newSTRef (3::Prelude.Int)) | | ># | | >#Ambiguous type variable(s) `a' in the constraint `PrelShow.Show a' | | >#arising from use of `PrelIO.print' at <No locn> #In a 'do' | | expression | | >pattern binding: PrelIO.print it | | | | I don't understand this either, actually: | | | | $ ghci -fglasgow-exts -package lang | | ___ ___ _ | | / _ \ /\ /\/ __(_) | | / /_\// /_/ / / | | GHC Interactive, version 5.04, | | for Haskell | | 98. | | / /_\\/ __ / /___| | http://www.haskell.org/ghc/ | | \____/\/ /_/\____/|_| Type :? for help. | | | | Loading package base ... linking ... done. | | Loading package haskell98 ... linking ... done. | | Loading package lang ... linking ... done. | | Prelude> :module ST | | Prelude ST> :type runST | | | | Inferred type is less polymorphic than expected | | Quantified type variable `s' escapes | | Expected type: ST s a -> t | | Inferred type: (forall s1. ST s1 a) -> a | | Prelude ST> | | | | What's up with that? Can't I even look at the type? Is this the | | monomorphism restriction or something? | | | | -- | | Ashley Yakeley, Seattle WA | | | | _______________________________________________ | | Haskell-Cafe mailing list | | Haskell-Cafe@haskell.org | | http://www.haskell.org/mailman/listinfo/haskell-cafe | | | _______________________________________________ | Haskell-Cafe mailing list | Haskell-Cafe@haskell.org | http://www.haskell.org/mailman/listinfo/haskell-cafe |

Hi,
What happens if I code:
newVar (MutVar s Bool)
Do I get something of the form;
ST s' (MutVar s' (MutVar s Bool))
Thx
Scott
----- Original Message -----
From: "Simon Peyton-Jones"
Now fixed in the 5.04 branch. The fix will get into the HEAD when I merge in the Template Haskell stuff.
Thanks for the report
Simon
| -----Original Message----- | From: Simon Peyton-Jones [mailto:simonpj@microsoft.com] | Sent: 28 August 2002 12:21 | To: Ashley Yakeley | Cc: Haskell Cafe List | Subject: RE: Question aboutthe use of an inner forall | | | No, this is a bug, thank you. Will fix. | | Simon | | | -----Original Message----- | | From: Ashley Yakeley [mailto:ashley@semantic.org] | | Sent: 19 August 2002 11:31 | | To: Jay Cox; Haskell Cafe List | | Subject: Re: Question aboutthe use of an inner forall | | | | | | At 2002-08-18 20:19, Jay Cox wrote: | | | | >#ST> runST (newSTRef (3::Prelude.Int)) | | ># | | >#Ambiguous type variable(s) `a' in the constraint `PrelShow.Show a' | | >#arising from use of `PrelIO.print' at <No locn> #In a 'do' | | expression | | >pattern binding: PrelIO.print it | | | | I don't understand this either, actually: | | | | $ ghci -fglasgow-exts -package lang | | ___ ___ _ | | / _ \ /\ /\/ __(_) | | / /_\// /_/ / / | | GHC Interactive, version 5.04, | | for Haskell | | 98. | | / /_\\/ __ / /___| | http://www.haskell.org/ghc/ | | \____/\/ /_/\____/|_| Type :? for help. | | | | Loading package base ... linking ... done. | | Loading package haskell98 ... linking ... done. | | Loading package lang ... linking ... done. | | Prelude> :module ST | | Prelude ST> :type runST | | | | Inferred type is less polymorphic than expected | | Quantified type variable `s' escapes | | Expected type: ST s a -> t | | Inferred type: (forall s1. ST s1 a) -> a | | Prelude ST> | | | | What's up with that? Can't I even look at the type? Is this the | | monomorphism restriction or something? | | | | -- | | Ashley Yakeley, Seattle WA | | | | _______________________________________________ | | Haskell-Cafe mailing list | | Haskell-Cafe@haskell.org | | http://www.haskell.org/mailman/listinfo/haskell-cafe | | | _______________________________________________ | Haskell-Cafe mailing list | Haskell-Cafe@haskell.org | http://www.haskell.org/mailman/listinfo/haskell-cafe | _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (2)
-
Scott J.
-
Simon Peyton-Jones