bzim
bzim

Reputation: 1070

Are Float and Double instances of Fractional?

If I enter ":i Double" or ":i Float" in ghci, it says that Double and Float are instances of Fractional. But in the Haskell docs it says that they aren't. So are they or not? http://hackage.haskell.org/package/base-4.9.1.0/docs/Prelude.html#t:Fractional

Upvotes: 7

Views: 755

Answers (1)

Carcigenicate
Carcigenicate

Reputation: 45781

  • Double and Float are a part of RealFloat,
    • which extends RealFrac and Floating;
      • both of which extend Fractional.

Upvotes: 11

Related Questions