| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Knots.Prelude
- module Prelude.YAP
- module Control.Applicative
- module Control.Monad
- module Data.Default
- module Data.YAP.Algebra
- module GHC.TypeLits
- module Data.Foldable
- module Data.List
- module Data.Monoid
- module Data.Traversable
- type Ab a = (Default a, AbelianGroup a)
- type AbDef a = (Default a, AbelianGroup a)
- type AbEq a = (Eq a, AbelianGroup a)
- assert :: Bool -> a -> a
- type DefEq a = (Eq a, Default a)
- data F2
- getArgs :: IO [String]
- ifThenElse :: Bool -> a -> a -> a
- data IntMap a :: * -> *
- data Map k a :: * -> * -> *
- data Ordering :: *
- data Ratio a = !a :% !a
- type Rational = Ratio Integer
- type RingDef a = (Default a, Ring a)
- type RingEq a = (Default a, Eq a, Ring a)
- data Set a :: * -> *
- sum :: AbelianGroup a => [a] -> a
- swap :: (a, b) -> (b, a)
- data Vector a :: * -> *
- xor :: Bool -> Bool -> Bool
Documentation
module Prelude.YAP
module Control.Applicative
module Control.Monad
module Data.Default
module Data.YAP.Algebra
module GHC.TypeLits
module Data.Foldable
module Data.List
module Data.Monoid
module Data.Traversable
type Ab a = (Default a, AbelianGroup a) Source
type AbDef a = (Default a, AbelianGroup a) Source
type AbEq a = (Eq a, AbelianGroup a) Source
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.
Computation getArgs returns a list of the program's command
line arguments (not including the program name).
ifThenElse :: Bool -> a -> a -> a Source
Should be in scope when using the GHC extension RebindableSyntax
data IntMap a :: * -> *
A map of integers to values a.
data Map k a :: * -> * -> *
A Map from keys k to values a.
Instances
| 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) | |
| Typeable (* -> * -> *) Map |
data Ordering :: *
Instances
Like the Ratio from the base package, but with a custom Show instance,
and with some algebraic instances
Constructors
| !a :% !a |
Instances
| (Eq a, EuclideanDomain a) => Eq (Ratio a) | |
| (Ord a, EuclideanDomain a) => Ord (Ratio a) | |
| (EuclideanDomain a, Eq a, Show a) => Show (Ratio a) | |
| EuclideanDomain a => Default (Ratio a) | |
| EuclideanDomain a => AbelianGroup (Ratio a) | |
| EuclideanDomain a => Ring (Ratio a) | |
| EuclideanDomain a => Field (Ratio a) |
data Set a :: * -> *
A set of values a.
sum :: AbelianGroup a => [a] -> a Source
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.
Instances
| Alternative Vector | |
| Monad Vector | |
| Functor Vector | |
| MonadPlus Vector | |
| Applicative Vector | |
| Foldable Vector | |
| Traversable Vector | |
| Vector Vector a | |
| IsList (Vector a) | |
| Eq a => Eq (Vector a) | |
| Data a => Data (Vector a) | |
| Ord a => Ord (Vector a) | |
| Read a => Read (Vector a) | |
| Show a => Show (Vector a) | |
| Monoid (Vector a) | |
| NFData a => NFData (Vector a) | |
| Typeable (* -> *) Vector | |
| type Mutable Vector = MVector | |
| type Item (Vector a) = a |