ideas-math-types-1.1: Common types for mathematical domain reasoners

Maintainer bastiaan.heeren@ou.nl provisional portable (depends on ghc) None Haskell2010

Domain.Algebra.SmartGroup

Contents

Description

Synopsis

# Smart datatypes

newtype Smart a Source #

Constructors

 Smart FieldsfromSmart :: a
Instances
 Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methodsfmap :: (a -> b) -> Smart a -> Smart b #(<$) :: a -> Smart b -> Smart a # Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methodspure :: a -> Smart a #(<*>) :: Smart (a -> b) -> Smart a -> Smart b #liftA2 :: (a -> b -> c) -> Smart a -> Smart b -> Smart c #(*>) :: Smart a -> Smart b -> Smart b #(<*) :: Smart a -> Smart b -> Smart a # Eq a => Eq (Smart a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods(==) :: Smart a -> Smart a -> Bool #(/=) :: Smart a -> Smart a -> Bool # Ord a => Ord (Smart a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methodscompare :: Smart a -> Smart a -> Ordering #(<) :: Smart a -> Smart a -> Bool #(<=) :: Smart a -> Smart a -> Bool #(>) :: Smart a -> Smart a -> Bool #(>=) :: Smart a -> Smart a -> Bool #max :: Smart a -> Smart a -> Smart a #min :: Smart a -> Smart a -> Smart a # Show a => Show (Smart a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup MethodsshowsPrec :: Int -> Smart a -> ShowS #show :: Smart a -> String #showList :: [Smart a] -> ShowS # (CoMonoid a, Semigroup a) => Semigroup (Smart a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods(<>) :: Smart a -> Smart a -> Smart a #sconcat :: NonEmpty (Smart a) -> Smart a #stimes :: Integral b => b -> Smart a -> Smart a # (CoMonoid a, Monoid a) => Monoid (Smart a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methodsmempty :: Smart a #mappend :: Smart a -> Smart a -> Smart a #mconcat :: [Smart a] -> Smart a # BoolValue a => BoolValue (Smart a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methodstrue :: Smart a #false :: Smart a #fromBool :: Bool -> Smart a #isTrue :: Smart a -> Bool #isFalse :: Smart a -> Bool # (Boolean a, CoBoolean a) => Boolean (Smart a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods(<&&>) :: Smart a -> Smart a -> Smart a #(<||>) :: Smart a -> Smart a -> Smart a #complement :: Smart a -> Smart a # Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods CoMonoid a => CoMonoid (Smart a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup MethodsisEmpty :: Smart a -> Bool Source #isAppend :: Smart a -> Maybe (Smart a, Smart a) Source # (MonoidZero a, CoMonoid a) => MonoidZero (Smart a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods newtype SmartZero a Source # Constructors  SmartZero FieldsfromSmartZero :: a Instances  Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methodsfmap :: (a -> b) -> SmartZero a -> SmartZero b #(<$) :: a -> SmartZero b -> SmartZero a # Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methodspure :: a -> SmartZero a #(<*>) :: SmartZero (a -> b) -> SmartZero a -> SmartZero b #liftA2 :: (a -> b -> c) -> SmartZero a -> SmartZero b -> SmartZero c #(*>) :: SmartZero a -> SmartZero b -> SmartZero b #(<*) :: SmartZero a -> SmartZero b -> SmartZero a # Eq a => Eq (SmartZero a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods(==) :: SmartZero a -> SmartZero a -> Bool #(/=) :: SmartZero a -> SmartZero a -> Bool # Ord a => Ord (SmartZero a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methodscompare :: SmartZero a -> SmartZero a -> Ordering #(<) :: SmartZero a -> SmartZero a -> Bool #(<=) :: SmartZero a -> SmartZero a -> Bool #(>) :: SmartZero a -> SmartZero a -> Bool #(>=) :: SmartZero a -> SmartZero a -> Bool #max :: SmartZero a -> SmartZero a -> SmartZero a #min :: SmartZero a -> SmartZero a -> SmartZero a # Show a => Show (SmartZero a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup MethodsshowsPrec :: Int -> SmartZero a -> ShowS #show :: SmartZero a -> String #showList :: [SmartZero a] -> ShowS # (CoMonoidZero a, MonoidZero a, Semigroup a) => Semigroup (SmartZero a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods(<>) :: SmartZero a -> SmartZero a -> SmartZero a #sconcat :: NonEmpty (SmartZero a) -> SmartZero a #stimes :: Integral b => b -> SmartZero a -> SmartZero a # (CoMonoidZero a, MonoidZero a) => Monoid (SmartZero a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methodsmappend :: SmartZero a -> SmartZero a -> SmartZero a #mconcat :: [SmartZero a] -> SmartZero a # Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods CoMonoid a => CoMonoid (SmartZero a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods (MonoidZero a, CoMonoidZero a) => MonoidZero (SmartZero a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods

newtype SmartGroup a Source #

Constructors

 SmartGroup FieldsfromSmartGroup :: a
Instances
 Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methodsfmap :: (a -> b) -> SmartGroup a -> SmartGroup b #(<$) :: a -> SmartGroup b -> SmartGroup a # Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methodspure :: a -> SmartGroup a #(<*>) :: SmartGroup (a -> b) -> SmartGroup a -> SmartGroup b #liftA2 :: (a -> b -> c) -> SmartGroup a -> SmartGroup b -> SmartGroup c #(*>) :: SmartGroup a -> SmartGroup b -> SmartGroup b #(<*) :: SmartGroup a -> SmartGroup b -> SmartGroup a # Eq a => Eq (SmartGroup a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods(==) :: SmartGroup a -> SmartGroup a -> Bool #(/=) :: SmartGroup a -> SmartGroup a -> Bool # Ord a => Ord (SmartGroup a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methodscompare :: SmartGroup a -> SmartGroup a -> Ordering #(<) :: SmartGroup a -> SmartGroup a -> Bool #(<=) :: SmartGroup a -> SmartGroup a -> Bool #(>) :: SmartGroup a -> SmartGroup a -> Bool #(>=) :: SmartGroup a -> SmartGroup a -> Bool #max :: SmartGroup a -> SmartGroup a -> SmartGroup a #min :: SmartGroup a -> SmartGroup a -> SmartGroup a # Show a => Show (SmartGroup a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup MethodsshowsPrec :: Int -> SmartGroup a -> ShowS #show :: SmartGroup a -> String #showList :: [SmartGroup a] -> ShowS # (CoGroup a, Group a) => Semigroup (SmartGroup a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods(<>) :: SmartGroup a -> SmartGroup a -> SmartGroup a #sconcat :: NonEmpty (SmartGroup a) -> SmartGroup a #stimes :: Integral b => b -> SmartGroup a -> SmartGroup a # (CoGroup a, Group a) => Monoid (SmartGroup a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methodsmappend :: SmartGroup a -> SmartGroup a -> SmartGroup a #mconcat :: [SmartGroup a] -> SmartGroup a # Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods CoGroup a => CoGroup (SmartGroup a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods CoMonoid a => CoMonoid (SmartGroup a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods (MonoidZero a, CoGroup a, Group a) => MonoidZero (SmartGroup a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods (CoGroup a, Group a) => Group (SmartGroup a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods newtype SmartField a Source # Constructors  SmartField FieldsfromSmartField :: a Instances  Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methodsfmap :: (a -> b) -> SmartField a -> SmartField b #(<$) :: a -> SmartField b -> SmartField a # Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methodspure :: a -> SmartField a #(<*>) :: SmartField (a -> b) -> SmartField a -> SmartField b #liftA2 :: (a -> b -> c) -> SmartField a -> SmartField b -> SmartField c #(*>) :: SmartField a -> SmartField b -> SmartField b #(<*) :: SmartField a -> SmartField b -> SmartField a # CoField a => CoField (SmartField a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods CoRing a => CoRing (SmartField a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods (CoField a, Field a) => Field (SmartField a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods(|/|) :: SmartField a -> SmartField a -> SmartField a Source # (CoField a, Field a) => Ring (SmartField a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods(|-|) :: SmartField a -> SmartField a -> SmartField a Source # (CoField a, Field a) => SemiRing (SmartField a) Source # Instance detailsDefined in Domain.Algebra.SmartGroup Methods(|+|) :: SmartField a -> SmartField a -> SmartField a Source #sum :: [SmartField a] -> SmartField a Source #(|*|) :: SmartField a -> SmartField a -> SmartField a Source #product :: [SmartField a] -> SmartField a Source #

(.+.) :: (CoField a, Field a) => a -> a -> a infixl 6 Source #

(.-.) :: (CoField a, Field a) => a -> a -> a infixl 6 Source #

neg :: (CoField a, Field a) => a -> a Source #

(.*.) :: (CoField a, Field a) => a -> a -> a infixl 7 Source #

(./.) :: (CoField a, Field a) => a -> a -> a infixl 7 Source #

# Smart booleans

(.&&.) :: (Boolean a, CoBoolean a) => a -> a -> a infixr 5 Source #

(.||.) :: (Boolean a, CoBoolean a) => a -> a -> a infixr 4 Source #