mixed-types-num-0.5.4.0: Alternative Prelude with numeric and logic expressions typed bottom-up
Copyright(c) Michal Konecny
LicenseBSD3
Maintainermikkonecny@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Numeric.MixedTypes.Power

Description

 
Synopsis

Exponentiation

class CanPow b e where Source #

A replacement for Prelude's binary ^ and ^^.

Associated Types

type PowType b e Source #

type PowType b e = b

Methods

pow :: b -> e -> PowType b e Source #

Instances

Instances details
CanPow Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Double Double Source #

CanPow Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Double Int Source #

CanPow Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Double Integer Source #

CanPow Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Double Rational Source #

CanPow Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Int Double Source #

CanPow Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Int Int Source #

Methods

pow :: Int -> Int -> PowType Int Int Source #

CanPow Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Int Integer Source #

CanPow Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Integer Double Source #

CanPow Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Integer Int Source #

CanPow Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Integer Integer Source #

CanPow Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Rational Double Source #

CanPow Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Rational Int Source #

CanPow Rational Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Rational Integer Source #

(CanPow Double e, HasOrderCertainly e Integer, CanTestInteger e) => CanPow Double (CN e) Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Double (CN e) Source #

Methods

pow :: Double -> CN e -> PowType Double (CN e) Source #

(CanPow Int e, HasOrderCertainly e Integer, CanTestInteger e) => CanPow Int (CN e) Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Int (CN e) Source #

Methods

pow :: Int -> CN e -> PowType Int (CN e) Source #

(CanPow Integer e, HasOrderCertainly e Integer, CanTestInteger e) => CanPow Integer (CN e) Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Integer (CN e) Source #

Methods

pow :: Integer -> CN e -> PowType Integer (CN e) Source #

(CanPow Rational e, HasOrderCertainly e Integer, CanTestInteger e) => CanPow Rational (CN e) Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Rational (CN e) Source #

Methods

pow :: Rational -> CN e -> PowType Rational (CN e) Source #

(CanPow b Integer, HasOrderCertainly b Integer, HasEqCertainly b Integer) => CanPow (CN b) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType (CN b) Integer Source #

Methods

pow :: CN b -> Integer -> PowType (CN b) Integer Source #

(CanPow b Int, HasOrderCertainly b Integer, HasEqCertainly b Integer) => CanPow (CN b) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType (CN b) Int Source #

Methods

pow :: CN b -> Int -> PowType (CN b) Int Source #

(CanPow b Rational, HasOrderCertainly b Integer, HasEqCertainly b Integer) => CanPow (CN b) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType (CN b) Rational Source #

Methods

pow :: CN b -> Rational -> PowType (CN b) Rational Source #

(CanPow b Double, HasOrderCertainly b Integer, HasEqCertainly b Integer) => CanPow (CN b) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType (CN b) Double Source #

Methods

pow :: CN b -> Double -> PowType (CN b) Double Source #

CanPow a b => CanPow (Maybe a) (Maybe b) Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType (Maybe a) (Maybe b) Source #

Methods

pow :: Maybe a -> Maybe b -> PowType (Maybe a) (Maybe b) Source #

(CanPow b e, HasOrderCertainly b Integer, HasOrderCertainly e Integer, HasEqCertainly b Integer, CanTestInteger e) => CanPow (CN b) (CN e) Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType (CN b) (CN e) Source #

Methods

pow :: CN b -> CN e -> PowType (CN b) (CN e) Source #

type CanPowBy t1 t2 = (CanPow t1 t2, PowType t1 t2 ~ t1) Source #

(^) :: CanPow t1 t2 => t1 -> t2 -> PowType t1 t2 infixl 8 Source #

powUsingMul :: (CanBeInteger e, CanMulSameType t) => t -> t -> e -> t Source #

Tests

specCanPow :: _ => T t1 -> T t2 -> Spec Source #

HSpec properties that each implementation of CanPow should satisfy.