[GHC] #2759: Data.Generics.ConstrRep isn't general enough
GHC
trac at galois.com
Mon Nov 10 09:13:35 EST 2008
#2759: Data.Generics.ConstrRep isn't general enough
---------------------------------+------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.10.1 | Severity: minor
Keywords: | Testcase:
Architecture: Unknown/Multiple | Os: Unknown/Multiple
---------------------------------+------------------------------------------
The type ConstrRep in Data.Generics is used to represent constructors for
types.
The FloatConstr constructor is the one used for all kinds of floating
point primitives.
But FloatConstr has an argument of type Double. This limits the primitive
floating point types to those that are accurately representable as a
Double.
In other places in Haskell where an accurate and generic floating point
value is needed the type Rational is used. It should be used here too.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2759>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list