Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type Polynomial a = Polynomial_ a a
- data Polynomial_ a b where
- Polynomial_ :: (ValidLogic a, Ring a, a ~ b) => ![a] -> Polynomial_ a b
- provePolynomial :: (ValidLogic a, Ring a) => (ProofOf Polynomial_ a -> ProofOf Polynomial_ a) -> Polynomial_ a a
- sumList :: (t -> t -> t) -> [t] -> [t] -> [t]
- pow :: Rig r => r -> Int -> r
- evalPolynomial_ :: Polynomial_ a b -> a -> b
Documentation
type Polynomial a = Polynomial_ a a Source
The type of polynomials over an arbitrary ring.
See wikipedia for more detail.
data Polynomial_ a b where Source
FIXME: Polynomial_ takes two type parameters in order to be compatible with the Category hierarchy of classes. But currently, both types must match each other. Can/Should we generalize this to allow polynomials between types?
Polynomial_ :: (ValidLogic a, Ring a, a ~ b) => ![a] -> Polynomial_ a b |
provePolynomial :: (ValidLogic a, Ring a) => (ProofOf Polynomial_ a -> ProofOf Polynomial_ a) -> Polynomial_ a a Source
evalPolynomial_ :: Polynomial_ a b -> a -> b Source