knots-0.1.0.0: Khovanov homology computations

Safe HaskellNone

Knots.Prelude

Synopsis

Documentation

module Data.List

type Ab a = (Default a, AbelianGroup a)Source

type AbEq a = (Eq a, AbelianGroup a)Source

assert :: Bool -> a -> a

If the first argument evaluates to True, then the result is the second argument. Otherwise an AssertionFailed exception is raised, containing a String with the source file and line number of the call to assert.

Assertions can normally be turned on or off with a compiler flag (for GHC, assertions are normally on unless optimisation is turned on with -O or the -fignore-asserts option is given). When assertions are turned off, the first argument to assert is ignored, and the second argument is returned as the result.

castLabel :: L l a -> L l' aSource

type DefEq a = (Eq a, Default a)Source

getArgs :: IO [String]

Computation getArgs returns a list of the program's command line arguments (not including the program name).

ifThenElse :: Bool -> a -> a -> aSource

Should be in scope when using the GHC extension RebindableSyntax

data IntMap a

A map of integers to values a.

Instances

newtype L l a Source

A value with a label, with a Show instance that is suitable for monomials. a is then the index (multiindex, …) that describes the monomial.

Constructors

L 

Fields

unL :: a
 

Instances

Enum a => Enum (L l a) 
Eq a => Eq (L l a) 
Ord a => Ord (L l a) 
(Show a, SingI Symbol l) => Show (L l a) 
(Num a, SingI Symbol l) => Num (L l a) 
(Real a, SingI Symbol l) => Real (L l a) 
(Integral a, SingI Symbol l) => Integral (L l a) 
AbelianGroup a => AbelianGroup (L l a) 
Ring a => Ring (L l a) 
EuclideanDomain a => EuclideanDomain (L l a) 
Field a => Field (L l a) 

data Map k a

A Map from keys k to values a.

Instances

Typeable2 Map 
Functor (Map k) 
Foldable (Map k) 
Traversable (Map k) 
(Eq k, Eq a) => Eq (Map k a) 
(Data k, Data a, Ord k) => Data (Map k a) 
(Ord k, Ord v) => Ord (Map k v) 
(Ord k, Read k, Read e) => Read (Map k e) 
(Show k, Show a) => Show (Map k a) 
Ord k => Monoid (Map k v) 
Default (Map k v) 
(NFData k, NFData a) => NFData (Map k a) 

data Ratio a Source

Like the Ratio from the base package, but with a custom Show instance, and with some algebraic instances

Constructors

!a :% !a 

type RingDef a = (Default a, Ring a)Source

type RingEq a = (Default a, Eq a, Ring a)Source

data Set a

A set of values a.

Instances

Typeable1 Set 
Foldable Set 
Eq a => Eq (Set a) 
(Data a, Ord a) => Data (Set a) 
Ord a => Ord (Set a) 
(Read a, Ord a) => Read (Set a) 
Show a => Show (Set a) 
Ord a => Monoid (Set a) 
Default (Set v) 
NFData a => NFData (Set a) 

sum :: AbelianGroup a => [a] -> aSource

Like Data.Foldable.sum, but for any instance of AbelianGroup

swap :: (a, b) -> (b, a)

Swap the components of a pair.

data Vector a

Boxed vectors, supporting efficient slicing.