2023-06-11 15:28:01 +03:00
|
|
|
Main> Prelude.(==) : Eq ty => ty -> ty -> Bool
|
2021-04-21 11:39:18 +03:00
|
|
|
Totality: total
|
2022-03-25 02:11:10 +03:00
|
|
|
Visibility: public export
|
2021-04-21 11:39:18 +03:00
|
|
|
Fixity Declaration: infix operator, level 6
|
|
|
|
Main> Prelude.negate : Neg ty => ty -> ty
|
|
|
|
The underlying of unary minus. `-5` desugars to `negate (fromInteger 5)`.
|
|
|
|
Totality: total
|
2022-03-25 02:11:10 +03:00
|
|
|
Visibility: public export
|
2021-04-21 11:39:18 +03:00
|
|
|
Fixity Declaration: prefix operator, level 10
|
2023-06-11 15:28:01 +03:00
|
|
|
Prelude.(-) : Neg ty => ty -> ty -> ty
|
2021-04-21 11:39:18 +03:00
|
|
|
Totality: total
|
2022-03-25 02:11:10 +03:00
|
|
|
Visibility: public export
|
2021-04-21 11:39:18 +03:00
|
|
|
Fixity Declarations:
|
|
|
|
infixl operator, level 8
|
|
|
|
prefix operator, level 10
|
2023-06-11 15:28:01 +03:00
|
|
|
Main> Prelude.(<$>) : Functor f => (a -> b) -> f a -> f b
|
2021-04-21 11:39:18 +03:00
|
|
|
An infix alias for `map`, applying a function across everything of type 'a'
|
|
|
|
in a parameterised type.
|
|
|
|
@ f the parameterised type
|
|
|
|
@ func the function to apply
|
|
|
|
Totality: total
|
2022-03-25 02:11:10 +03:00
|
|
|
Visibility: public export
|
2021-04-21 11:39:18 +03:00
|
|
|
Fixity Declaration: infixr operator, level 4
|
2021-08-19 13:38:14 +03:00
|
|
|
Main> interface Prelude.Monad : (Type -> Type) -> Type
|
2021-11-02 18:34:52 +03:00
|
|
|
Monad
|
|
|
|
@m The underlying functor
|
|
|
|
A minimal definition includes either `(>>=)` or `join`.
|
2021-04-21 11:39:18 +03:00
|
|
|
Parameters: m
|
|
|
|
Constraints: Applicative m
|
2021-08-13 18:00:54 +03:00
|
|
|
Constructor: MkMonad
|
2021-04-21 11:39:18 +03:00
|
|
|
Methods:
|
2021-04-26 17:59:00 +03:00
|
|
|
(>>=) : m a -> (a -> m b) -> m b
|
2021-04-21 11:39:18 +03:00
|
|
|
Also called `bind`.
|
2021-08-13 18:00:54 +03:00
|
|
|
Fixity Declaration: infixl operator, level 1
|
2021-04-21 11:39:18 +03:00
|
|
|
join : m (m a) -> m a
|
|
|
|
Also called `flatten` or mu.
|
|
|
|
Implementations:
|
|
|
|
Monad IO
|
|
|
|
Monoid a => Monad (Pair a)
|
|
|
|
Monad Maybe
|
|
|
|
Monad (Either e)
|
|
|
|
Monad List
|
|
|
|
Main> Prelude.div : Integral ty => ty -> ty -> ty
|
|
|
|
Totality: total
|
2022-03-25 02:11:10 +03:00
|
|
|
Visibility: public export
|
2021-04-21 11:39:18 +03:00
|
|
|
Fixity Declaration: infixl operator, level 9
|
2023-06-11 15:28:01 +03:00
|
|
|
Main> Prelude.(>>=) : Monad m => m a -> (a -> m b) -> m b
|
2021-04-21 11:39:18 +03:00
|
|
|
Also called `bind`.
|
|
|
|
Totality: total
|
2022-03-25 02:11:10 +03:00
|
|
|
Visibility: public export
|
2021-04-21 11:39:18 +03:00
|
|
|
Fixity Declaration: infixl operator, level 1
|
2023-06-11 15:28:01 +03:00
|
|
|
Main> Prelude.(>>) : Monad m => m () -> Lazy (m b) -> m b
|
2021-04-21 11:39:18 +03:00
|
|
|
Sequencing of effectful composition
|
|
|
|
Totality: total
|
2022-03-25 02:11:10 +03:00
|
|
|
Visibility: public export
|
2021-04-21 11:39:18 +03:00
|
|
|
Fixity Declaration: infixl operator, level 1
|
2023-06-11 15:28:01 +03:00
|
|
|
Main> Main> Main> Main> Main.(@@) : (t : a) -> (u : a ** t = u)
|
2022-03-25 02:11:10 +03:00
|
|
|
Visibility: private
|
2021-04-21 11:39:18 +03:00
|
|
|
Fixity Declaration: prefix operator, level 10
|
2023-06-11 15:28:01 +03:00
|
|
|
Main> Prelude.(<$) : Functor f => b -> f a -> f b
|
2021-04-21 11:39:18 +03:00
|
|
|
Run something for effects, replacing the return value with a given parameter.
|
|
|
|
Totality: total
|
2022-03-25 02:11:10 +03:00
|
|
|
Visibility: public export
|
2021-04-21 11:39:18 +03:00
|
|
|
Fixity Declaration: infixr operator, level 4
|
|
|
|
Main>
|
|
|
|
Bye for now!
|