
On Tue, Sep 23, 2014 at 11:19 PM, Doug McIlroy
Yet (1::Integer, 1::Rational, 1::Double) evaluates to (1, 1%1, 1.0)
Is the inconsistent parsing defensible, or just an (irrational!) fact? I believe a reconciliation would break nothing.
The parsing is the same; read is not expected to throw a fromIntegral into the mix, whereas the compiler is required to. (The 1 is parsed as Integer by the compiler in all three cases, but the resulting AST is (fromIntegral 1) in all three cases.) I suspect a Read instance that included a fromIntegral would be even more irrational. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net