{-# LANGUAGE RebindableSyntax #-}
module Numeric.Prelude
(
id,
(.),
($),
($!),
(&),
const,
flip,
on,
seq,
Bool (..),
bool,
(&&),
(||),
not,
otherwise,
ifThenElse,
Char,
Integer,
Int,
Int8,
Int16,
Int32,
Int64,
Natural,
Word,
Word8,
Word16,
Word32,
Word64,
Ratio(..),
Float,
Double,
fmod, floor, ceil, trunc, round,
sqrt, cbrt, pow, log, exp, ldexp,
pi, sin, cos, tan,
asin, acos, atan, atan2,
sinh, cosh, tanh,
asinh, acosh, atanh,
Eq (..),
Prd (..),
Ordering (..),
min, max,
compare,
comparing,
TripRatio(..),
ConnInteger(..),
fromRational,
fromInteger,
floor16, ceil16, round16, trunc16,
floor32, ceil32, round32, trunc32,
Semigroup (..),
Monoid (..),
mreplicate,
Magma(..),
Quasigroup,
Loop,
Group(..),
Semiring,
Ring,
(+), (-), (*), (^),
zero, one,
abs,
negate,
signum,
sum,
product,
Semifield,
Field,
(/), (^^),
pinf, ninf, anan,
recip,
Either (..),
either,
Maybe (..),
fromMaybe,
maybe,
fst,
snd,
curry,
uncurry,
Functor (..),
(<$>),
($>),
void,
Bifunctor (..),
Applicative (..),
(<**>),
liftA3,
Alternative (..),
asum,
Traversable (..),
for,
Monad ((>>=), (>>), return),
(=<<),
forM,
forM_,
mapM_,
when,
MonadPlus (..),
guard,
msum,
Foldable (foldMap, fold),
foldl', foldr',
for_,
traverse_,
Show (..),
ShowS,
showString,
) where
import Control.Applicative ((<**>), Alternative (..), Applicative (..), empty, liftA3)
import Control.Monad ((=<<), Monad (..), MonadPlus (..), forM, forM_, guard, mapM_, msum, when)
import Data.Bifunctor (Bifunctor (..), first, second)
import Data.Bool ((&&), Bool (..), bool, not, otherwise, (||))
import Data.Char (Char)
import Data.Connection.Int (ConnInteger(..), fromInteger)
import Data.Connection.Ratio (TripRatio(..), fromRational)
import Data.Connection.Round (floor16, ceil16, trunc16, round16, floor32, ceil32, trunc32, round32)
import Data.Either (Either (..), either)
import Data.Eq (Eq (..))
import Data.Float (fmod, floor, ceil, trunc, round, sqrt, cbrt, pow, log, exp, ldexp, sin, cos, tan
, asin, acos, atan, atan2, sinh, cosh, tanh, asinh, acosh, atanh)
import Data.Foldable (Foldable (), asum, fold, foldMap, foldl', foldr', for_, traverse_)
import Data.Function (($), (&), (.), const, flip, id, on)
import Data.Functor (($>), (<$>), Functor (..), void)
import Data.Int (Int, Int16, Int32, Int64, Int8)
import Data.Maybe (Maybe (..), fromMaybe, maybe)
import Data.Monoid (Monoid (..))
import Data.Ord (Ordering (..), min, max, compare, comparing)
import Data.Prd (Prd (..))
import Data.Semifield (Semifield, Field, (/), (^^), anan, pinf, ninf, recip)
import Data.Semigroup (Semigroup (..))
import Data.Semiring (Semiring, Ring, (+), (-), (*), (^), zero, one, abs, negate, signum, sum, product)
import Data.Semiring (Magma(..), Quasigroup, Loop, Group(..), mreplicate)
import Data.Traversable (Traversable (..), for)
import Data.Tuple (curry, fst, snd, uncurry)
import Data.Word (Word, Word16, Word32, Word64, Word8)
import GHC.Real (Ratio(..))
import Numeric.Natural (Natural)
import Text.Show (Show (..), ShowS, showString)
import Prelude (($!), Double, Float, Integer, seq)
pi :: TripRatio Integer b => b
pi = 3.141592653589793238
ifThenElse :: Bool -> a -> a -> a
ifThenElse b x y = bool y x b
{-# INLINE ifThenElse #-}