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

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

Domain.Math.Data.OrList

Description

Synopsis

# Documentation

data OrList a Source #

Instances
 Source # Instance detailsDefined in Domain.Math.Data.OrList Methodsfmap :: (a -> b) -> OrList a -> OrList b #(<\$) :: a -> OrList b -> OrList a # Source # Instance detailsDefined in Domain.Math.Data.OrList Methodsfold :: Monoid m => OrList m -> m #foldMap :: Monoid m => (a -> m) -> OrList a -> m #foldr :: (a -> b -> b) -> b -> OrList a -> b #foldr' :: (a -> b -> b) -> b -> OrList a -> b #foldl :: (b -> a -> b) -> b -> OrList a -> b #foldl' :: (b -> a -> b) -> b -> OrList a -> b #foldr1 :: (a -> a -> a) -> OrList a -> a #foldl1 :: (a -> a -> a) -> OrList a -> a #toList :: OrList a -> [a] #null :: OrList a -> Bool #length :: OrList a -> Int #elem :: Eq a => a -> OrList a -> Bool #maximum :: Ord a => OrList a -> a #minimum :: Ord a => OrList a -> a #sum :: Num a => OrList a -> a #product :: Num a => OrList a -> a # Source # Instance detailsDefined in Domain.Math.Data.OrList Methodstraverse :: Applicative f => (a -> f b) -> OrList a -> f (OrList b) #sequenceA :: Applicative f => OrList (f a) -> f (OrList a) #mapM :: Monad m => (a -> m b) -> OrList a -> m (OrList b) #sequence :: Monad m => OrList (m a) -> m (OrList a) # Source # Instance detailsDefined in Domain.Math.Data.OrList Methodssingleton :: a -> OrList a #getSingleton :: OrList a -> Maybe a # Eq a => Eq (OrList a) Source # Instance detailsDefined in Domain.Math.Data.OrList Methods(==) :: OrList a -> OrList a -> Bool #(/=) :: OrList a -> OrList a -> Bool # Ord a => Ord (OrList a) Source # Instance detailsDefined in Domain.Math.Data.OrList Methodscompare :: OrList a -> OrList a -> Ordering #(<) :: OrList a -> OrList a -> Bool #(<=) :: OrList a -> OrList a -> Bool #(>) :: OrList a -> OrList a -> Bool #(>=) :: OrList a -> OrList a -> Bool #max :: OrList a -> OrList a -> OrList a #min :: OrList a -> OrList a -> OrList a # Show a => Show (OrList a) Source # Instance detailsDefined in Domain.Math.Data.OrList MethodsshowsPrec :: Int -> OrList a -> ShowS #show :: OrList a -> String #showList :: [OrList a] -> ShowS # Source # Instance detailsDefined in Domain.Math.Data.OrList Methods(<>) :: OrList a -> OrList a -> OrList a #sconcat :: NonEmpty (OrList a) -> OrList a #stimes :: Integral b => b -> OrList a -> OrList a # Monoid (OrList a) Source # Instance detailsDefined in Domain.Math.Data.OrList Methodsmappend :: OrList a -> OrList a -> OrList a #mconcat :: [OrList a] -> OrList a # Arbitrary a => Arbitrary (OrList a) Source # Instance detailsDefined in Domain.Math.Data.OrList Methodsarbitrary :: Gen (OrList a) #shrink :: OrList a -> [OrList a] # IsTerm a => IsTerm (OrList a) Source # Instance detailsDefined in Domain.Math.Data.OrList MethodstoTerm :: OrList a -> Term #toTermList :: [OrList a] -> Term #fromTerm :: MonadPlus m => Term -> m (OrList a) #fromTermList :: MonadPlus m => Term -> m [OrList a] # Source # Instance detailsDefined in Domain.Math.Data.OrList Methodstrue :: OrList a #false :: OrList a #fromBool :: Bool -> OrList a #isTrue :: OrList a -> Bool #isFalse :: OrList a -> Bool # Source # Instance detailsDefined in Domain.Math.Data.OrList Methods Source # Instance detailsDefined in Domain.Math.Data.OrList MethodsisEmpty :: OrList a -> Bool Source #isAppend :: OrList a -> Maybe (OrList a, OrList a) Source # Source # Instance detailsDefined in Domain.Math.Data.OrList Methods

data OrSet a Source #

Instances
 Source # Instance detailsDefined in Domain.Math.Data.OrList Methodssingleton :: a -> OrSet a #getSingleton :: OrSet a -> Maybe a # Eq a => Eq (OrSet a) Source # Instance detailsDefined in Domain.Math.Data.OrList Methods(==) :: OrSet a -> OrSet a -> Bool #(/=) :: OrSet a -> OrSet a -> Bool # Ord a => Ord (OrSet a) Source # Instance detailsDefined in Domain.Math.Data.OrList Methodscompare :: OrSet a -> OrSet a -> Ordering #(<) :: OrSet a -> OrSet a -> Bool #(<=) :: OrSet a -> OrSet a -> Bool #(>) :: OrSet a -> OrSet a -> Bool #(>=) :: OrSet a -> OrSet a -> Bool #max :: OrSet a -> OrSet a -> OrSet a #min :: OrSet a -> OrSet a -> OrSet a # (Show a, Ord a) => Show (OrSet a) Source # Instance detailsDefined in Domain.Math.Data.OrList MethodsshowsPrec :: Int -> OrSet a -> ShowS #show :: OrSet a -> String #showList :: [OrSet a] -> ShowS # Ord a => Semigroup (OrSet a) Source # Instance detailsDefined in Domain.Math.Data.OrList Methods(<>) :: OrSet a -> OrSet a -> OrSet a #sconcat :: NonEmpty (OrSet a) -> OrSet a #stimes :: Integral b => b -> OrSet a -> OrSet a # Ord a => Monoid (OrSet a) Source # Instance detailsDefined in Domain.Math.Data.OrList Methodsmempty :: OrSet a #mappend :: OrSet a -> OrSet a -> OrSet a #mconcat :: [OrSet a] -> OrSet a # Ord a => BoolValue (OrSet a) Source # Instance detailsDefined in Domain.Math.Data.OrList Methodstrue :: OrSet a #false :: OrSet a #fromBool :: Bool -> OrSet a #isTrue :: OrSet a -> Bool #isFalse :: OrSet a -> Bool # Source # Instance detailsDefined in Domain.Math.Data.OrList Methods Source # Instance detailsDefined in Domain.Math.Data.OrList MethodsisEmpty :: OrSet a -> Bool Source #isAppend :: OrSet a -> Maybe (OrSet a, OrSet a) Source # Ord a => MonoidZero (OrSet a) Source # Instance detailsDefined in Domain.Math.Data.OrList Methods

true :: BoolValue a => a #

false :: BoolValue a => a #

(<>) :: Semigroup a => a -> a -> a infixr 6 #

An associative operation.

isTrue :: BoolValue a => a -> Bool #

isFalse :: BoolValue a => a -> Bool #

fromBool :: BoolValue a => Bool -> a #

toOrList :: [a] -> OrList a Source #

noDuplicates :: Eq a => OrList a -> OrList a Source #

Remove duplicates

oneDisjunct :: Monad m => (a -> m (OrList a)) -> OrList a -> m (OrList a) Source #