On Mon, May 21, 2007 at 10:33:56AM +0100, Simon Marlow wrote:
> I think that we could easily remove the '3e4' lexical syntax though, since 
> '3*10^^4' works just as well (I often write the latter anyway) (and guess 
> what, I just had to look up the difference between ^ and ^^, only to 
> discover I picked the wrong one).  The '3e4' syntax is a common source of 
> compiler bugs, becuase it is rarely used and hence rarely tested.

but they have substantially different translations.

3e2 -> fromRational (300 % 1)

3*10^^2   ->

(fromInteger 3) * (fromInteger 10) ^^ (2 :: Foo)

where Foo is whatever 4 defaults to, probably Integer, but could be a
compile error if defaulting is off or changed.

Though, the current floating point support in haskell is pretty funky as
is...

        John 

-- 
John Meacham - ⑆repetae.net⑆john⑈
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to