Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are Float and Double instances of Fractional?

Tags:

haskell

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

like image 401
bzim Avatar asked Feb 09 '17 22:02

bzim


1 Answers

  • Double and Float are a part of RealFloat,
    • which extends RealFrac and Floating;
      • both of which extend Fractional.
like image 125
Carcigenicate Avatar answered Nov 05 '22 00:11

Carcigenicate