twee-lib-2.4.2: An equational theorem prover

Twee.Utils

Description

Miscellaneous utility functions.

# Documentation

repeatM :: Monad m => m a -> m [a] Source #

partitionBy :: Ord b => (a -> b) -> [a] -> [[a]] Source #

collate :: Ord a => ([b] -> c) -> [(a, b)] -> [(a, c)] Source #

isSorted :: Ord a => [a] -> Bool Source #

isSortedBy :: Ord b => (a -> b) -> [a] -> Bool Source #

usort :: Ord a => [a] -> [a] Source #

usortBy :: (a -> a -> Ordering) -> [a] -> [a] Source #

sortBy' :: Ord b => (a -> b) -> [a] -> [a] Source #

usortBy' :: Ord b => (a -> b) -> [a] -> [a] Source #

unbuffered :: IO a -> IO a Source #

labelM :: Monad m => (a -> m b) -> [a] -> m [(a, b)] Source #

fixpoint :: Eq a => (a -> a) -> a -> a Source #

fixpointOn :: Eq b => (a -> b) -> (a -> a) -> a -> a Source #

splitInterval :: Integral a => a -> (a, a) -> [(a, a)] Source #

data Sample a Source #

Constructors

 Sample Integer [(Integer, Int)] [a]

addSample :: (Int, [a]) -> Sample a -> Sample a Source #

mapSample :: (a -> b) -> Sample a -> Sample b Source #

splits :: [a] -> [([a], [a])] Source #

foldn :: (a -> a) -> a -> Int -> a Source #

newtype U8 Source #

Constructors

 U8 Int

#### Instances

Instances details
 Source # Instance detailsDefined in Twee.Utils Methodssucc :: U8 -> U8 #pred :: U8 -> U8 #toEnum :: Int -> U8 #fromEnum :: U8 -> Int #enumFrom :: U8 -> [U8] #enumFromThen :: U8 -> U8 -> [U8] #enumFromTo :: U8 -> U8 -> [U8] #enumFromThenTo :: U8 -> U8 -> U8 -> [U8] # Source # Instance detailsDefined in Twee.Utils Methods(+) :: U8 -> U8 -> U8 #(-) :: U8 -> U8 -> U8 #(*) :: U8 -> U8 -> U8 #negate :: U8 -> U8 #abs :: U8 -> U8 #signum :: U8 -> U8 # Source # Instance detailsDefined in Twee.Utils Methodsquot :: U8 -> U8 -> U8 #rem :: U8 -> U8 -> U8 #div :: U8 -> U8 -> U8 #mod :: U8 -> U8 -> U8 #quotRem :: U8 -> U8 -> (U8, U8) #divMod :: U8 -> U8 -> (U8, U8) # Source # Instance detailsDefined in Twee.Utils Methods Source # Instance detailsDefined in Twee.Utils Methods Source # Instance detailsDefined in Twee.Utils Methods(==) :: U8 -> U8 -> Bool #(/=) :: U8 -> U8 -> Bool # Source # Instance detailsDefined in Twee.Utils Methodscompare :: U8 -> U8 -> Ordering #(<) :: U8 -> U8 -> Bool #(<=) :: U8 -> U8 -> Bool #(>) :: U8 -> U8 -> Bool #(>=) :: U8 -> U8 -> Bool #max :: U8 -> U8 -> U8 #min :: U8 -> U8 -> U8 #

newtype U16 Source #

Constructors

 U16 Int

#### Instances

Instances details
 Source # Instance detailsDefined in Twee.Utils Methodssucc :: U16 -> U16 #pred :: U16 -> U16 #toEnum :: Int -> U16 #fromEnum :: U16 -> Int #enumFrom :: U16 -> [U16] #enumFromThen :: U16 -> U16 -> [U16] #enumFromTo :: U16 -> U16 -> [U16] #enumFromThenTo :: U16 -> U16 -> U16 -> [U16] # Source # Instance detailsDefined in Twee.Utils Methods(+) :: U16 -> U16 -> U16 #(-) :: U16 -> U16 -> U16 #(*) :: U16 -> U16 -> U16 #negate :: U16 -> U16 #abs :: U16 -> U16 #signum :: U16 -> U16 # Source # Instance detailsDefined in Twee.Utils Methodsquot :: U16 -> U16 -> U16 #rem :: U16 -> U16 -> U16 #div :: U16 -> U16 -> U16 #mod :: U16 -> U16 -> U16 #quotRem :: U16 -> U16 -> (U16, U16) #divMod :: U16 -> U16 -> (U16, U16) # Source # Instance detailsDefined in Twee.Utils Methods Source # Instance detailsDefined in Twee.Utils Methods Source # Instance detailsDefined in Twee.Utils Methods(==) :: U16 -> U16 -> Bool #(/=) :: U16 -> U16 -> Bool # Source # Instance detailsDefined in Twee.Utils Methodscompare :: U16 -> U16 -> Ordering #(<) :: U16 -> U16 -> Bool #(<=) :: U16 -> U16 -> Bool #(>) :: U16 -> U16 -> Bool #(>=) :: U16 -> U16 -> Bool #max :: U16 -> U16 -> U16 #min :: U16 -> U16 -> U16 #