numeric-prelude-0.4.2: An experimental alternative hierarchy of numeric type classes

Safe HaskellNone
LanguageHaskell98

MathObj.Wrapper.Haskell98

Description

A wrapper that provides instances of Haskell 98 and NumericPrelude numeric type classes for types that have Haskell 98 instances.

Synopsis

Documentation

newtype T a Source

This makes a type usable in the NumericPrelude framework that was initially implemented for Haskell98 typeclasses. E.g. if a is in class Num, then T a is both in class Num and in C.

You can even lift container types. If Polynomial a is in Num for all types a that are in Num, then T (Polynomial (MathObj.Wrapper.NumericPrelude.T a)) is in C for all types a that are in C.

Constructors

Cons 

Fields

decons :: a
 

Instances

Functor T 
Bounded a => Bounded (T a) 
Enum a => Enum (T a) 
Eq a => Eq (T a) 
Floating a => Floating (T a) 
Fractional a => Fractional (T a) 
Integral a => Integral (T a) 
Num a => Num (T a) 
Ord a => Ord (T a) 
Real a => Real (T a) 
RealFloat a => RealFloat (T a) 
RealFrac a => RealFrac (T a) 
Show a => Show (T a) 
Ix a => Ix (T a) 
Num a => C (T a) 
(Eq a, Num a) => C (T a) 
Num a => C (T a) 
Integral a => C (T a) 
Integral a => C (T a) 
Integral a => C (T a) 
Num a => C (T a) 
Fractional a => C (T a) 
Real a => C (T a) 
Integral a => C (T a) 
Integral a => C (T a) 
Floating a => C (T a) 
Floating a => C (T a) 
RealFrac a => C (T a) 
RealFloat a => C (T a) 
RealFrac a => C (T a) 
RealFloat a => C (T a) 

lift1 :: (a -> b) -> T a -> T b Source

lift2 :: (a -> b -> c) -> T a -> T b -> T c Source

unliftF1 :: Functor f => (f (T a) -> f (T b)) -> f a -> f b Source

unliftF2 :: Functor f => (f (T a) -> f (T b) -> f (T c)) -> f a -> f b -> f c Source