Skip to content

ghci not applying defaulting when showing type

This does not look right:

Prelude> :set +t
Prelude> 1e1000
Infinity
it :: Fractional t => t

because the type actually is (defaulted to) Double?

(but is it really? I don't see default rules for Fractional in the ghc docs https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/interactive-evaluation.html#extended-default-rules or in the language standard https://www.haskell.org/onlinereport/decls.html#sect4.3.4 )

How can I find the defaulted type in ghci?

Edited by waldmann@imn.htwk-leipzig.de
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information