Proposal (base): Add new Exp constructor to Text.Read.Lex.Lexeme

Christian Maeder Christian.Maeder at dfki.de
Mon Dec 12 15:25:32 CET 2011


Am 12.12.2011 15:09, schrieb Gracjan Polak:
> Christian Maeder<Christian.Maeder<at>  dfki.de>  writes:
>
>> How do you intent to store fractional numbers (like "10.01") without the
>> Rat constructor?
>
> 10.01 = Exp 1001 (-2)

can this be converted to a Rational, when e-Notation is no longer 
supported for rationals?

>>
>> How do you represent "10.01e10"?
>>
>>      Exp Integer Integer
>>
>> seems to be not enough.
>
> 10.01e10 = Exp 1001 8
>
>>
>> In any case, "^" from the integer-gmp should not be used to compute a
>> Rat value for the powers of 10. (see also
>> http://hackage.haskell.org/trac/ghc/ticket/3897)
>
> True.
>
> I think it is time to take discussion to trac and just report to this list on
> final conclusion.

Ok, Christian




More information about the Libraries mailing list