Skip to content

Template Haskell: Floating point literals that cannot be represented by rationals

Currently, TH expressions and patterns store Float/Double values as rationals: http://hackage.haskell.org/package/template-haskell-2.11.1.0/docs/Language-Haskell-TH-Syntax.html#t:Lit

Unfortunately, this isn't sufficient, as there is no way to properly support usual floating point values such as NaN, Infinity, and Negative-Zero. This is true for both expressions and patterns.

It would be nice if Double/Float literals were stored as double-floats themselves, instead of rationals.

Trac metadata
Trac field Value
Version 8.0.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Template Haskell
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information