Skip to content

Instantly share code, notes, and snippets.

@hdgarrood
Created June 16, 2015 21:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hdgarrood/0c1c13319ca3fd16d4fc to your computer and use it in GitHub Desktop.
Save hdgarrood/0c1c13319ca3fd16d4fc to your computer and use it in GitHub Desktop.
An example Hoogle file, using the PureScript prelude
@package purescript-prelude
@version 999.1.0
module Prelude where
-- | <p>The <code>Unit</code> type has a single inhabitant, called <code>unit</code>. It represents
-- | values with no computational content.</p>
-- | <p><code>Unit</code> is often used, wrapped in a monadic type constructor, as the
-- | return type of a computation where only
-- | the <em>effects</em> are important.</p>
newtype Prelude.Unit
instance semigroupUnit :: Prelude.Semigroup Prelude.Unit
instance semiringUnit :: Prelude.Semiring Prelude.Unit
instance ringUnit :: Prelude.Ring Prelude.Unit
instance moduloSemiringUnit :: Prelude.ModuloSemiring Prelude.Unit
instance divisionRingUnit :: Prelude.DivisionRing Prelude.Unit
instance numUnit :: Prelude.Num Prelude.Unit
instance eqUnit :: Prelude.Eq Prelude.Unit
instance ordUnit :: Prelude.Ord Prelude.Unit
instance boundedUnit :: Prelude.Bounded Prelude.Unit
instance latticeUnit :: Prelude.Lattice Prelude.Unit
instance boundedLatticeUnit :: Prelude.BoundedLattice Prelude.Unit
instance complementedLatticeUnit :: Prelude.ComplementedLattice Prelude.Unit
instance distributiveLatticeUnit :: Prelude.DistributiveLattice Prelude.Unit
instance booleanAlgebraUnit :: Prelude.BooleanAlgebra Prelude.Unit
instance showUnit :: Prelude.Show Prelude.Unit
-- | <p><code>unit</code> is the sole inhabitant of the <code>Unit</code> type.</p>
unit :: Prelude.Unit
-- | <p>Applies a function to its argument.</p>
-- | <pre class="purescript"><code>length $ groupBy productCategory $ filter isInStock $ products
-- | </code></pre>
-- | <p>is equivalent to:</p>
-- | <pre class="purescript"><code>length (groupBy productCategory (filter isInStock products))
-- | </code></pre>
-- | <p><code>($)</code> is different from <a href="#-2"><code>(#)</code></a> because it is right-infix instead of
-- | left: <code>a $ b $ c $ d x = a $ (b $ (c $ (d $ x))) = a (b (c (d x)))</code></p>
($) :: forall a b. (a -> b) -> a -> b
-- | <p>Applies an argument to a function.</p>
-- | <pre class="purescript"><code>products # filter isInStock # groupBy productCategory # length
-- | </code></pre>
-- | <p>is equivalent to:</p>
-- | <pre class="purescript"><code>length (groupBy productCategory (filter isInStock products))
-- | </code></pre>
-- | <p><code>(#)</code> is different from <a href="#-1"><code>($)</code></a> because it is left-infix instead of
-- | right: <code>x # a # b # c # d = (((x # a) # b) # c) # d = d (c (b (a x)))</code></p>
(#) :: forall a b. a -> (a -> b) -> b
-- | <p>Flips the order of the arguments to a function of two arguments.</p>
-- | <pre class="purescript"><code>flip const 1 2 = const 2 1 = 2
-- | </code></pre>
flip :: forall a b c. (a -> b -> c) -> b -> a -> c
-- | <p>Returns its first argument and ignores its second.</p>
-- | <pre class="purescript"><code>const 1 &quot;hello&quot; = 1
-- | </code></pre>
const :: forall a b. a -> b -> a
-- | <p>This function returns its first argument, and can be used to assert type
-- | equalities. This can be useful when types are otherwise ambiguous.</p>
-- | <pre class="purescript"><code>main = print $ [] `asTypeOf` [0]
-- | </code></pre>
-- | <p>If instead, we had written <code>main = print []</code>, the type of the argument
-- | <code>[]</code> would have been ambiguous, resulting in a compile-time error.</p>
asTypeOf :: forall a. a -> a -> a
-- | <p>An alias for <code>true</code>, which can be useful in guard clauses:</p>
-- | <pre class="purescript"><code>max x y | x &gt;= y = x
-- | | otherwise = y
-- | </code></pre>
otherwise :: Boolean
-- | <p>A <code>Semigroupoid</code> is similar to a <a href="#category"><code>Category</code></a> but does not
-- | require an identity element <code>id</code>, just composable morphisms.</p>
-- | <p><code>Semigroupoid</code>s must satisfy the following law:</p>
-- | <ul>
-- | <li>Associativity: <code>p &lt;&lt;&lt; (q &lt;&lt;&lt; r) = (p &lt;&lt;&lt; q) &lt;&lt;&lt; r</code></li>
-- | </ul>
-- | <p>One example of a <code>Semigroupoid</code> is the function type constructor <code>(-&gt;)</code>,
-- | with <code>(&lt;&lt;&lt;)</code> defined as function composition.</p>
class Prelude.Semigroupoid a where
compose :: forall b c d a. (Prelude.Semigroupoid a) => a c d -> a b c -> a b d
instance semigroupoidFn :: Prelude.Semigroupoid Function
(<<<) :: forall a b c d. (Prelude.Semigroupoid a) => a c d -> a b c -> a b d
-- | <p>Forwards composition, or <code>(&lt;&lt;&lt;)</code> with its arguments reversed.</p>
(>>>) :: forall a b c d. (Prelude.Semigroupoid a) => a b c -> a c d -> a b d
-- | <p><code>Category</code>s consist of objects and composable morphisms between them, and
-- | as such are <a href="#semigroupoid"><code>Semigroupoids</code></a>, but unlike <code>semigroupoids</code>
-- | must have an identity element.</p>
-- | <p>Instances must satisfy the following law in addition to the
-- | <code>Semigroupoid</code> law:</p>
-- | <ul>
-- | <li>Identity: <code>id &lt;&lt;&lt; p = p &lt;&lt;&lt; id = p</code></li>
-- | </ul>
class (Prelude.Semigroupoid a) <= Prelude.Category a where
id :: forall t a. (Prelude.Category a) => a t t
instance categoryFn :: Prelude.Category Function
-- | <p>A <code>Functor</code> is a type constructor which supports a mapping operation
-- | <code>(&lt;$&gt;)</code>.</p>
-- | <p><code>(&lt;$&gt;)</code> can be used to turn functions <code>a -&gt; b</code> into functions
-- | <code>f a -&gt; f b</code> whose argument and return types use the type constructor <code>f</code>
-- | to represent some computational context.</p>
-- | <p>Instances must satisfy the following laws:</p>
-- | <ul>
-- | <li>Identity: <code>(&lt;$&gt;) id = id</code></li>
-- | <li>Composition: <code>(&lt;$&gt;) (f &lt;&lt;&lt; g) = (f &lt;$&gt;) &lt;&lt;&lt; (g &lt;$&gt;)</code></li>
-- | </ul>
class Prelude.Functor f where
map :: forall a b f. (Prelude.Functor f) => (a -> b) -> f a -> f b
instance functorFn :: Prelude.Functor (Function r)
instance functorArray :: Prelude.Functor Array
(<$>) :: forall f a b. (Prelude.Functor f) => (a -> b) -> f a -> f b
-- | <p><code>(&lt;#&gt;)</code> is <code>(&lt;$&gt;)</code> with its arguments reversed. For example:</p>
-- | <pre class="purescript"><code>[1, 2, 3] &lt;#&gt; \n -&gt; n * n
-- | </code></pre>
(<#>) :: forall f a b. (Prelude.Functor f) => f a -> (a -> b) -> f b
-- | <p>The <code>void</code> function is used to ignore the type wrapped by a
-- | <a href="#functor"><code>Functor</code></a>, replacing it with <code>Unit</code> and keeping only the type
-- | information provided by the type constructor itself.</p>
-- | <p><code>void</code> is often useful when using <code>do</code> notation to change the return type
-- | of a monadic computation:</p>
-- | <pre class="purescript"><code>main = forE 1 10 \n -&gt; void do
-- | print n
-- | print (n * n)
-- | </code></pre>
void :: forall f a. (Prelude.Functor f) => f a -> f Prelude.Unit
-- | <p>The <code>Apply</code> class provides the <code>(&lt;*&gt;)</code> which is used to apply a function
-- | to an argument under a type constructor.</p>
-- | <p><code>Apply</code> can be used to lift functions of two or more arguments to work on
-- | values wrapped with the type constructor <code>f</code>. It might also be understood
-- | in terms of the <code>lift2</code> function:</p>
-- | <pre class="purescript"><code>lift2 :: forall f a b c. (Apply f) =&gt; (a -&gt; b -&gt; c) -&gt; f a -&gt; f b -&gt; f c
-- | lift2 f a b = f &lt;$&gt; a &lt;*&gt; b
-- | </code></pre>
-- | <p><code>(&lt;*&gt;)</code> is recovered from <code>lift2</code> as <code>lift2 ($)</code>. That is, <code>(&lt;*&gt;)</code> lifts
-- | the function application operator <code>($)</code> to arguments wrapped with the
-- | type constructor <code>f</code>.</p>
-- | <p>Instances must satisfy the following law in addition to the <code>Functor</code>
-- | laws:</p>
-- | <ul>
-- | <li>Associative composition: <code>(&lt;&lt;&lt;) &lt;$&gt; f &lt;*&gt; g &lt;*&gt; h = f &lt;*&gt; (g &lt;*&gt; h)</code></li>
-- | </ul>
-- | <p>Formally, <code>Apply</code> represents a strong lax semi-monoidal endofunctor.</p>
class (Prelude.Functor f) <= Prelude.Apply f where
apply :: forall a b f. (Prelude.Apply f) => f (a -> b) -> f a -> f b
instance applyFn :: Prelude.Apply (Function r)
instance applyArray :: Prelude.Apply Array
(<*>) :: forall f a b. (Prelude.Apply f) => f (a -> b) -> f a -> f b
-- | <p>The <code>Applicative</code> type class extends the <a href="#apply"><code>Apply</code></a> type class
-- | with a <code>pure</code> function, which can be used to create values of type <code>f a</code>
-- | from values of type <code>a</code>.</p>
-- | <p>Where <a href="#apply"><code>Apply</code></a> provides the ability to lift functions of two or
-- | more arguments to functions whose arguments are wrapped using <code>f</code>, and
-- | <a href="#functor"><code>Functor</code></a> provides the ability to lift functions of one
-- | argument, <code>pure</code> can be seen as the function which lifts functions of
-- | <em>zero</em> arguments. That is, <code>Applicative</code> functors support a lifting
-- | operation for any number of function arguments.</p>
-- | <p>Instances must satisfy the following laws in addition to the <code>Apply</code>
-- | laws:</p>
-- | <ul>
-- | <li>Identity: <code>(pure id) &lt;*&gt; v = v</code></li>
-- | <li>Composition: <code>(pure &lt;&lt;&lt;) &lt;*&gt; f &lt;*&gt; g &lt;*&gt; h = f &lt;*&gt; (g &lt;*&gt; h)</code></li>
-- | <li>Homomorphism: <code>(pure f) &lt;*&gt; (pure x) = pure (f x)</code></li>
-- | <li>Interchange: <code>u &lt;*&gt; (pure y) = (pure ($ y)) &lt;*&gt; u</code></li>
-- | </ul>
class (Prelude.Apply f) <= Prelude.Applicative f where
pure :: forall a f. (Prelude.Applicative f) => a -> f a
instance applicativeFn :: Prelude.Applicative (Function r)
instance applicativeArray :: Prelude.Applicative Array
-- | <p><code>return</code> is an alias for <code>pure</code>.</p>
return :: forall m a. (Prelude.Applicative m) => a -> m a
-- | <p><code>liftA1</code> provides a default implementation of <code>(&lt;$&gt;)</code> for any
-- | <a href="#applicative"><code>Applicative</code></a> functor, without using <code>(&lt;$&gt;)</code> as provided
-- | by the <a href="#functor"><code>Functor</code></a>-<a href="#applicative"><code>Applicative</code></a> superclass
-- | relationship.</p>
-- | <p><code>liftA1</code> can therefore be used to write <a href="#functor"><code>Functor</code></a> instances
-- | as follows:</p>
-- | <pre class="purescript"><code>instance functorF :: Functor F where
-- | map = liftA1
-- | </code></pre>
liftA1 :: forall f a b. (Prelude.Applicative f) => (a -> b) -> f a -> f b
-- | <p>The <code>Bind</code> type class extends the <a href="#apply"><code>Apply</code></a> type class with a
-- | &quot;bind&quot; operation <code>(&gt;&gt;=)</code> which composes computations in sequence, using
-- | the return value of one computation to determine the next computation.</p>
-- | <p>The <code>&gt;&gt;=</code> operator can also be expressed using <code>do</code> notation, as follows:</p>
-- | <pre class="purescript"><code>x &gt;&gt;= f = do y &lt;- x
-- | f y
-- | </code></pre>
-- | <p>where the function argument of <code>f</code> is given the name <code>y</code>.</p>
-- | <p>Instances must satisfy the following law in addition to the <code>Apply</code>
-- | laws:</p>
-- | <ul>
-- | <li>Associativity: <code>(x &gt;&gt;= f) &gt;&gt;= g = x &gt;&gt;= (\k =&gt; f k &gt;&gt;= g)</code></li>
-- | </ul>
-- | <p>Associativity tells us that we can regroup operations which use <code>do</code>
-- | notation so that we can unambiguously write, for example:</p>
-- | <pre class="purescript"><code>do x &lt;- m1
-- | y &lt;- m2 x
-- | m3 x y
-- | </code></pre>
class (Prelude.Apply m) <= Prelude.Bind m where
bind :: forall a b m. (Prelude.Bind m) => m a -> (a -> m b) -> m b
instance bindFn :: Prelude.Bind (Function r)
instance bindArray :: Prelude.Bind Array
(>>=) :: forall m a b. (Prelude.Bind m) => m a -> (a -> m b) -> m b
-- | <p>The <code>Monad</code> type class combines the operations of the <code>Bind</code> and
-- | <code>Applicative</code> type classes. Therefore, <code>Monad</code> instances represent type
-- | constructors which support sequential composition, and also lifting of
-- | functions of arbitrary arity.</p>
-- | <p>Instances must satisfy the following laws in addition to the
-- | <code>Applicative</code> and <code>Bind</code> laws:</p>
-- | <ul>
-- | <li>Left Identity: <code>pure x &gt;&gt;= f = f x</code></li>
-- | <li>Right Identity: <code>x &gt;&gt;= pure = x</code></li>
-- | </ul>
class (Prelude.Applicative m, Prelude.Bind m) <= Prelude.Monad m
instance monadFn :: Prelude.Monad (Function r)
instance monadArray :: Prelude.Monad Array
-- | <p><code>liftM1</code> provides a default implementation of <code>(&lt;$&gt;)</code> for any
-- | <a href="#monad"><code>Monad</code></a>, without using <code>(&lt;$&gt;)</code> as provided by the
-- | <a href="#functor"><code>Functor</code></a>-<a href="#monad"><code>Monad</code></a> superclass relationship.</p>
-- | <p><code>liftM1</code> can therefore be used to write <a href="#functor"><code>Functor</code></a> instances
-- | as follows:</p>
-- | <pre class="purescript"><code>instance functorF :: Functor F where
-- | map = liftM1
-- | </code></pre>
liftM1 :: forall m a b. (Prelude.Monad m) => (a -> b) -> m a -> m b
-- | <p><code>ap</code> provides a default implementation of <code>(&lt;*&gt;)</code> for any
-- | <a href="#monad"><code>Monad</code></a>, without using <code>(&lt;*&gt;)</code> as provided by the
-- | <a href="#apply"><code>Apply</code></a>-<a href="#monad"><code>Monad</code></a> superclass relationship.</p>
-- | <p><code>ap</code> can therefore be used to write <a href="#apply"><code>Apply</code></a> instances as
-- | follows:</p>
-- | <pre class="purescript"><code>instance applyF :: Apply F where
-- | apply = ap
-- | </code></pre>
ap :: forall m a b. (Prelude.Monad m) => m (a -> b) -> m a -> m b
-- | <p>The <code>Semigroup</code> type class identifies an associative operation on a type.</p>
-- | <p>Instances are required to satisfy the following law:</p>
-- | <ul>
-- | <li>Associativity: <code>(x &lt;&gt; y) &lt;&gt; z = x &lt;&gt; (y &lt;&gt; z)</code></li>
-- | </ul>
-- | <p>One example of a <code>Semigroup</code> is <code>String</code>, with <code>(&lt;&gt;)</code> defined as string
-- | concatenation.</p>
class Prelude.Semigroup a where
append :: forall a. (Prelude.Semigroup a) => a -> a -> a
instance semigroupString :: Prelude.Semigroup String
instance semigroupUnit :: Prelude.Semigroup Prelude.Unit
instance semigroupFn :: (Prelude.Semigroup s') => Prelude.Semigroup (s -> s')
instance semigroupOrdering :: Prelude.Semigroup Prelude.Ordering
instance semigroupArray :: Prelude.Semigroup (Array a)
-- | <p><code>(&lt;&gt;)</code> is an alias for <code>append</code>.</p>
(<>) :: forall s. (Prelude.Semigroup s) => s -> s -> s
-- | <p><code>(++)</code> is an alias for <code>append</code>.</p>
(++) :: forall s. (Prelude.Semigroup s) => s -> s -> s
-- | <p>The <code>Semiring</code> class is for types that support an addition and
-- | multiplication operation.</p>
-- | <p>Instances must satisfy the following laws:</p>
-- | <ul>
-- | <li>Commutative monoid under addition:
-- | <ul>
-- | <li>Associativity: <code>(a + b) + c = a + (b + c)</code></li>
-- | <li>Identity: <code>zero + a = a + zero = a</code></li>
-- | <li>Commutative: <code>a + b = b + a</code></li>
-- | </ul></li>
-- | <li>Monoid under multiplication:
-- | <ul>
-- | <li>Associativity: <code>(a * b) * c = a * (b * c)</code></li>
-- | <li>Identity: <code>one * a = a * one = a</code></li>
-- | </ul></li>
-- | <li>Multiplication distributes over addition:
-- | <ul>
-- | <li>Left distributivity: <code>a * (b + c) = (a * b) + (a * c)</code></li>
-- | <li>Right distributivity: <code>(a + b) * c = (a * c) + (b * c)</code></li>
-- | </ul></li>
-- | <li>Annihiliation: <code>zero * a = a * zero = zero</code></li>
-- | </ul>
class Prelude.Semiring a where
add :: forall a. (Prelude.Semiring a) => a -> a -> a
zero :: forall a. (Prelude.Semiring a) => a
mul :: forall a. (Prelude.Semiring a) => a -> a -> a
one :: forall a. (Prelude.Semiring a) => a
instance semiringInt :: Prelude.Semiring Int
instance semiringNumber :: Prelude.Semiring Number
instance semiringUnit :: Prelude.Semiring Prelude.Unit
-- | <p><code>(+)</code> is an alias for <code>add</code>.</p>
(+) :: forall a. (Prelude.Semiring a) => a -> a -> a
-- | <p><code>(*)</code> is an alias for <code>mul</code>.</p>
(*) :: forall a. (Prelude.Semiring a) => a -> a -> a
-- | <p>The <code>Ring</code> class is for types that support addition, multiplication,
-- | and subtraction operations.</p>
-- | <p>Instances must satisfy the following law in addition to the <code>Semiring</code>
-- | laws:</p>
-- | <ul>
-- | <li>Additive inverse: <code>a + (-a) = (-a) + a = zero</code></li>
-- | </ul>
class (Prelude.Semiring a) <= Prelude.Ring a where
sub :: forall a. (Prelude.Ring a) => a -> a -> a
instance ringInt :: Prelude.Ring Int
instance ringNumber :: Prelude.Ring Number
instance ringUnit :: Prelude.Ring Prelude.Unit
-- | <p><code>(-)</code> is an alias for <code>sub</code>.</p>
(-) :: forall a. (Prelude.Ring a) => a -> a -> a
negate :: forall a. (Prelude.Ring a) => a -> a
-- | <p>The <code>ModuloSemiring</code> class is for types that support addition,
-- | multiplication, division, and modulo (division remainder) operations.</p>
-- | <p>Instances must satisfy the following law in addition to the <code>Semiring</code>
-- | laws:</p>
-- | <ul>
-- | <li>Remainder: <code>a / b * b + (a</code>mod<code>b) = a</code></li>
-- | </ul>
class (Prelude.Semiring a) <= Prelude.ModuloSemiring a where
div :: forall a. (Prelude.ModuloSemiring a) => a -> a -> a
mod :: forall a. (Prelude.ModuloSemiring a) => a -> a -> a
instance moduloSemiringInt :: Prelude.ModuloSemiring Int
instance moduloSemiringNumber :: Prelude.ModuloSemiring Number
instance moduloSemiringUnit :: Prelude.ModuloSemiring Prelude.Unit
-- | <p><code>(/)</code> is an alias for <code>div</code>.</p>
(/) :: forall a. (Prelude.ModuloSemiring a) => a -> a -> a
-- | <p>A <code>Ring</code> where every nonzero element has a multiplicative inverse.</p>
-- | <p>Instances must satisfy the following law in addition to the <code>Ring</code> and
-- | <code>ModuloSemiring</code> laws:</p>
-- | <ul>
-- | <li>Multiplicative inverse: <code>(one / x) * x = one</code></li>
-- | </ul>
-- | <p>As a consequence of this <code>a `mod` b = zero</code> as no divide operation
-- | will have a remainder.</p>
class (Prelude.Ring a, Prelude.ModuloSemiring a) <= Prelude.DivisionRing a
instance divisionRingNumber :: Prelude.DivisionRing Number
instance divisionRingUnit :: Prelude.DivisionRing Prelude.Unit
-- | <p>The <code>Num</code> class is for types that are commutative fields.</p>
-- | <p>Instances must satisfy the following law in addition to the
-- | <code>DivisionRing</code> laws:</p>
-- | <ul>
-- | <li>Commutative multiplication: <code>a * b = b * a</code></li>
-- | </ul>
class (Prelude.DivisionRing a) <= Prelude.Num a
instance numNumber :: Prelude.Num Number
instance numUnit :: Prelude.Num Prelude.Unit
-- | <p>The <code>Eq</code> type class represents types which support decidable equality.</p>
-- | <p><code>Eq</code> instances should satisfy the following laws:</p>
-- | <ul>
-- | <li>Reflexivity: <code>x == x = true</code></li>
-- | <li>Symmetry: <code>x == y = y == x</code></li>
-- | <li>Transitivity: if <code>x == y</code> and <code>y == z</code> then <code>x == z</code></li>
-- | </ul>
class Prelude.Eq a where
eq :: forall a. (Prelude.Eq a) => a -> a -> Boolean
instance eqBoolean :: Prelude.Eq Boolean
instance eqInt :: Prelude.Eq Int
instance eqNumber :: Prelude.Eq Number
instance eqChar :: Prelude.Eq Char
instance eqString :: Prelude.Eq String
instance eqUnit :: Prelude.Eq Prelude.Unit
instance eqArray :: (Prelude.Eq a) => Prelude.Eq (Array a)
instance eqOrdering :: Prelude.Eq Prelude.Ordering
-- | <p><code>(==)</code> is an alias for <code>eq</code>.</p>
(==) :: forall a. (Prelude.Eq a) => a -> a -> Boolean
(/=) :: forall a. (Prelude.Eq a) => a -> a -> Boolean
-- | <p>The <code>Ordering</code> data type represents the three possible outcomes of
-- | comparing two values:</p>
-- | <p><code>LT</code> - The first value is <em>less than</em> the second.
-- | <code>GT</code> - The first value is <em>greater than</em> the second.
-- | <code>EQ</code> - The first value is <em>equal to</em> or <em>incomparable to</em> the second.</p>
data Prelude.Ordering
LT :: Prelude.Ordering
GT :: Prelude.Ordering
EQ :: Prelude.Ordering
instance semigroupOrdering :: Prelude.Semigroup Prelude.Ordering
instance eqOrdering :: Prelude.Eq Prelude.Ordering
instance ordOrdering :: Prelude.Ord Prelude.Ordering
instance boundedOrdering :: Prelude.Bounded Prelude.Ordering
instance showOrdering :: Prelude.Show Prelude.Ordering
-- | <p>The <code>Ord</code> type class represents types which support comparisons.</p>
-- | <p><code>Ord</code> instances should satisfy the laws of <em>partially orderings</em>:</p>
-- | <ul>
-- | <li>Reflexivity: <code>a &lt;= a</code></li>
-- | <li>Antisymmetry: if <code>a &lt;= b</code> and <code>b &lt;= a</code> then <code>a = b</code></li>
-- | <li>Transitivity: if <code>a &lt;= b</code> and <code>b &lt;= c</code> then <code>a &lt;= c</code></li>
-- | </ul>
class (Prelude.Eq a) <= Prelude.Ord a where
compare :: forall a. (Prelude.Ord a) => a -> a -> Prelude.Ordering
instance ordBoolean :: Prelude.Ord Boolean
instance ordInt :: Prelude.Ord Int
instance ordNumber :: Prelude.Ord Number
instance ordString :: Prelude.Ord String
instance ordChar :: Prelude.Ord Char
instance ordUnit :: Prelude.Ord Prelude.Unit
instance ordArray :: (Prelude.Ord a) => Prelude.Ord (Array a)
instance ordOrdering :: Prelude.Ord Prelude.Ordering
-- | <p>Test whether one value is <em>strictly less than</em> another.</p>
(<) :: forall a. (Prelude.Ord a) => a -> a -> Boolean
-- | <p>Test whether one value is <em>strictly greater than</em> another.</p>
(>) :: forall a. (Prelude.Ord a) => a -> a -> Boolean
-- | <p>Test whether one value is <em>non-strictly less than</em> another.</p>
(<=) :: forall a. (Prelude.Ord a) => a -> a -> Boolean
-- | <p>Test whether one value is <em>non-strictly greater than</em> another.</p>
(>=) :: forall a. (Prelude.Ord a) => a -> a -> Boolean
-- | <p>The <code>Bounded</code> type class represents types that are finite partially
-- | ordered sets.</p>
-- | <p>Instances should satisfy the following law in addition to the <code>Ord</code> laws:</p>
-- | <ul>
-- | <li>Ordering: <code>bottom &lt;= a &lt;= top</code></li>
-- | </ul>
class (Prelude.Ord a) <= Prelude.Bounded a where
top :: forall a. (Prelude.Bounded a) => a
bottom :: forall a. (Prelude.Bounded a) => a
instance boundedBoolean :: Prelude.Bounded Boolean
instance boundedUnit :: Prelude.Bounded Prelude.Unit
instance boundedOrdering :: Prelude.Bounded Prelude.Ordering
instance boundedInt :: Prelude.Bounded Int
-- | <p>The <code>Lattice</code> type class represents types that are partially ordered
-- | sets with a supremum (<code>sup</code> or <code>||</code>) and infimum (<code>inf</code> or <code>&amp;&amp;</code>).</p>
-- | <p>Instances should satisfy the following laws in addition to the <code>Ord</code>
-- | laws:</p>
-- | <ul>
-- | <li>Supremum:
-- | <ul>
-- | <li><code>a || b &gt;= a</code></li>
-- | <li><code>a || b &gt;= b</code></li>
-- | </ul></li>
-- | <li>Infimum:
-- | <ul>
-- | <li><code>a &amp;&amp; b &lt;= a</code></li>
-- | <li><code>a &amp;&amp; b &lt;= b</code></li>
-- | </ul></li>
-- | <li>Associativity:
-- | <ul>
-- | <li><code>a || (b || c) = (a || b) || c</code></li>
-- | <li><code>a &amp;&amp; (b &amp;&amp; c) = (a &amp;&amp; b) &amp;&amp; c</code></li>
-- | </ul></li>
-- | <li>Commutativity:
-- | <ul>
-- | <li><code>a || b = b || a</code></li>
-- | <li><code>a &amp;&amp; b = b &amp;&amp; a</code></li>
-- | </ul></li>
-- | <li>Absorption:
-- | <ul>
-- | <li><code>a || (a &amp;&amp; b) = a</code></li>
-- | <li><code>a &amp;&amp; (a || b) = a</code></li>
-- | </ul></li>
-- | <li>Idempotent:
-- | <ul>
-- | <li><code>a || a = a</code></li>
-- | <li><code>a &amp;&amp; a = a</code></li>
-- | </ul></li>
-- | </ul>
class (Prelude.Ord a) <= Prelude.Lattice a where
sup :: forall a. (Prelude.Lattice a) => a -> a -> a
inf :: forall a. (Prelude.Lattice a) => a -> a -> a
instance latticeBoolean :: Prelude.Lattice Boolean
instance latticeUnit :: Prelude.Lattice Prelude.Unit
-- | <p>The <code>sup</code> operator.</p>
(||) :: forall a. (Prelude.Lattice a) => a -> a -> a
-- | <p>The <code>inf</code> operator.</p>
(&&) :: forall a. (Prelude.Lattice a) => a -> a -> a
-- | <p>The <code>BoundedLattice</code> type class represents types that are finite
-- | lattices.</p>
-- | <p>Instances should satisfy the following law in addition to the <code>Lattice</code>
-- | and <code>Bounded</code> laws:</p>
-- | <ul>
-- | <li>Identity:
-- | <ul>
-- | <li><code>a || bottom = a</code></li>
-- | <li><code>a &amp;&amp; top = a</code></li>
-- | </ul></li>
-- | <li>Annihiliation:
-- | <ul>
-- | <li><code>a || top = top</code></li>
-- | <li><code>a &amp;&amp; bottom = bottom</code></li>
-- | </ul></li>
-- | </ul>
class (Prelude.Bounded a, Prelude.Lattice a) <= Prelude.BoundedLattice a
instance boundedLatticeBoolean :: Prelude.BoundedLattice Boolean
instance boundedLatticeUnit :: Prelude.BoundedLattice Prelude.Unit
-- | <p>The <code>ComplementedLattice</code> type class represents types that are lattices
-- | where every member is also uniquely complemented.</p>
-- | <p>Instances should satisfy the following law in addition to the
-- | <code>BoundedLattice</code> laws:</p>
-- | <ul>
-- | <li>Complemented:
-- | <ul>
-- | <li><code>not a || a == top</code></li>
-- | <li><code>not a &amp;&amp; a == bottom</code></li>
-- | </ul></li>
-- | <li>Double negation:
-- | <ul>
-- | <li><code>not &lt;&lt;&lt; not == id</code></li>
-- | </ul></li>
-- | </ul>
class (Prelude.BoundedLattice a) <= Prelude.ComplementedLattice a where
not :: forall a. (Prelude.ComplementedLattice a) => a -> a
instance complementedLatticeBoolean :: Prelude.ComplementedLattice Boolean
instance complementedLatticeUnit :: Prelude.ComplementedLattice Prelude.Unit
-- | <p>The <code>DistributiveLattice</code> type class represents types that are lattices
-- | where the <code>&amp;&amp;</code> and <code>||</code> distribute over each other.</p>
-- | <p>Instances should satisfy the following law in addition to the <code>Lattice</code>
-- | laws:</p>
-- | <ul>
-- | <li>Distributivity: <code>x &amp;&amp; (y || z) = (x &amp;&amp; y) || (x &amp;&amp; z)</code></li>
-- | </ul>
class (Prelude.Lattice a) <= Prelude.DistributiveLattice a
instance distributiveLatticeBoolean :: Prelude.DistributiveLattice Boolean
instance distributiveLatticeUnit :: Prelude.DistributiveLattice Prelude.Unit
-- | <p>The <code>BooleanAlgebra</code> type class represents types that are Boolean
-- | algebras, also known as Boolean lattices.</p>
-- | <p>Instances should satisfy the <code>ComplementedLattice</code> and
-- | <code>DistributiveLattice</code> laws.</p>
class (Prelude.ComplementedLattice a, Prelude.DistributiveLattice a) <= Prelude.BooleanAlgebra a
instance booleanAlgebraBoolean :: Prelude.BooleanAlgebra Boolean
instance booleanAlgebraUnit :: Prelude.BooleanAlgebra Prelude.Unit
-- | <p>The <code>Show</code> type class represents those types which can be converted into
-- | a human-readable <code>String</code> representation.</p>
-- | <p>While not required, it is recommended that for any expression <code>x</code>, the
-- | string <code>show x</code> be executable PureScript code which evaluates to the same
-- | value as the expression <code>x</code>.</p>
class Prelude.Show a where
show :: forall a. (Prelude.Show a) => a -> String
instance showBoolean :: Prelude.Show Boolean
instance showInt :: Prelude.Show Int
instance showNumber :: Prelude.Show Number
instance showChar :: Prelude.Show Char
instance showString :: Prelude.Show String
instance showUnit :: Prelude.Show Prelude.Unit
instance showArray :: (Prelude.Show a) => Prelude.Show (Array a)
instance showOrdering :: Prelude.Show Prelude.Ordering
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment