Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Fredrik Wieczerkowski
curry-libs
Commits
88e45e2f
Commit
88e45e2f
authored
Oct 03, 2019
by
Kai-Oliver Prott
Browse files
Temporarily remove RealFrac
parent
5ea65efe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Prelude.curry
View file @
88e45e2f
...
...
@@ -25,7 +25,7 @@ module Prelude
-- ** Numerical Typeclasses
, Num (..), Fractional (..), Real (..)
, Integral (..), even, odd, fromIntegral, realToFrac, (^)
,
RealFrac (..),
Floating (..), Monoid (..)
, Floating (..), Monoid (..)
-- Type Constructor Classes
, Functor (..), Applicative (..), Alternative (..)
, Monad (..), MonadFail(..)
...
...
@@ -947,12 +947,6 @@ class (Real a, Fractional a) => RealFrac a where
floor x = if r < 0 then n - 1 else n
where (n, r) = properFraction x
instance RealFrac Float where
properFraction x = (n, x - fromIntegral n)
where n = truncate x
truncate = fromInt . truncateFloat
round = fromInt . roundFloat
-- Conversion function from floating point numbers to integers.
-- The result is the closest integer between the argument and 0.
truncateFloat :: Float -> Int
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment