[Haskell-cafe] Numerals in input vs numerals in source

Jonathan Paugh jpaugh at gmx.us
Wed Sep 24 14:28:53 UTC 2014


On 09/24/2014 04:14 AM, Dominic Steinitz wrote:
> I am not sure this is an answer but languages like Python and R are
> much less fussy and if you want to use data that they parse quite
> happily then you have to do something like
>
>  newtype LaxDouble = LaxDouble { laxDouble :: Double }
>
> and write your own Read instance.
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

The following works just fine. I think this is correct behavior.

    read "1%1" :: Rational

-- 
Jonathan Paugh
jpaugh at gmx.us




More information about the Haskell-Cafe mailing list