module Incipit.Fixed where
import qualified Data.Fixed as Fixed
import Data.Maybe (Maybe)
import GHC.Real (Integral, Real)
import Incipit.Integral (safeOp)
div' ::
Real a =>
Integral b =>
a ->
a ->
Maybe b
div' :: forall a b. (Real a, Integral b) => a -> a -> Maybe b
div' =
forall a b. (Eq a, Num a) => (a -> a -> b) -> a -> a -> Maybe b
safeOp forall a b. (Real a, Integral b) => a -> a -> b
Fixed.div'
divMod' ::
Real a =>
Integral b =>
a ->
a ->
Maybe (b, a)
divMod' :: forall a b. (Real a, Integral b) => a -> a -> Maybe (b, a)
divMod' =
forall a b. (Eq a, Num a) => (a -> a -> b) -> a -> a -> Maybe b
safeOp forall a b. (Real a, Integral b) => a -> a -> (b, a)
Fixed.divMod'
mod' ::
Real a =>
a ->
a ->
Maybe a
mod' :: forall a. Real a => a -> a -> Maybe a
mod' =
forall a b. (Eq a, Num a) => (a -> a -> b) -> a -> a -> Maybe b
safeOp forall a. Real a => a -> a -> a
Fixed.mod'