Safe Haskell | None |
---|---|
Language | Haskell2010 |
Variables.
Singular-factory supports only a single linear sequence of variables, indexed starting from 1, optionally having single-character names.
So what we do is to use (phantom) types to encode naming conventions.
Synopsis
- type VarIdx = Int
- theFactoryVars :: [Var]
- theNthVar :: VarIdx -> Var
- class VariableSet v where
- varIdxName :: Proxy v -> VarIdx -> String
- recogVarName :: Proxy v -> String -> Maybe VarIdx
- data VarN (s :: Symbol)
- data Var_N (s :: Symbol)
- data VarBracketN (s :: Symbol)
- data VarAbc
- data VarABC
- data VarXyz
- data VarXYZ
- indexedVars :: String -> VarIdx -> String
- indexedVarsUnderscore :: String -> VarIdx -> String
- indexedVarsBracket :: String -> VarIdx -> String
- abcVars :: VarIdx -> String
- capitalAbcVars :: VarIdx -> String
- xyzVars :: VarIdx -> String
- capitalXyzVars :: VarIdx -> String
- varListXyz :: [Char]
- varListCapitalXYZ :: [Char]
- lowerVarList :: [String]
- upperVarList :: [String]
- readPosIdxMaybe :: String -> Maybe VarIdx
- recogIndexed :: String -> String -> Maybe VarIdx
- recogIndexedUnderscore :: String -> String -> Maybe VarIdx
- recogIndexedBracket :: String -> String -> Maybe VarIdx
- recogAbc :: String -> Maybe VarIdx
- recogABC :: String -> Maybe VarIdx
- recogXyz :: String -> Maybe VarIdx
- recogXYZ :: String -> Maybe VarIdx
Raw factory variables
A variable index.
In factory, there is a single linear sequence of variables. Variables are indexed starting from 1.
theFactoryVars :: [Var] Source #
In factory, there is a single linear sequence of variables. We "precalculate" these (lazily).
Variable sets
class VariableSet v where Source #
The class of variable sets. Since Factory only supports a single linear variable set, these differ only by naming conventions.
Instances
VariableSet VarXYZ Source # | |
VariableSet VarXyz Source # | |
VariableSet VarABC Source # | |
VariableSet VarAbc Source # | |
KnownSymbol s => VariableSet (VarBracketN s) Source # | |
Defined in Math.Singular.Factory.Variables varIdxName :: Proxy (VarBracketN s) -> VarIdx -> String Source # recogVarName :: Proxy (VarBracketN s) -> String -> Maybe VarIdx Source # | |
KnownSymbol s => VariableSet (Var_N s) Source # | |
KnownSymbol s => VariableSet (VarN s) Source # | |
data VarN (s :: Symbol) Source #
The variable set x1, x2, x3, x4...
(where "x" can be any string)
Instances
KnownSymbol s => VariableSet (VarN s) Source # | |
data Var_N (s :: Symbol) Source #
The variable set x_1, x_2, x_3, x_4...
(where "x" can be any string)
Instances
KnownSymbol s => VariableSet (Var_N s) Source # | |
data VarBracketN (s :: Symbol) Source #
The variable set x[1], x[2], x[3], x[4]...
(where "x" can be any string)
Instances
KnownSymbol s => VariableSet (VarBracketN s) Source # | |
Defined in Math.Singular.Factory.Variables varIdxName :: Proxy (VarBracketN s) -> VarIdx -> String Source # recogVarName :: Proxy (VarBracketN s) -> String -> Maybe VarIdx Source # |
The variable set a, b, c, d...
Instances
VariableSet VarAbc Source # | |
The variable set A, B, C, D...
Instances
VariableSet VarABC Source # | |
The variable set x, y, z, u, v, w, a, b, c...
Instances
VariableSet VarXyz Source # | |
The variable set X, Y, Z, U, V, W, A, B, C...
Instances
VariableSet VarXYZ Source # | |
Standard naming conventions of variables
capitalAbcVars :: VarIdx -> String Source #
That is, A, B, C...
capitalXyzVars :: VarIdx -> String Source #
Variable lists
varListXyz :: [Char] Source #
varListCapitalXYZ :: [Char] Source #
lowerVarList :: [String] Source #
The infinite list of variables a, b ..., z, aa, ab, ac, ...
upperVarList :: [String] Source #