[Hugs-bugs] Re: fromInt

ross at soi.city.ac.uk ross at soi.city.ac.uk
Sat Jan 22 19:47:30 EST 2005


On Sat, Jan 22, 2005 at 07:08:15PM -0500, Bob Tennent wrote:
> >| If I enter fromInt 5 at the hugs prompt, I get 5. If I use  fromInt 5 in 
> >a module and try to load the | module, I'm told that fromInt is undefined, 
> >unless I explicitly import  Hugs.Prelude.
> 
> Same with toInt, fromDouble.  Evidently a mismatch between the exports of 
> Hugs.Prelude and the imports of Prelude.hs.

These are internal functions of the Hugs implementation of the Prelude,
and not part of standard Haskell.  It's a bug that they're visible when
no module is loaded.  (The names in scope are always those in scope
inside the current module, and in this case that's the Prelude.)


More information about the Hugs-Bugs mailing list