Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- data a :*: b = !a :*: !b
- class IsProdList p where
- isProdList :: p -> Bool
- class IsKeyValues p where
- class IsProdList t => Select (n :: N) t where
- class IsProdList t => Discard (n :: N) t where
- class (IsProdList m, IsProdList t) => Mask m t where
- data Keep = Keep
- data Drop = Drop
Product type
data a :*: b infixr 9 Source #
A strict product type, written infix.
!a :*: !b infixr 9 |
Instances
class IsProdList p where Source #
Sequences of products that form a valid list, using () for the nil value.
isProdList :: p -> Bool Source #
Instances
IsProdList () Source # | |
Defined in Data.Repa.Scalar.Product isProdList :: () -> Bool Source # | |
IsProdList fs => IsProdList (f :*: fs) Source # | |
Defined in Data.Repa.Scalar.Product isProdList :: (f :*: fs) -> Bool Source # |
class IsKeyValues p where Source #
Sequences of products and tuples that form hetrogeneous key-value pairs.
keys :: p -> [Keys p] Source #
Get a cons-list of all the keys.
values :: p -> Values p Source #
Get a heterogeneous product-list of all the values.
Instances
IsKeyValues (k, v) Source # | |
(IsKeyValues p, IsKeyValues ps, Keys p ~ Keys ps) => IsKeyValues (p :*: ps) Source # | |
Selecting
class IsProdList t => Select (n :: N) t where Source #
Discarding
class IsProdList t => Discard (n :: N) t where Source #
discard :: Nat n -> t -> Discard' n t Source #
Discard the element with this index from a product list.
Masking
class (IsProdList m, IsProdList t) => Mask m t where Source #
Class of data types that can have parts masked out.
mask :: m -> t -> Mask' m t Source #
Mask out some component of a type.
mask (Keep :*: Drop :*: Keep :*: ()) (1 :*: "foo" :*: 'a' :*: ()) = (1 :*: 'a' :*: ()) mask (Drop :*: Drop :*: Drop :*: ()) (1 :*: "foo" :*: 'a' :*: ()) = ()
Singleton to indicate a field that should be kept.