
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 |
participants (1)
-
Simon Peyton-Jones