{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving #-}

-- |
-- Module      : Data.Text.Format.Types.Internal
-- Copyright   : (c) 2011 MailRank, Inc.
--
-- License     : BSD-style
-- Maintainer  : bos@serpentine.com
-- Stability   : experimental
-- Portability : GHC
--
-- Types for text mangling.

module Data.Text.Format.Types.Internal
    (
      Format(..)
    , Only(..)
    , Shown(..)
    -- * Integer format control
    , Hex(..)
    ) where

import Data.Semigroup (Semigroup (..))
import Data.Monoid (Monoid(..))
import Data.String (IsString(..))
import Data.Text (Text)
import Data.Typeable (Typeable)

-- | A format string. This is intentionally incompatible with other
-- string types, to make it difficult to construct a format string by
-- concatenating string fragments (a very common way to accidentally
-- make code vulnerable to malicious data).
--
-- This type is an instance of 'IsString', so the easiest way to
-- construct a query is to enable the @OverloadedStrings@ language
-- extension and then simply write the query in double quotes.
--
-- > {-# LANGUAGE OverloadedStrings #-}
-- >
-- > import Data.Text.Format
-- >
-- > f :: Format
-- > f = "hello {}"
--
-- The underlying type is 'Text', so literal Haskell strings that
-- contain Unicode characters will be correctly handled.
newtype Format = Format { Format -> Text
fromFormat :: Text }
    deriving (Format -> Format -> Bool
(Format -> Format -> Bool)
-> (Format -> Format -> Bool) -> Eq Format
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Format -> Format -> Bool
$c/= :: Format -> Format -> Bool
== :: Format -> Format -> Bool
$c== :: Format -> Format -> Bool
Eq, Eq Format
Eq Format
-> (Format -> Format -> Ordering)
-> (Format -> Format -> Bool)
-> (Format -> Format -> Bool)
-> (Format -> Format -> Bool)
-> (Format -> Format -> Bool)
-> (Format -> Format -> Format)
-> (Format -> Format -> Format)
-> Ord Format
Format -> Format -> Bool
Format -> Format -> Ordering
Format -> Format -> Format
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Format -> Format -> Format
$cmin :: Format -> Format -> Format
max :: Format -> Format -> Format
$cmax :: Format -> Format -> Format
>= :: Format -> Format -> Bool
$c>= :: Format -> Format -> Bool
> :: Format -> Format -> Bool
$c> :: Format -> Format -> Bool
<= :: Format -> Format -> Bool
$c<= :: Format -> Format -> Bool
< :: Format -> Format -> Bool
$c< :: Format -> Format -> Bool
compare :: Format -> Format -> Ordering
$ccompare :: Format -> Format -> Ordering
$cp1Ord :: Eq Format
Ord, Typeable, Int -> Format -> ShowS
[Format] -> ShowS
Format -> String
(Int -> Format -> ShowS)
-> (Format -> String) -> ([Format] -> ShowS) -> Show Format
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Format] -> ShowS
$cshowList :: [Format] -> ShowS
show :: Format -> String
$cshow :: Format -> String
showsPrec :: Int -> Format -> ShowS
$cshowsPrec :: Int -> Format -> ShowS
Show)

instance Semigroup Format where
    Format Text
a <> :: Format -> Format -> Format
<> Format Text
b = Text -> Format
Format (Text
a Text -> Text -> Text
forall a. Monoid a => a -> a -> a
`mappend` Text
b)

instance Monoid Format where
    mempty :: Format
mempty = Text -> Format
Format Text
forall a. Monoid a => a
mempty
    mappend :: Format -> Format -> Format
mappend = Format -> Format -> Format
forall a. Semigroup a => a -> a -> a
(<>)

instance IsString Format where
    fromString :: String -> Format
fromString = Text -> Format
Format (Text -> Format) -> (String -> Text) -> String -> Format
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> Text
forall a. IsString a => String -> a
fromString

-- | Render an integral type in hexadecimal.
newtype Hex a = Hex a
    deriving (Hex a -> Hex a -> Bool
(Hex a -> Hex a -> Bool) -> (Hex a -> Hex a -> Bool) -> Eq (Hex a)
forall a. Eq a => Hex a -> Hex a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Hex a -> Hex a -> Bool
$c/= :: forall a. Eq a => Hex a -> Hex a -> Bool
== :: Hex a -> Hex a -> Bool
$c== :: forall a. Eq a => Hex a -> Hex a -> Bool
Eq, Eq (Hex a)
Eq (Hex a)
-> (Hex a -> Hex a -> Ordering)
-> (Hex a -> Hex a -> Bool)
-> (Hex a -> Hex a -> Bool)
-> (Hex a -> Hex a -> Bool)
-> (Hex a -> Hex a -> Bool)
-> (Hex a -> Hex a -> Hex a)
-> (Hex a -> Hex a -> Hex a)
-> Ord (Hex a)
Hex a -> Hex a -> Bool
Hex a -> Hex a -> Ordering
Hex a -> Hex a -> Hex a
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall a. Ord a => Eq (Hex a)
forall a. Ord a => Hex a -> Hex a -> Bool
forall a. Ord a => Hex a -> Hex a -> Ordering
forall a. Ord a => Hex a -> Hex a -> Hex a
min :: Hex a -> Hex a -> Hex a
$cmin :: forall a. Ord a => Hex a -> Hex a -> Hex a
max :: Hex a -> Hex a -> Hex a
$cmax :: forall a. Ord a => Hex a -> Hex a -> Hex a
>= :: Hex a -> Hex a -> Bool
$c>= :: forall a. Ord a => Hex a -> Hex a -> Bool
> :: Hex a -> Hex a -> Bool
$c> :: forall a. Ord a => Hex a -> Hex a -> Bool
<= :: Hex a -> Hex a -> Bool
$c<= :: forall a. Ord a => Hex a -> Hex a -> Bool
< :: Hex a -> Hex a -> Bool
$c< :: forall a. Ord a => Hex a -> Hex a -> Bool
compare :: Hex a -> Hex a -> Ordering
$ccompare :: forall a. Ord a => Hex a -> Hex a -> Ordering
$cp1Ord :: forall a. Ord a => Eq (Hex a)
Ord, ReadPrec [Hex a]
ReadPrec (Hex a)
Int -> ReadS (Hex a)
ReadS [Hex a]
(Int -> ReadS (Hex a))
-> ReadS [Hex a]
-> ReadPrec (Hex a)
-> ReadPrec [Hex a]
-> Read (Hex a)
forall a. Read a => ReadPrec [Hex a]
forall a. Read a => ReadPrec (Hex a)
forall a. Read a => Int -> ReadS (Hex a)
forall a. Read a => ReadS [Hex a]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Hex a]
$creadListPrec :: forall a. Read a => ReadPrec [Hex a]
readPrec :: ReadPrec (Hex a)
$creadPrec :: forall a. Read a => ReadPrec (Hex a)
readList :: ReadS [Hex a]
$creadList :: forall a. Read a => ReadS [Hex a]
readsPrec :: Int -> ReadS (Hex a)
$creadsPrec :: forall a. Read a => Int -> ReadS (Hex a)
Read, Int -> Hex a -> ShowS
[Hex a] -> ShowS
Hex a -> String
(Int -> Hex a -> ShowS)
-> (Hex a -> String) -> ([Hex a] -> ShowS) -> Show (Hex a)
forall a. Show a => Int -> Hex a -> ShowS
forall a. Show a => [Hex a] -> ShowS
forall a. Show a => Hex a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Hex a] -> ShowS
$cshowList :: forall a. Show a => [Hex a] -> ShowS
show :: Hex a -> String
$cshow :: forall a. Show a => Hex a -> String
showsPrec :: Int -> Hex a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> Hex a -> ShowS
Show, Integer -> Hex a
Hex a -> Hex a
Hex a -> Hex a -> Hex a
(Hex a -> Hex a -> Hex a)
-> (Hex a -> Hex a -> Hex a)
-> (Hex a -> Hex a -> Hex a)
-> (Hex a -> Hex a)
-> (Hex a -> Hex a)
-> (Hex a -> Hex a)
-> (Integer -> Hex a)
-> Num (Hex a)
forall a. Num a => Integer -> Hex a
forall a. Num a => Hex a -> Hex a
forall a. Num a => Hex a -> Hex a -> Hex a
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
fromInteger :: Integer -> Hex a
$cfromInteger :: forall a. Num a => Integer -> Hex a
signum :: Hex a -> Hex a
$csignum :: forall a. Num a => Hex a -> Hex a
abs :: Hex a -> Hex a
$cabs :: forall a. Num a => Hex a -> Hex a
negate :: Hex a -> Hex a
$cnegate :: forall a. Num a => Hex a -> Hex a
* :: Hex a -> Hex a -> Hex a
$c* :: forall a. Num a => Hex a -> Hex a -> Hex a
- :: Hex a -> Hex a -> Hex a
$c- :: forall a. Num a => Hex a -> Hex a -> Hex a
+ :: Hex a -> Hex a -> Hex a
$c+ :: forall a. Num a => Hex a -> Hex a -> Hex a
Num, Num (Hex a)
Ord (Hex a)
Num (Hex a) -> Ord (Hex a) -> (Hex a -> Rational) -> Real (Hex a)
Hex a -> Rational
forall a. Num a -> Ord a -> (a -> Rational) -> Real a
forall a. Real a => Num (Hex a)
forall a. Real a => Ord (Hex a)
forall a. Real a => Hex a -> Rational
toRational :: Hex a -> Rational
$ctoRational :: forall a. Real a => Hex a -> Rational
$cp2Real :: forall a. Real a => Ord (Hex a)
$cp1Real :: forall a. Real a => Num (Hex a)
Real, Int -> Hex a
Hex a -> Int
Hex a -> [Hex a]
Hex a -> Hex a
Hex a -> Hex a -> [Hex a]
Hex a -> Hex a -> Hex a -> [Hex a]
(Hex a -> Hex a)
-> (Hex a -> Hex a)
-> (Int -> Hex a)
-> (Hex a -> Int)
-> (Hex a -> [Hex a])
-> (Hex a -> Hex a -> [Hex a])
-> (Hex a -> Hex a -> [Hex a])
-> (Hex a -> Hex a -> Hex a -> [Hex a])
-> Enum (Hex a)
forall a. Enum a => Int -> Hex a
forall a. Enum a => Hex a -> Int
forall a. Enum a => Hex a -> [Hex a]
forall a. Enum a => Hex a -> Hex a
forall a. Enum a => Hex a -> Hex a -> [Hex a]
forall a. Enum a => Hex a -> Hex a -> Hex a -> [Hex a]
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: Hex a -> Hex a -> Hex a -> [Hex a]
$cenumFromThenTo :: forall a. Enum a => Hex a -> Hex a -> Hex a -> [Hex a]
enumFromTo :: Hex a -> Hex a -> [Hex a]
$cenumFromTo :: forall a. Enum a => Hex a -> Hex a -> [Hex a]
enumFromThen :: Hex a -> Hex a -> [Hex a]
$cenumFromThen :: forall a. Enum a => Hex a -> Hex a -> [Hex a]
enumFrom :: Hex a -> [Hex a]
$cenumFrom :: forall a. Enum a => Hex a -> [Hex a]
fromEnum :: Hex a -> Int
$cfromEnum :: forall a. Enum a => Hex a -> Int
toEnum :: Int -> Hex a
$ctoEnum :: forall a. Enum a => Int -> Hex a
pred :: Hex a -> Hex a
$cpred :: forall a. Enum a => Hex a -> Hex a
succ :: Hex a -> Hex a
$csucc :: forall a. Enum a => Hex a -> Hex a
Enum, Enum (Hex a)
Real (Hex a)
Real (Hex a)
-> Enum (Hex a)
-> (Hex a -> Hex a -> Hex a)
-> (Hex a -> Hex a -> Hex a)
-> (Hex a -> Hex a -> Hex a)
-> (Hex a -> Hex a -> Hex a)
-> (Hex a -> Hex a -> (Hex a, Hex a))
-> (Hex a -> Hex a -> (Hex a, Hex a))
-> (Hex a -> Integer)
-> Integral (Hex a)
Hex a -> Integer
Hex a -> Hex a -> (Hex a, Hex a)
Hex a -> Hex a -> Hex a
forall a. Integral a => Enum (Hex a)
forall a. Integral a => Real (Hex a)
forall a. Integral a => Hex a -> Integer
forall a. Integral a => Hex a -> Hex a -> (Hex a, Hex a)
forall a. Integral a => Hex a -> Hex a -> Hex a
forall a.
Real a
-> Enum a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
toInteger :: Hex a -> Integer
$ctoInteger :: forall a. Integral a => Hex a -> Integer
divMod :: Hex a -> Hex a -> (Hex a, Hex a)
$cdivMod :: forall a. Integral a => Hex a -> Hex a -> (Hex a, Hex a)
quotRem :: Hex a -> Hex a -> (Hex a, Hex a)
$cquotRem :: forall a. Integral a => Hex a -> Hex a -> (Hex a, Hex a)
mod :: Hex a -> Hex a -> Hex a
$cmod :: forall a. Integral a => Hex a -> Hex a -> Hex a
div :: Hex a -> Hex a -> Hex a
$cdiv :: forall a. Integral a => Hex a -> Hex a -> Hex a
rem :: Hex a -> Hex a -> Hex a
$crem :: forall a. Integral a => Hex a -> Hex a -> Hex a
quot :: Hex a -> Hex a -> Hex a
$cquot :: forall a. Integral a => Hex a -> Hex a -> Hex a
$cp2Integral :: forall a. Integral a => Enum (Hex a)
$cp1Integral :: forall a. Integral a => Real (Hex a)
Integral)

-- | Use this @newtype@ wrapper for your single parameter if you are
-- formatting a string containing exactly one substitution site.
newtype Only a = Only {
      Only a -> a
fromOnly :: a
    } deriving (Only a -> Only a -> Bool
(Only a -> Only a -> Bool)
-> (Only a -> Only a -> Bool) -> Eq (Only a)
forall a. Eq a => Only a -> Only a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Only a -> Only a -> Bool
$c/= :: forall a. Eq a => Only a -> Only a -> Bool
== :: Only a -> Only a -> Bool
$c== :: forall a. Eq a => Only a -> Only a -> Bool
Eq, Int -> Only a -> ShowS
[Only a] -> ShowS
Only a -> String
(Int -> Only a -> ShowS)
-> (Only a -> String) -> ([Only a] -> ShowS) -> Show (Only a)
forall a. Show a => Int -> Only a -> ShowS
forall a. Show a => [Only a] -> ShowS
forall a. Show a => Only a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Only a] -> ShowS
$cshowList :: forall a. Show a => [Only a] -> ShowS
show :: Only a -> String
$cshow :: forall a. Show a => Only a -> String
showsPrec :: Int -> Only a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> Only a -> ShowS
Show, ReadPrec [Only a]
ReadPrec (Only a)
Int -> ReadS (Only a)
ReadS [Only a]
(Int -> ReadS (Only a))
-> ReadS [Only a]
-> ReadPrec (Only a)
-> ReadPrec [Only a]
-> Read (Only a)
forall a. Read a => ReadPrec [Only a]
forall a. Read a => ReadPrec (Only a)
forall a. Read a => Int -> ReadS (Only a)
forall a. Read a => ReadS [Only a]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Only a]
$creadListPrec :: forall a. Read a => ReadPrec [Only a]
readPrec :: ReadPrec (Only a)
$creadPrec :: forall a. Read a => ReadPrec (Only a)
readList :: ReadS [Only a]
$creadList :: forall a. Read a => ReadS [Only a]
readsPrec :: Int -> ReadS (Only a)
$creadsPrec :: forall a. Read a => Int -> ReadS (Only a)
Read, Eq (Only a)
Eq (Only a)
-> (Only a -> Only a -> Ordering)
-> (Only a -> Only a -> Bool)
-> (Only a -> Only a -> Bool)
-> (Only a -> Only a -> Bool)
-> (Only a -> Only a -> Bool)
-> (Only a -> Only a -> Only a)
-> (Only a -> Only a -> Only a)
-> Ord (Only a)
Only a -> Only a -> Bool
Only a -> Only a -> Ordering
Only a -> Only a -> Only a
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall a. Ord a => Eq (Only a)
forall a. Ord a => Only a -> Only a -> Bool
forall a. Ord a => Only a -> Only a -> Ordering
forall a. Ord a => Only a -> Only a -> Only a
min :: Only a -> Only a -> Only a
$cmin :: forall a. Ord a => Only a -> Only a -> Only a
max :: Only a -> Only a -> Only a
$cmax :: forall a. Ord a => Only a -> Only a -> Only a
>= :: Only a -> Only a -> Bool
$c>= :: forall a. Ord a => Only a -> Only a -> Bool
> :: Only a -> Only a -> Bool
$c> :: forall a. Ord a => Only a -> Only a -> Bool
<= :: Only a -> Only a -> Bool
$c<= :: forall a. Ord a => Only a -> Only a -> Bool
< :: Only a -> Only a -> Bool
$c< :: forall a. Ord a => Only a -> Only a -> Bool
compare :: Only a -> Only a -> Ordering
$ccompare :: forall a. Ord a => Only a -> Only a -> Ordering
$cp1Ord :: forall a. Ord a => Eq (Only a)
Ord, Integer -> Only a
Only a -> Only a
Only a -> Only a -> Only a
(Only a -> Only a -> Only a)
-> (Only a -> Only a -> Only a)
-> (Only a -> Only a -> Only a)
-> (Only a -> Only a)
-> (Only a -> Only a)
-> (Only a -> Only a)
-> (Integer -> Only a)
-> Num (Only a)
forall a. Num a => Integer -> Only a
forall a. Num a => Only a -> Only a
forall a. Num a => Only a -> Only a -> Only a
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
fromInteger :: Integer -> Only a
$cfromInteger :: forall a. Num a => Integer -> Only a
signum :: Only a -> Only a
$csignum :: forall a. Num a => Only a -> Only a
abs :: Only a -> Only a
$cabs :: forall a. Num a => Only a -> Only a
negate :: Only a -> Only a
$cnegate :: forall a. Num a => Only a -> Only a
* :: Only a -> Only a -> Only a
$c* :: forall a. Num a => Only a -> Only a -> Only a
- :: Only a -> Only a -> Only a
$c- :: forall a. Num a => Only a -> Only a -> Only a
+ :: Only a -> Only a -> Only a
$c+ :: forall a. Num a => Only a -> Only a -> Only a
Num, Num (Only a)
Num (Only a)
-> (Only a -> Only a -> Only a)
-> (Only a -> Only a)
-> (Rational -> Only a)
-> Fractional (Only a)
Rational -> Only a
Only a -> Only a
Only a -> Only a -> Only a
forall a. Fractional a => Num (Only a)
forall a. Fractional a => Rational -> Only a
forall a. Fractional a => Only a -> Only a
forall a. Fractional a => Only a -> Only a -> Only a
forall a.
Num a
-> (a -> a -> a) -> (a -> a) -> (Rational -> a) -> Fractional a
fromRational :: Rational -> Only a
$cfromRational :: forall a. Fractional a => Rational -> Only a
recip :: Only a -> Only a
$crecip :: forall a. Fractional a => Only a -> Only a
/ :: Only a -> Only a -> Only a
$c/ :: forall a. Fractional a => Only a -> Only a -> Only a
$cp1Fractional :: forall a. Fractional a => Num (Only a)
Fractional, Num (Only a)
Ord (Only a)
Num (Only a)
-> Ord (Only a) -> (Only a -> Rational) -> Real (Only a)
Only a -> Rational
forall a. Num a -> Ord a -> (a -> Rational) -> Real a
forall a. Real a => Num (Only a)
forall a. Real a => Ord (Only a)
forall a. Real a => Only a -> Rational
toRational :: Only a -> Rational
$ctoRational :: forall a. Real a => Only a -> Rational
$cp2Real :: forall a. Real a => Ord (Only a)
$cp1Real :: forall a. Real a => Num (Only a)
Real, Fractional (Only a)
Real (Only a)
Real (Only a)
-> Fractional (Only a)
-> (forall b. Integral b => Only a -> (b, Only a))
-> (forall b. Integral b => Only a -> b)
-> (forall b. Integral b => Only a -> b)
-> (forall b. Integral b => Only a -> b)
-> (forall b. Integral b => Only a -> b)
-> RealFrac (Only a)
Only a -> b
Only a -> b
Only a -> b
Only a -> b
Only a -> (b, Only a)
forall b. Integral b => Only a -> b
forall b. Integral b => Only a -> (b, Only a)
forall a.
Real a
-> Fractional a
-> (forall b. Integral b => a -> (b, a))
-> (forall b. Integral b => a -> b)
-> (forall b. Integral b => a -> b)
-> (forall b. Integral b => a -> b)
-> (forall b. Integral b => a -> b)
-> RealFrac a
forall a. RealFrac a => Fractional (Only a)
forall a. RealFrac a => Real (Only a)
forall a b. (RealFrac a, Integral b) => Only a -> b
forall a b. (RealFrac a, Integral b) => Only a -> (b, Only a)
floor :: Only a -> b
$cfloor :: forall a b. (RealFrac a, Integral b) => Only a -> b
ceiling :: Only a -> b
$cceiling :: forall a b. (RealFrac a, Integral b) => Only a -> b
round :: Only a -> b
$cround :: forall a b. (RealFrac a, Integral b) => Only a -> b
truncate :: Only a -> b
$ctruncate :: forall a b. (RealFrac a, Integral b) => Only a -> b
properFraction :: Only a -> (b, Only a)
$cproperFraction :: forall a b. (RealFrac a, Integral b) => Only a -> (b, Only a)
$cp2RealFrac :: forall a. RealFrac a => Fractional (Only a)
$cp1RealFrac :: forall a. RealFrac a => Real (Only a)
RealFrac,
                Fractional (Only a)
Only a
Fractional (Only a)
-> Only a
-> (Only a -> Only a)
-> (Only a -> Only a)
-> (Only a -> Only a)
-> (Only a -> Only a -> Only a)
-> (Only a -> Only a -> Only a)
-> (Only a -> Only a)
-> (Only a -> Only a)
-> (Only a -> Only a)
-> (Only a -> Only a)
-> (Only a -> Only a)
-> (Only a -> Only a)
-> (Only a -> Only a)
-> (Only a -> Only a)
-> (Only a -> Only a)
-> (Only a -> Only a)
-> (Only a -> Only a)
-> (Only a -> Only a)
-> (Only a -> Only a)
-> (Only a -> Only a)
-> (Only a -> Only a)
-> (Only a -> Only a)
-> Floating (Only a)
Only a -> Only a
Only a -> Only a -> Only a
forall a. Floating a => Fractional (Only a)
forall a. Floating a => Only a
forall a. Floating a => Only a -> Only a
forall a. Floating a => Only a -> Only a -> Only a
forall a.
Fractional a
-> a
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> Floating a
log1mexp :: Only a -> Only a
$clog1mexp :: forall a. Floating a => Only a -> Only a
log1pexp :: Only a -> Only a
$clog1pexp :: forall a. Floating a => Only a -> Only a
expm1 :: Only a -> Only a
$cexpm1 :: forall a. Floating a => Only a -> Only a
log1p :: Only a -> Only a
$clog1p :: forall a. Floating a => Only a -> Only a
atanh :: Only a -> Only a
$catanh :: forall a. Floating a => Only a -> Only a
acosh :: Only a -> Only a
$cacosh :: forall a. Floating a => Only a -> Only a
asinh :: Only a -> Only a
$casinh :: forall a. Floating a => Only a -> Only a
tanh :: Only a -> Only a
$ctanh :: forall a. Floating a => Only a -> Only a
cosh :: Only a -> Only a
$ccosh :: forall a. Floating a => Only a -> Only a
sinh :: Only a -> Only a
$csinh :: forall a. Floating a => Only a -> Only a
atan :: Only a -> Only a
$catan :: forall a. Floating a => Only a -> Only a
acos :: Only a -> Only a
$cacos :: forall a. Floating a => Only a -> Only a
asin :: Only a -> Only a
$casin :: forall a. Floating a => Only a -> Only a
tan :: Only a -> Only a
$ctan :: forall a. Floating a => Only a -> Only a
cos :: Only a -> Only a
$ccos :: forall a. Floating a => Only a -> Only a
sin :: Only a -> Only a
$csin :: forall a. Floating a => Only a -> Only a
logBase :: Only a -> Only a -> Only a
$clogBase :: forall a. Floating a => Only a -> Only a -> Only a
** :: Only a -> Only a -> Only a
$c** :: forall a. Floating a => Only a -> Only a -> Only a
sqrt :: Only a -> Only a
$csqrt :: forall a. Floating a => Only a -> Only a
log :: Only a -> Only a
$clog :: forall a. Floating a => Only a -> Only a
exp :: Only a -> Only a
$cexp :: forall a. Floating a => Only a -> Only a
pi :: Only a
$cpi :: forall a. Floating a => Only a
$cp1Floating :: forall a. Floating a => Fractional (Only a)
Floating, Floating (Only a)
RealFrac (Only a)
RealFrac (Only a)
-> Floating (Only a)
-> (Only a -> Integer)
-> (Only a -> Int)
-> (Only a -> (Int, Int))
-> (Only a -> (Integer, Int))
-> (Integer -> Int -> Only a)
-> (Only a -> Int)
-> (Only a -> Only a)
-> (Int -> Only a -> Only a)
-> (Only a -> Bool)
-> (Only a -> Bool)
-> (Only a -> Bool)
-> (Only a -> Bool)
-> (Only a -> Bool)
-> (Only a -> Only a -> Only a)
-> RealFloat (Only a)
Int -> Only a -> Only a
Integer -> Int -> Only a
Only a -> Bool
Only a -> Int
Only a -> Integer
Only a -> (Int, Int)
Only a -> (Integer, Int)
Only a -> Only a
Only a -> Only a -> Only a
forall a. RealFloat a => Floating (Only a)
forall a. RealFloat a => RealFrac (Only a)
forall a. RealFloat a => Int -> Only a -> Only a
forall a. RealFloat a => Integer -> Int -> Only a
forall a. RealFloat a => Only a -> Bool
forall a. RealFloat a => Only a -> Int
forall a. RealFloat a => Only a -> Integer
forall a. RealFloat a => Only a -> (Int, Int)
forall a. RealFloat a => Only a -> (Integer, Int)
forall a. RealFloat a => Only a -> Only a
forall a. RealFloat a => Only a -> Only a -> Only a
forall a.
RealFrac a
-> Floating a
-> (a -> Integer)
-> (a -> Int)
-> (a -> (Int, Int))
-> (a -> (Integer, Int))
-> (Integer -> Int -> a)
-> (a -> Int)
-> (a -> a)
-> (Int -> a -> a)
-> (a -> Bool)
-> (a -> Bool)
-> (a -> Bool)
-> (a -> Bool)
-> (a -> Bool)
-> (a -> a -> a)
-> RealFloat a
atan2 :: Only a -> Only a -> Only a
$catan2 :: forall a. RealFloat a => Only a -> Only a -> Only a
isIEEE :: Only a -> Bool
$cisIEEE :: forall a. RealFloat a => Only a -> Bool
isNegativeZero :: Only a -> Bool
$cisNegativeZero :: forall a. RealFloat a => Only a -> Bool
isDenormalized :: Only a -> Bool
$cisDenormalized :: forall a. RealFloat a => Only a -> Bool
isInfinite :: Only a -> Bool
$cisInfinite :: forall a. RealFloat a => Only a -> Bool
isNaN :: Only a -> Bool
$cisNaN :: forall a. RealFloat a => Only a -> Bool
scaleFloat :: Int -> Only a -> Only a
$cscaleFloat :: forall a. RealFloat a => Int -> Only a -> Only a
significand :: Only a -> Only a
$csignificand :: forall a. RealFloat a => Only a -> Only a
exponent :: Only a -> Int
$cexponent :: forall a. RealFloat a => Only a -> Int
encodeFloat :: Integer -> Int -> Only a
$cencodeFloat :: forall a. RealFloat a => Integer -> Int -> Only a
decodeFloat :: Only a -> (Integer, Int)
$cdecodeFloat :: forall a. RealFloat a => Only a -> (Integer, Int)
floatRange :: Only a -> (Int, Int)
$cfloatRange :: forall a. RealFloat a => Only a -> (Int, Int)
floatDigits :: Only a -> Int
$cfloatDigits :: forall a. RealFloat a => Only a -> Int
floatRadix :: Only a -> Integer
$cfloatRadix :: forall a. RealFloat a => Only a -> Integer
$cp2RealFloat :: forall a. RealFloat a => Floating (Only a)
$cp1RealFloat :: forall a. RealFloat a => RealFrac (Only a)
RealFloat, Int -> Only a
Only a -> Int
Only a -> [Only a]
Only a -> Only a
Only a -> Only a -> [Only a]
Only a -> Only a -> Only a -> [Only a]
(Only a -> Only a)
-> (Only a -> Only a)
-> (Int -> Only a)
-> (Only a -> Int)
-> (Only a -> [Only a])
-> (Only a -> Only a -> [Only a])
-> (Only a -> Only a -> [Only a])
-> (Only a -> Only a -> Only a -> [Only a])
-> Enum (Only a)
forall a. Enum a => Int -> Only a
forall a. Enum a => Only a -> Int
forall a. Enum a => Only a -> [Only a]
forall a. Enum a => Only a -> Only a
forall a. Enum a => Only a -> Only a -> [Only a]
forall a. Enum a => Only a -> Only a -> Only a -> [Only a]
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: Only a -> Only a -> Only a -> [Only a]
$cenumFromThenTo :: forall a. Enum a => Only a -> Only a -> Only a -> [Only a]
enumFromTo :: Only a -> Only a -> [Only a]
$cenumFromTo :: forall a. Enum a => Only a -> Only a -> [Only a]
enumFromThen :: Only a -> Only a -> [Only a]
$cenumFromThen :: forall a. Enum a => Only a -> Only a -> [Only a]
enumFrom :: Only a -> [Only a]
$cenumFrom :: forall a. Enum a => Only a -> [Only a]
fromEnum :: Only a -> Int
$cfromEnum :: forall a. Enum a => Only a -> Int
toEnum :: Int -> Only a
$ctoEnum :: forall a. Enum a => Int -> Only a
pred :: Only a -> Only a
$cpred :: forall a. Enum a => Only a -> Only a
succ :: Only a -> Only a
$csucc :: forall a. Enum a => Only a -> Only a
Enum, Enum (Only a)
Real (Only a)
Real (Only a)
-> Enum (Only a)
-> (Only a -> Only a -> Only a)
-> (Only a -> Only a -> Only a)
-> (Only a -> Only a -> Only a)
-> (Only a -> Only a -> Only a)
-> (Only a -> Only a -> (Only a, Only a))
-> (Only a -> Only a -> (Only a, Only a))
-> (Only a -> Integer)
-> Integral (Only a)
Only a -> Integer
Only a -> Only a -> (Only a, Only a)
Only a -> Only a -> Only a
forall a. Integral a => Enum (Only a)
forall a. Integral a => Real (Only a)
forall a. Integral a => Only a -> Integer
forall a. Integral a => Only a -> Only a -> (Only a, Only a)
forall a. Integral a => Only a -> Only a -> Only a
forall a.
Real a
-> Enum a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
toInteger :: Only a -> Integer
$ctoInteger :: forall a. Integral a => Only a -> Integer
divMod :: Only a -> Only a -> (Only a, Only a)
$cdivMod :: forall a. Integral a => Only a -> Only a -> (Only a, Only a)
quotRem :: Only a -> Only a -> (Only a, Only a)
$cquotRem :: forall a. Integral a => Only a -> Only a -> (Only a, Only a)
mod :: Only a -> Only a -> Only a
$cmod :: forall a. Integral a => Only a -> Only a -> Only a
div :: Only a -> Only a -> Only a
$cdiv :: forall a. Integral a => Only a -> Only a -> Only a
rem :: Only a -> Only a -> Only a
$crem :: forall a. Integral a => Only a -> Only a -> Only a
quot :: Only a -> Only a -> Only a
$cquot :: forall a. Integral a => Only a -> Only a -> Only a
$cp2Integral :: forall a. Integral a => Enum (Only a)
$cp1Integral :: forall a. Integral a => Real (Only a)
Integral, Only a
Only a -> Only a -> Bounded (Only a)
forall a. a -> a -> Bounded a
forall a. Bounded a => Only a
maxBound :: Only a
$cmaxBound :: forall a. Bounded a => Only a
minBound :: Only a
$cminBound :: forall a. Bounded a => Only a
Bounded)

-- | Render a value using its 'Show' instance.
newtype Shown a = Shown {
      Shown a -> a
shown :: a
    } deriving (Shown a -> Shown a -> Bool
(Shown a -> Shown a -> Bool)
-> (Shown a -> Shown a -> Bool) -> Eq (Shown a)
forall a. Eq a => Shown a -> Shown a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Shown a -> Shown a -> Bool
$c/= :: forall a. Eq a => Shown a -> Shown a -> Bool
== :: Shown a -> Shown a -> Bool
$c== :: forall a. Eq a => Shown a -> Shown a -> Bool
Eq, Int -> Shown a -> ShowS
[Shown a] -> ShowS
Shown a -> String
(Int -> Shown a -> ShowS)
-> (Shown a -> String) -> ([Shown a] -> ShowS) -> Show (Shown a)
forall a. Show a => Int -> Shown a -> ShowS
forall a. Show a => [Shown a] -> ShowS
forall a. Show a => Shown a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Shown a] -> ShowS
$cshowList :: forall a. Show a => [Shown a] -> ShowS
show :: Shown a -> String
$cshow :: forall a. Show a => Shown a -> String
showsPrec :: Int -> Shown a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> Shown a -> ShowS
Show, ReadPrec [Shown a]
ReadPrec (Shown a)
Int -> ReadS (Shown a)
ReadS [Shown a]
(Int -> ReadS (Shown a))
-> ReadS [Shown a]
-> ReadPrec (Shown a)
-> ReadPrec [Shown a]
-> Read (Shown a)
forall a. Read a => ReadPrec [Shown a]
forall a. Read a => ReadPrec (Shown a)
forall a. Read a => Int -> ReadS (Shown a)
forall a. Read a => ReadS [Shown a]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Shown a]
$creadListPrec :: forall a. Read a => ReadPrec [Shown a]
readPrec :: ReadPrec (Shown a)
$creadPrec :: forall a. Read a => ReadPrec (Shown a)
readList :: ReadS [Shown a]
$creadList :: forall a. Read a => ReadS [Shown a]
readsPrec :: Int -> ReadS (Shown a)
$creadsPrec :: forall a. Read a => Int -> ReadS (Shown a)
Read, Eq (Shown a)
Eq (Shown a)
-> (Shown a -> Shown a -> Ordering)
-> (Shown a -> Shown a -> Bool)
-> (Shown a -> Shown a -> Bool)
-> (Shown a -> Shown a -> Bool)
-> (Shown a -> Shown a -> Bool)
-> (Shown a -> Shown a -> Shown a)
-> (Shown a -> Shown a -> Shown a)
-> Ord (Shown a)
Shown a -> Shown a -> Bool
Shown a -> Shown a -> Ordering
Shown a -> Shown a -> Shown a
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall a. Ord a => Eq (Shown a)
forall a. Ord a => Shown a -> Shown a -> Bool
forall a. Ord a => Shown a -> Shown a -> Ordering
forall a. Ord a => Shown a -> Shown a -> Shown a
min :: Shown a -> Shown a -> Shown a
$cmin :: forall a. Ord a => Shown a -> Shown a -> Shown a
max :: Shown a -> Shown a -> Shown a
$cmax :: forall a. Ord a => Shown a -> Shown a -> Shown a
>= :: Shown a -> Shown a -> Bool
$c>= :: forall a. Ord a => Shown a -> Shown a -> Bool
> :: Shown a -> Shown a -> Bool
$c> :: forall a. Ord a => Shown a -> Shown a -> Bool
<= :: Shown a -> Shown a -> Bool
$c<= :: forall a. Ord a => Shown a -> Shown a -> Bool
< :: Shown a -> Shown a -> Bool
$c< :: forall a. Ord a => Shown a -> Shown a -> Bool
compare :: Shown a -> Shown a -> Ordering
$ccompare :: forall a. Ord a => Shown a -> Shown a -> Ordering
$cp1Ord :: forall a. Ord a => Eq (Shown a)
Ord, Integer -> Shown a
Shown a -> Shown a
Shown a -> Shown a -> Shown a
(Shown a -> Shown a -> Shown a)
-> (Shown a -> Shown a -> Shown a)
-> (Shown a -> Shown a -> Shown a)
-> (Shown a -> Shown a)
-> (Shown a -> Shown a)
-> (Shown a -> Shown a)
-> (Integer -> Shown a)
-> Num (Shown a)
forall a. Num a => Integer -> Shown a
forall a. Num a => Shown a -> Shown a
forall a. Num a => Shown a -> Shown a -> Shown a
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
fromInteger :: Integer -> Shown a
$cfromInteger :: forall a. Num a => Integer -> Shown a
signum :: Shown a -> Shown a
$csignum :: forall a. Num a => Shown a -> Shown a
abs :: Shown a -> Shown a
$cabs :: forall a. Num a => Shown a -> Shown a
negate :: Shown a -> Shown a
$cnegate :: forall a. Num a => Shown a -> Shown a
* :: Shown a -> Shown a -> Shown a
$c* :: forall a. Num a => Shown a -> Shown a -> Shown a
- :: Shown a -> Shown a -> Shown a
$c- :: forall a. Num a => Shown a -> Shown a -> Shown a
+ :: Shown a -> Shown a -> Shown a
$c+ :: forall a. Num a => Shown a -> Shown a -> Shown a
Num, Num (Shown a)
Num (Shown a)
-> (Shown a -> Shown a -> Shown a)
-> (Shown a -> Shown a)
-> (Rational -> Shown a)
-> Fractional (Shown a)
Rational -> Shown a
Shown a -> Shown a
Shown a -> Shown a -> Shown a
forall a. Fractional a => Num (Shown a)
forall a. Fractional a => Rational -> Shown a
forall a. Fractional a => Shown a -> Shown a
forall a. Fractional a => Shown a -> Shown a -> Shown a
forall a.
Num a
-> (a -> a -> a) -> (a -> a) -> (Rational -> a) -> Fractional a
fromRational :: Rational -> Shown a
$cfromRational :: forall a. Fractional a => Rational -> Shown a
recip :: Shown a -> Shown a
$crecip :: forall a. Fractional a => Shown a -> Shown a
/ :: Shown a -> Shown a -> Shown a
$c/ :: forall a. Fractional a => Shown a -> Shown a -> Shown a
$cp1Fractional :: forall a. Fractional a => Num (Shown a)
Fractional, Num (Shown a)
Ord (Shown a)
Num (Shown a)
-> Ord (Shown a) -> (Shown a -> Rational) -> Real (Shown a)
Shown a -> Rational
forall a. Num a -> Ord a -> (a -> Rational) -> Real a
forall a. Real a => Num (Shown a)
forall a. Real a => Ord (Shown a)
forall a. Real a => Shown a -> Rational
toRational :: Shown a -> Rational
$ctoRational :: forall a. Real a => Shown a -> Rational
$cp2Real :: forall a. Real a => Ord (Shown a)
$cp1Real :: forall a. Real a => Num (Shown a)
Real, Fractional (Shown a)
Real (Shown a)
Real (Shown a)
-> Fractional (Shown a)
-> (forall b. Integral b => Shown a -> (b, Shown a))
-> (forall b. Integral b => Shown a -> b)
-> (forall b. Integral b => Shown a -> b)
-> (forall b. Integral b => Shown a -> b)
-> (forall b. Integral b => Shown a -> b)
-> RealFrac (Shown a)
Shown a -> b
Shown a -> b
Shown a -> b
Shown a -> b
Shown a -> (b, Shown a)
forall b. Integral b => Shown a -> b
forall b. Integral b => Shown a -> (b, Shown a)
forall a.
Real a
-> Fractional a
-> (forall b. Integral b => a -> (b, a))
-> (forall b. Integral b => a -> b)
-> (forall b. Integral b => a -> b)
-> (forall b. Integral b => a -> b)
-> (forall b. Integral b => a -> b)
-> RealFrac a
forall a. RealFrac a => Fractional (Shown a)
forall a. RealFrac a => Real (Shown a)
forall a b. (RealFrac a, Integral b) => Shown a -> b
forall a b. (RealFrac a, Integral b) => Shown a -> (b, Shown a)
floor :: Shown a -> b
$cfloor :: forall a b. (RealFrac a, Integral b) => Shown a -> b
ceiling :: Shown a -> b
$cceiling :: forall a b. (RealFrac a, Integral b) => Shown a -> b
round :: Shown a -> b
$cround :: forall a b. (RealFrac a, Integral b) => Shown a -> b
truncate :: Shown a -> b
$ctruncate :: forall a b. (RealFrac a, Integral b) => Shown a -> b
properFraction :: Shown a -> (b, Shown a)
$cproperFraction :: forall a b. (RealFrac a, Integral b) => Shown a -> (b, Shown a)
$cp2RealFrac :: forall a. RealFrac a => Fractional (Shown a)
$cp1RealFrac :: forall a. RealFrac a => Real (Shown a)
RealFrac,
                Fractional (Shown a)
Shown a
Fractional (Shown a)
-> Shown a
-> (Shown a -> Shown a)
-> (Shown a -> Shown a)
-> (Shown a -> Shown a)
-> (Shown a -> Shown a -> Shown a)
-> (Shown a -> Shown a -> Shown a)
-> (Shown a -> Shown a)
-> (Shown a -> Shown a)
-> (Shown a -> Shown a)
-> (Shown a -> Shown a)
-> (Shown a -> Shown a)
-> (Shown a -> Shown a)
-> (Shown a -> Shown a)
-> (Shown a -> Shown a)
-> (Shown a -> Shown a)
-> (Shown a -> Shown a)
-> (Shown a -> Shown a)
-> (Shown a -> Shown a)
-> (Shown a -> Shown a)
-> (Shown a -> Shown a)
-> (Shown a -> Shown a)
-> (Shown a -> Shown a)
-> Floating (Shown a)
Shown a -> Shown a
Shown a -> Shown a -> Shown a
forall a. Floating a => Fractional (Shown a)
forall a. Floating a => Shown a
forall a. Floating a => Shown a -> Shown a
forall a. Floating a => Shown a -> Shown a -> Shown a
forall a.
Fractional a
-> a
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> Floating a
log1mexp :: Shown a -> Shown a
$clog1mexp :: forall a. Floating a => Shown a -> Shown a
log1pexp :: Shown a -> Shown a
$clog1pexp :: forall a. Floating a => Shown a -> Shown a
expm1 :: Shown a -> Shown a
$cexpm1 :: forall a. Floating a => Shown a -> Shown a
log1p :: Shown a -> Shown a
$clog1p :: forall a. Floating a => Shown a -> Shown a
atanh :: Shown a -> Shown a
$catanh :: forall a. Floating a => Shown a -> Shown a
acosh :: Shown a -> Shown a
$cacosh :: forall a. Floating a => Shown a -> Shown a
asinh :: Shown a -> Shown a
$casinh :: forall a. Floating a => Shown a -> Shown a
tanh :: Shown a -> Shown a
$ctanh :: forall a. Floating a => Shown a -> Shown a
cosh :: Shown a -> Shown a
$ccosh :: forall a. Floating a => Shown a -> Shown a
sinh :: Shown a -> Shown a
$csinh :: forall a. Floating a => Shown a -> Shown a
atan :: Shown a -> Shown a
$catan :: forall a. Floating a => Shown a -> Shown a
acos :: Shown a -> Shown a
$cacos :: forall a. Floating a => Shown a -> Shown a
asin :: Shown a -> Shown a
$casin :: forall a. Floating a => Shown a -> Shown a
tan :: Shown a -> Shown a
$ctan :: forall a. Floating a => Shown a -> Shown a
cos :: Shown a -> Shown a
$ccos :: forall a. Floating a => Shown a -> Shown a
sin :: Shown a -> Shown a
$csin :: forall a. Floating a => Shown a -> Shown a
logBase :: Shown a -> Shown a -> Shown a
$clogBase :: forall a. Floating a => Shown a -> Shown a -> Shown a
** :: Shown a -> Shown a -> Shown a
$c** :: forall a. Floating a => Shown a -> Shown a -> Shown a
sqrt :: Shown a -> Shown a
$csqrt :: forall a. Floating a => Shown a -> Shown a
log :: Shown a -> Shown a
$clog :: forall a. Floating a => Shown a -> Shown a
exp :: Shown a -> Shown a
$cexp :: forall a. Floating a => Shown a -> Shown a
pi :: Shown a
$cpi :: forall a. Floating a => Shown a
$cp1Floating :: forall a. Floating a => Fractional (Shown a)
Floating, Floating (Shown a)
RealFrac (Shown a)
RealFrac (Shown a)
-> Floating (Shown a)
-> (Shown a -> Integer)
-> (Shown a -> Int)
-> (Shown a -> (Int, Int))
-> (Shown a -> (Integer, Int))
-> (Integer -> Int -> Shown a)
-> (Shown a -> Int)
-> (Shown a -> Shown a)
-> (Int -> Shown a -> Shown a)
-> (Shown a -> Bool)
-> (Shown a -> Bool)
-> (Shown a -> Bool)
-> (Shown a -> Bool)
-> (Shown a -> Bool)
-> (Shown a -> Shown a -> Shown a)
-> RealFloat (Shown a)
Int -> Shown a -> Shown a
Integer -> Int -> Shown a
Shown a -> Bool
Shown a -> Int
Shown a -> Integer
Shown a -> (Int, Int)
Shown a -> (Integer, Int)
Shown a -> Shown a
Shown a -> Shown a -> Shown a
forall a. RealFloat a => Floating (Shown a)
forall a. RealFloat a => RealFrac (Shown a)
forall a. RealFloat a => Int -> Shown a -> Shown a
forall a. RealFloat a => Integer -> Int -> Shown a
forall a. RealFloat a => Shown a -> Bool
forall a. RealFloat a => Shown a -> Int
forall a. RealFloat a => Shown a -> Integer
forall a. RealFloat a => Shown a -> (Int, Int)
forall a. RealFloat a => Shown a -> (Integer, Int)
forall a. RealFloat a => Shown a -> Shown a
forall a. RealFloat a => Shown a -> Shown a -> Shown a
forall a.
RealFrac a
-> Floating a
-> (a -> Integer)
-> (a -> Int)
-> (a -> (Int, Int))
-> (a -> (Integer, Int))
-> (Integer -> Int -> a)
-> (a -> Int)
-> (a -> a)
-> (Int -> a -> a)
-> (a -> Bool)
-> (a -> Bool)
-> (a -> Bool)
-> (a -> Bool)
-> (a -> Bool)
-> (a -> a -> a)
-> RealFloat a
atan2 :: Shown a -> Shown a -> Shown a
$catan2 :: forall a. RealFloat a => Shown a -> Shown a -> Shown a
isIEEE :: Shown a -> Bool
$cisIEEE :: forall a. RealFloat a => Shown a -> Bool
isNegativeZero :: Shown a -> Bool
$cisNegativeZero :: forall a. RealFloat a => Shown a -> Bool
isDenormalized :: Shown a -> Bool
$cisDenormalized :: forall a. RealFloat a => Shown a -> Bool
isInfinite :: Shown a -> Bool
$cisInfinite :: forall a. RealFloat a => Shown a -> Bool
isNaN :: Shown a -> Bool
$cisNaN :: forall a. RealFloat a => Shown a -> Bool
scaleFloat :: Int -> Shown a -> Shown a
$cscaleFloat :: forall a. RealFloat a => Int -> Shown a -> Shown a
significand :: Shown a -> Shown a
$csignificand :: forall a. RealFloat a => Shown a -> Shown a
exponent :: Shown a -> Int
$cexponent :: forall a. RealFloat a => Shown a -> Int
encodeFloat :: Integer -> Int -> Shown a
$cencodeFloat :: forall a. RealFloat a => Integer -> Int -> Shown a
decodeFloat :: Shown a -> (Integer, Int)
$cdecodeFloat :: forall a. RealFloat a => Shown a -> (Integer, Int)
floatRange :: Shown a -> (Int, Int)
$cfloatRange :: forall a. RealFloat a => Shown a -> (Int, Int)
floatDigits :: Shown a -> Int
$cfloatDigits :: forall a. RealFloat a => Shown a -> Int
floatRadix :: Shown a -> Integer
$cfloatRadix :: forall a. RealFloat a => Shown a -> Integer
$cp2RealFloat :: forall a. RealFloat a => Floating (Shown a)
$cp1RealFloat :: forall a. RealFloat a => RealFrac (Shown a)
RealFloat, Int -> Shown a
Shown a -> Int
Shown a -> [Shown a]
Shown a -> Shown a
Shown a -> Shown a -> [Shown a]
Shown a -> Shown a -> Shown a -> [Shown a]
(Shown a -> Shown a)
-> (Shown a -> Shown a)
-> (Int -> Shown a)
-> (Shown a -> Int)
-> (Shown a -> [Shown a])
-> (Shown a -> Shown a -> [Shown a])
-> (Shown a -> Shown a -> [Shown a])
-> (Shown a -> Shown a -> Shown a -> [Shown a])
-> Enum (Shown a)
forall a. Enum a => Int -> Shown a
forall a. Enum a => Shown a -> Int
forall a. Enum a => Shown a -> [Shown a]
forall a. Enum a => Shown a -> Shown a
forall a. Enum a => Shown a -> Shown a -> [Shown a]
forall a. Enum a => Shown a -> Shown a -> Shown a -> [Shown a]
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: Shown a -> Shown a -> Shown a -> [Shown a]
$cenumFromThenTo :: forall a. Enum a => Shown a -> Shown a -> Shown a -> [Shown a]
enumFromTo :: Shown a -> Shown a -> [Shown a]
$cenumFromTo :: forall a. Enum a => Shown a -> Shown a -> [Shown a]
enumFromThen :: Shown a -> Shown a -> [Shown a]
$cenumFromThen :: forall a. Enum a => Shown a -> Shown a -> [Shown a]
enumFrom :: Shown a -> [Shown a]
$cenumFrom :: forall a. Enum a => Shown a -> [Shown a]
fromEnum :: Shown a -> Int
$cfromEnum :: forall a. Enum a => Shown a -> Int
toEnum :: Int -> Shown a
$ctoEnum :: forall a. Enum a => Int -> Shown a
pred :: Shown a -> Shown a
$cpred :: forall a. Enum a => Shown a -> Shown a
succ :: Shown a -> Shown a
$csucc :: forall a. Enum a => Shown a -> Shown a
Enum, Enum (Shown a)
Real (Shown a)
Real (Shown a)
-> Enum (Shown a)
-> (Shown a -> Shown a -> Shown a)
-> (Shown a -> Shown a -> Shown a)
-> (Shown a -> Shown a -> Shown a)
-> (Shown a -> Shown a -> Shown a)
-> (Shown a -> Shown a -> (Shown a, Shown a))
-> (Shown a -> Shown a -> (Shown a, Shown a))
-> (Shown a -> Integer)
-> Integral (Shown a)
Shown a -> Integer
Shown a -> Shown a -> (Shown a, Shown a)
Shown a -> Shown a -> Shown a
forall a. Integral a => Enum (Shown a)
forall a. Integral a => Real (Shown a)
forall a. Integral a => Shown a -> Integer
forall a. Integral a => Shown a -> Shown a -> (Shown a, Shown a)
forall a. Integral a => Shown a -> Shown a -> Shown a
forall a.
Real a
-> Enum a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
toInteger :: Shown a -> Integer
$ctoInteger :: forall a. Integral a => Shown a -> Integer
divMod :: Shown a -> Shown a -> (Shown a, Shown a)
$cdivMod :: forall a. Integral a => Shown a -> Shown a -> (Shown a, Shown a)
quotRem :: Shown a -> Shown a -> (Shown a, Shown a)
$cquotRem :: forall a. Integral a => Shown a -> Shown a -> (Shown a, Shown a)
mod :: Shown a -> Shown a -> Shown a
$cmod :: forall a. Integral a => Shown a -> Shown a -> Shown a
div :: Shown a -> Shown a -> Shown a
$cdiv :: forall a. Integral a => Shown a -> Shown a -> Shown a
rem :: Shown a -> Shown a -> Shown a
$crem :: forall a. Integral a => Shown a -> Shown a -> Shown a
quot :: Shown a -> Shown a -> Shown a
$cquot :: forall a. Integral a => Shown a -> Shown a -> Shown a
$cp2Integral :: forall a. Integral a => Enum (Shown a)
$cp1Integral :: forall a. Integral a => Real (Shown a)
Integral, Shown a
Shown a -> Shown a -> Bounded (Shown a)
forall a. a -> a -> Bounded a
forall a. Bounded a => Shown a
maxBound :: Shown a
$cmaxBound :: forall a. Bounded a => Shown a
minBound :: Shown a
$cminBound :: forall a. Bounded a => Shown a
Bounded)