Commit 00da7909 authored by Tim Steenvoorden's avatar Tim Steenvoorden
Browse files

triv

parent 1cc52fc0
......@@ -4,12 +4,12 @@ import Algebra.Order
/// ## Signum
signum :: !a -> Sign | Ord a & Monoid a
signum :: !a -> Sign | Ord, Monoid a
signum x | x < zero = Negative
| x == zero = Neutral
| otherwise = Positive
/// ## Absolute value
abs :: !a -> a | Ord a & Group a
abs :: !a -> a | Ord, Group a
abs x = max x (inverse x)
......@@ -17,11 +17,11 @@ class Semiring a | Monoid a where
(*) infixl 7 :: !a !a -> a
unity :: a
one :== unity
square :: !a -> a | Semiring a
(^) infixr 8 :: !a !Nat -> a | Semiring a
one :== unity
class Domain a | Semiring a where
(`quot`) infix 7 :: !a !a -> a
(`rem`) infix 7 :: !a !a -> a
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment