Whine.Runner.Prelude  
- Package
- purescript-whine-core
- Repository
- collegevine/purescript-whine
#Env Source
type Env = { logLevel :: LogSeverity }Re-exports from Control.Monad.Error.Class   
#MonadError Source
class MonadError :: Type -> (Type -> Type) -> Constraintclass (MonadThrow e m) <= MonadError e m | m -> e
The MonadError type class represents those monads which support catching
errors.
- catchError x fcalls the error handler- fif an error is thrown during the evaluation of- x.
An implementation is provided for ExceptT, and for other monad transformers
defined in this library.
Laws:
- Catch: catchError (throwError e) f = f e
- Pure: catchError (pure a) f = pure a
Instances
Re-exports from Control.Monad.Reader  
#ReaderT Source
newtype ReaderT :: forall k. Type -> (k -> Type) -> k -> Typenewtype ReaderT r m a
The reader monad transformer.
This monad transformer extends the base monad transformer with a global context of
type r.
The MonadReader type class describes the operations supported by this monad.
Instances
- Newtype (ReaderT r m a) _
- (Functor m) => Functor (ReaderT r m)
- (Apply m) => Apply (ReaderT r m)
- (Applicative m) => Applicative (ReaderT r m)
- (Alt m) => Alt (ReaderT r m)
- (Plus m) => Plus (ReaderT r m)
- (Alternative m) => Alternative (ReaderT r m)
- (Bind m) => Bind (ReaderT r m)
- (Monad m) => Monad (ReaderT r m)
- (Apply m, Semigroup a) => Semigroup (ReaderT s m a)
- (Applicative m, Monoid a) => Monoid (ReaderT s m a)
- (MonadPlus m) => MonadPlus (ReaderT r m)
- MonadTrans (ReaderT r)
- (MonadEffect m) => MonadEffect (ReaderT r m)
- (MonadCont m) => MonadCont (ReaderT r m)
- (MonadThrow e m) => MonadThrow e (ReaderT r m)
- (MonadError e m) => MonadError e (ReaderT r m)
- (Monad m) => MonadAsk r (ReaderT r m)
- (Monad m) => MonadReader r (ReaderT r m)
- (MonadState s m) => MonadState s (ReaderT r m)
- (MonadTell w m) => MonadTell w (ReaderT r m)
- (MonadWriter w m) => MonadWriter w (ReaderT r m)
- (Distributive g) => Distributive (ReaderT e g)
- (MonadRec m) => MonadRec (ReaderT r m)
- (MonadST s m) => MonadST s (ReaderT r m)
#runReaderT Source
runReaderT :: forall r m a. ReaderT r m a -> (r -> m a)Run a computation in the ReaderT monad.
Re-exports from Effect.Aff 
#Aff Source
data Aff t0An Aff a is an asynchronous computation with effects. The
computation may either error with an exception, or produce a result of
type a. Aff effects are assembled from primitive Effect effects using
makeAff or liftEffect.
Instances
#launchAff_ Source
launchAff_ :: Aff Unit -> Effect UnitForks an Aff from an Effect context, discarding the Fiber.
Re-exports from Effect.Aff.Class  
#MonadAff Source
class MonadAff :: (Type -> Type) -> Constraintclass (MonadEffect m) <= MonadAff m where
Members
Instances
- MonadAff Aff
- (MonadAff m) => MonadAff (ContT r m)
- (MonadAff m) => MonadAff (ExceptT e m)
- (MonadAff m) => MonadAff (ListT m)
- (MonadAff m) => MonadAff (MaybeT m)
- (MonadAff m) => MonadAff (ReaderT r m)
- (MonadAff m, Monoid w) => MonadAff (RWST r w s m)
- (MonadAff m) => MonadAff (StateT s m)
- (MonadAff m, Monoid w) => MonadAff (WriterT w m)
Re-exports from Whine.Log 
#MonadLog Source
class MonadLog :: (Type -> Type) -> Constraintclass MonadLog m where
Members
- log :: forall a. Loggable a => LogSeverity -> a -> m Unit
Re-exports from Whine.Prelude 
#WriterT Source
newtype WriterT :: Type -> (Type -> Type) -> Type -> Typenewtype WriterT w m a
The writer monad transformer.
This monad transformer extends the base monad with a monoidal accumulator of
type w.
The MonadWriter type class describes the operations supported by this monad.
Instances
- Newtype (WriterT w m a) _
- (Functor m) => Functor (WriterT w m)
- (Semigroup w, Apply m) => Apply (WriterT w m)
- (Monoid w, Applicative m) => Applicative (WriterT w m)
- (Alt m) => Alt (WriterT w m)
- (Plus m) => Plus (WriterT w m)
- (Monoid w, Alternative m) => Alternative (WriterT w m)
- (Semigroup w, Bind m) => Bind (WriterT w m)
- (Monoid w, Monad m) => Monad (WriterT w m)
- (Monoid w, MonadRec m) => MonadRec (WriterT w m)
- (Monoid w, MonadPlus m) => MonadPlus (WriterT w m)
- (Monoid w) => MonadTrans (WriterT w)
- (Monoid w, MonadEffect m) => MonadEffect (WriterT w m)
- (Monoid w, MonadCont m) => MonadCont (WriterT w m)
- (Monoid w, MonadThrow e m) => MonadThrow e (WriterT w m)
- (Monoid w, MonadError e m) => MonadError e (WriterT w m)
- (Monoid w, MonadAsk r m) => MonadAsk r (WriterT w m)
- (Monoid w, MonadReader r m) => MonadReader r (WriterT w m)
- (Monoid w, MonadState s m) => MonadState s (WriterT w m)
- (Monoid w, Monad m) => MonadTell w (WriterT w m)
- (Monoid w, Monad m) => MonadWriter w (WriterT w m)
- (Apply m, Semigroup w, Semigroup a) => Semigroup (WriterT w m a)
- (Applicative m, Monoid w, Monoid a) => Monoid (WriterT w m a)
- (Monoid w, MonadST s m) => MonadST s (WriterT w m)
#Void Source
newtype VoidAn uninhabited data type. In other words, one can never create
a runtime value of type Void because no such value exists.
Void is useful to eliminate the possibility of a value being created.
For example, a value of type Either Void Boolean can never have
a Left value created in PureScript.
This should not be confused with the keyword void that commonly appears in
C-family languages, such as Java:
public class Foo {
  void doSomething() { System.out.println("hello world!"); }
}
In PureScript, one often uses Unit to achieve similar effects as
the void of C-family languages above.
#Unit Source
data UnitThe Unit type has a single inhabitant, called unit. It represents
values with no computational content.
Unit is often used, wrapped in a monadic type constructor, as the
return type of a computation where only the effects are important.
When returning a value of type Unit from an FFI function, it is
recommended to use undefined, or not return a value at all.
#Tuple Source
data Tuple a bA simple product type for wrapping a pair of component values.
Constructors
- Tuple a b
Instances
- (Show a, Show b) => Show (Tuple a b)- Allows - Tuples to be rendered as a string with- showwhenever there are- Showinstances for both component types.
- (Eq a, Eq b) => Eq (Tuple a b)- Allows - Tuples to be checked for equality with- ==and- /=whenever there are- Eqinstances for both component types.
- (Eq a) => Eq1 (Tuple a)
- (Ord a, Ord b) => Ord (Tuple a b)- Allows - Tuples to be compared with- compare,- >,- >=,- <and- <=whenever there are- Ordinstances for both component types. To obtain the result, the- fsts are- compared, and if they are- EQual, the- snds are- compared.
- (Ord a) => Ord1 (Tuple a)
- (Bounded a, Bounded b) => Bounded (Tuple a b)
- Semigroupoid Tuple
- (Semigroup a, Semigroup b) => Semigroup (Tuple a b)- The - Semigroupinstance enables use of the associative operator- <>on- Tuples whenever there are- Semigroupinstances for the component types. The- <>operator is applied pairwise, so:- (Tuple a1 b1) <> (Tuple a2 b2) = Tuple (a1 <> a2) (b1 <> b2)
- (Monoid a, Monoid b) => Monoid (Tuple a b)
- (Semiring a, Semiring b) => Semiring (Tuple a b)
- (Ring a, Ring b) => Ring (Tuple a b)
- (CommutativeRing a, CommutativeRing b) => CommutativeRing (Tuple a b)
- (HeytingAlgebra a, HeytingAlgebra b) => HeytingAlgebra (Tuple a b)
- (BooleanAlgebra a, BooleanAlgebra b) => BooleanAlgebra (Tuple a b)
- Functor (Tuple a)- The - Functorinstance allows functions to transform the contents of a- Tuplewith the- <$>operator, applying the function to the second component, so:- f <$> (Tuple x y) = Tuple x (f y)
- Generic (Tuple a b) _
- Invariant (Tuple a)
- (Semigroup a) => Apply (Tuple a)- The - Applyinstance allows functions to transform the contents of a- Tuplewith the- <*>operator whenever there is a- Semigroupinstance for the- fstcomponent, so:- (Tuple a1 f) <*> (Tuple a2 x) == Tuple (a1 <> a2) (f x)
- (Monoid a) => Applicative (Tuple a)
- (Semigroup a) => Bind (Tuple a)
- (Monoid a) => Monad (Tuple a)
- Extend (Tuple a)
- Comonad (Tuple a)
- (Lazy a, Lazy b) => Lazy (Tuple a b)
#SourceRange Source
type SourceRange = { end :: SourcePos, start :: SourcePos }#Replacement Source
newtype ReplacementA newtype used in cases to specify a replacement for a pattern.
Constructors
Instances
#Ordering Source
data OrderingThe Ordering data type represents the three possible outcomes of
comparing two values:
LT - The first value is less than the second.
GT - The first value is greater than the second.
EQ - The first value is equal to the second.
Constructors
Instances
#Nullable Source
data Nullable t0A nullable type. This type constructor is intended to be used for interoperating with JavaScript functions which accept or return null values.
The runtime representation of Nullable T is the same as that of T,
except that it may also be null. For example, the JavaScript values
null, [], and [1,2,3] may all be given the type
Nullable (Array Int). Similarly, the JavaScript values [], [null],
and [1,2,null,3] may all be given the type Array (Nullable Int).
There is one pitfall with Nullable, which is that values of the type
Nullable T will not function as you might expect if the type T happens
to itself permit null as a valid runtime representation.
In particular, values of the type Nullable (Nullable T) will ‘collapse’,
in the sense that the PureScript expressions notNull null and null
will both leave you with a value whose runtime representation is just
null. Therefore it is important to avoid using Nullable T in
situations where T itself can take null as a runtime representation.
If in doubt, use Maybe instead.
Nullable does not permit lawful Functor, Applicative, or Monad
instances as a result of this pitfall, which is why these instances are
not provided.
Instances
#NonEmptyString Source
newtype NonEmptyStringA string that is known not to be empty.
You can use this constructor to create a NonEmptyString that isn't
non-empty, breaking the guarantee behind this newtype. It is
provided as an escape hatch mainly for the Data.NonEmpty.CodeUnits
and Data.NonEmpty.CodePoints modules. Use this at your own risk
when you know what you are doing.
Instances
#NonEmptyArray Source
newtype NonEmptyArray aAn array that is known not to be empty.
You can use the constructor to create a NonEmptyArray that isn't
non-empty, breaking the guarantee behind this newtype. It is
provided as an escape hatch mainly for the Data.Array.NonEmpty
and Data.Array modules. Use this at your own risk when you know
what you are doing.
Instances
- (Show a) => Show (NonEmptyArray a)
- (Eq a) => Eq (NonEmptyArray a)
- Eq1 NonEmptyArray
- (Ord a) => Ord (NonEmptyArray a)
- Ord1 NonEmptyArray
- Semigroup (NonEmptyArray a)
- Functor NonEmptyArray
- FunctorWithIndex Int NonEmptyArray
- Foldable NonEmptyArray
- FoldableWithIndex Int NonEmptyArray
- Foldable1 NonEmptyArray
- Unfoldable1 NonEmptyArray
- Traversable NonEmptyArray
- TraversableWithIndex Int NonEmptyArray
- Traversable1 NonEmptyArray
- Apply NonEmptyArray
- Applicative NonEmptyArray
- Bind NonEmptyArray
- Monad NonEmptyArray
- Alt NonEmptyArray
#Maybe Source
data Maybe aThe Maybe type is used to represent optional values and can be seen as
something like a type-safe null, where Nothing is null and Just x
is the non-null value x.
Constructors
Instances
- Functor Maybe- The - Functorinstance allows functions to transform the contents of a- Justwith the- <$>operator:- f <$> Just x == Just (f x)- Nothingvalues are left untouched:- f <$> Nothing == Nothing
- Apply Maybe- The - Applyinstance allows functions contained within a- Justto transform a value contained within a- Justusing the- applyoperator:- Just f <*> Just x == Just (f x)- Nothingvalues are left untouched:- Just f <*> Nothing == Nothing Nothing <*> Just x == Nothing- Combining - Functor's- <$>with- Apply's- <*>can be used transform a pure function to take- Maybe-typed arguments so- f :: a -> b -> cbecomes- f :: Maybe a -> Maybe b -> Maybe c:- f <$> Just x <*> Just y == Just (f x y)- The - Nothing-preserving behaviour of both operators means the result of an expression like the above but where any one of the values is- Nothingmeans the whole result becomes- Nothingalso:- f <$> Nothing <*> Just y == Nothing f <$> Just x <*> Nothing == Nothing f <$> Nothing <*> Nothing == Nothing
- Applicative Maybe- The - Applicativeinstance enables lifting of values into- Maybewith the- purefunction:- pure x :: Maybe _ == Just x- Combining - Functor's- <$>with- Apply's- <*>and- Applicative's- purecan be used to pass a mixture of- Maybeand non-- Maybetyped values to a function that does not usually expect them, by using- purefor any value that is not already- Maybetyped:- f <$> Just x <*> pure y == Just (f x y)- Even though - pure = Justit is recommended to use- purein situations like this as it allows the choice of- Applicativeto be changed later without having to go through and replace- Justwith a new constructor.
- Alt Maybe- The - Altinstance allows for a choice to be made between two- Maybevalues with the- <|>operator, where the first- Justencountered is taken.- Just x <|> Just y == Just x Nothing <|> Just y == Just y Nothing <|> Nothing == Nothing
- Plus Maybe- The - Plusinstance provides a default- Maybevalue:- empty :: Maybe _ == Nothing
- Alternative Maybe- The - Alternativeinstance guarantees that there are both- Applicativeand- Plusinstances for- Maybe.
- Bind Maybe- The - Bindinstance allows sequencing of- Maybevalues and functions that return a- Maybeby using the- >>=operator:- Just x >>= f = f x Nothing >>= f = Nothing
- Monad Maybe- The - Monadinstance guarantees that there are both- Applicativeand- Bindinstances for- Maybe. This also enables the- dosyntactic sugar:- do x' <- x y' <- y pure (f x' y')- Which is equivalent to: - x >>= (\x' -> y >>= (\y' -> pure (f x' y')))- Which is equivalent to: - case x of Nothing -> Nothing Just x' -> case y of Nothing -> Nothing Just y' -> Just (f x' y')
- Extend Maybe- The - Extendinstance allows sequencing of- Maybevalues and functions that accept a- Maybe aand return a non-- Mayberesult using the- <<=operator.- f <<= Nothing = Nothing f <<= x = Just (f x)
- Invariant Maybe
- (Semigroup a) => Semigroup (Maybe a)- The - Semigroupinstance enables use of the operator- <>on- Maybevalues whenever there is a- Semigroupinstance for the type the- Maybecontains. The exact behaviour of- <>depends on the "inner"- Semigroupinstance, but generally captures the notion of appending or combining things.- Just x <> Just y = Just (x <> y) Just x <> Nothing = Just x Nothing <> Just y = Just y Nothing <> Nothing = Nothing
- (Semigroup a) => Monoid (Maybe a)
- (Semiring a) => Semiring (Maybe a)
- (Eq a) => Eq (Maybe a)- The - Eqinstance allows- Maybevalues to be checked for equality with- ==and inequality with- /=whenever there is an- Eqinstance for the type the- Maybecontains.
- Eq1 Maybe
- (Ord a) => Ord (Maybe a)- The - Ordinstance allows- Maybevalues to be compared with- compare,- >,- >=,- <and- <=whenever there is an- Ordinstance for the type the- Maybecontains.- Nothingis considered to be less than any- Justvalue.
- Ord1 Maybe
- (Bounded a) => Bounded (Maybe a)
- (Show a) => Show (Maybe a)- The - Showinstance allows- Maybevalues to be rendered as a string with- showwhenever there is an- Showinstance for the type the- Maybecontains.
- Generic (Maybe a) _
#Map Source
data Map k vMap k v represents maps from keys of type k to values of type v.
Instances
- (Eq k) => Eq1 (Map k)
- (Eq k, Eq v) => Eq (Map k v)
- (Ord k) => Ord1 (Map k)
- (Ord k, Ord v) => Ord (Map k v)
- (Show k, Show v) => Show (Map k v)
- (Warn (Text "Data.Map\'s `Semigroup` instance is now unbiased and differs from the left-biased instance defined in PureScript releases <= 0.13.x."), Ord k, Semigroup v) => Semigroup (Map k v)
- (Warn (Text "Data.Map\'s `Semigroup` instance is now unbiased and differs from the left-biased instance defined in PureScript releases <= 0.13.x."), Ord k, Semigroup v) => Monoid (Map k v)
- (Ord k) => Alt (Map k)
- (Ord k) => Plus (Map k)
- Functor (Map k)
- FunctorWithIndex k (Map k)
- (Ord k) => Apply (Map k)
- (Ord k) => Bind (Map k)
- Foldable (Map k)
- FoldableWithIndex k (Map k)
- Traversable (Map k)
- TraversableWithIndex k (Map k)
#Identity Source
newtype Identity aConstructors
- Identity a
Instances
- Newtype (Identity a) _
- (Eq a) => Eq (Identity a)
- (Ord a) => Ord (Identity a)
- (Bounded a) => Bounded (Identity a)
- (HeytingAlgebra a) => HeytingAlgebra (Identity a)
- (BooleanAlgebra a) => BooleanAlgebra (Identity a)
- (Semigroup a) => Semigroup (Identity a)
- (Monoid a) => Monoid (Identity a)
- (Semiring a) => Semiring (Identity a)
- (EuclideanRing a) => EuclideanRing (Identity a)
- (Ring a) => Ring (Identity a)
- (CommutativeRing a) => CommutativeRing (Identity a)
- (Lazy a) => Lazy (Identity a)
- (Show a) => Show (Identity a)
- Eq1 Identity
- Ord1 Identity
- Functor Identity
- Invariant Identity
- Alt Identity
- Apply Identity
- Applicative Identity
- Bind Identity
- Monad Identity
- Extend Identity
- Comonad Identity
#Either Source
data Either a bThe Either type is used to represent a choice between two types of value.
A common use case for Either is error handling, where Left is used to
carry an error value and Right is used to carry a success value.
Constructors
Instances
- Functor (Either a)- The - Functorinstance allows functions to transform the contents of a- Rightwith the- <$>operator:- f <$> Right x == Right (f x)- Leftvalues are untouched:- f <$> Left y == Left y
- Generic (Either a b) _
- Invariant (Either a)
- Apply (Either e)- The - Applyinstance allows functions contained within a- Rightto transform a value contained within a- Rightusing the- (<*>)operator:- Right f <*> Right x == Right (f x)- Leftvalues are left untouched:- Left f <*> Right x == Left f Right f <*> Left y == Left y- Combining - Functor's- <$>with- Apply's- <*>can be used to transform a pure function to take- Either-typed arguments so- f :: a -> b -> cbecomes- f :: Either l a -> Either l b -> Either l c:- f <$> Right x <*> Right y == Right (f x y)- The - Left-preserving behaviour of both operators means the result of an expression like the above but where any one of the values is- Leftmeans the whole result becomes- Leftalso, taking the first- Leftvalue found:- f <$> Left x <*> Right y == Left x f <$> Right x <*> Left y == Left y f <$> Left x <*> Left y == Left x
- Applicative (Either e)- The - Applicativeinstance enables lifting of values into- Eitherwith the- purefunction:- pure x :: Either _ _ == Right x- Combining - Functor's- <$>with- Apply's- <*>and- Applicative's- purecan be used to pass a mixture of- Eitherand non-- Eithertyped values to a function that does not usually expect them, by using- purefor any value that is not already- Eithertyped:- f <$> Right x <*> pure y == Right (f x y)- Even though - pure = Rightit is recommended to use- purein situations like this as it allows the choice of- Applicativeto be changed later without having to go through and replace- Rightwith a new constructor.
- Alt (Either e)- The - Altinstance allows for a choice to be made between two- Eithervalues with the- <|>operator, where the first- Rightencountered is taken.- Right x <|> Right y == Right x Left x <|> Right y == Right y Left x <|> Left y == Left y
- Bind (Either e)- The - Bindinstance allows sequencing of- Eithervalues and functions that return an- Eitherby using the- >>=operator:- Left x >>= f = Left x Right x >>= f = f x- Either's "do notation" can be understood to work like this:- x :: forall e a. Either e a x = -- y :: forall e b. Either e b y = -- foo :: forall e a. (a -> b -> c) -> Either e c foo f = do x' <- x y' <- y pure (f x' y')- ...which is equivalent to... - x >>= (\x' -> y >>= (\y' -> pure (f x' y')))- ...and is the same as writing... - foo :: forall e a. (a -> b -> c) -> Either e c foo f = case x of Left e -> Left e Right x -> case y of Left e -> Left e Right y -> Right (f x y)
- Monad (Either e)- The - Monadinstance guarantees that there are both- Applicativeand- Bindinstances for- Either.
- Extend (Either e)- The - Extendinstance allows sequencing of- Eithervalues and functions that accept an- Eitherand return a non-- Eitherresult using the- <<=operator.- f <<= Left x = Left x f <<= Right x = Right (f (Right x))
- (Show a, Show b) => Show (Either a b)- The - Showinstance allows- Eithervalues to be rendered as a string with- showwhenever there is an- Showinstance for both type the- Eithercan contain.
- (Eq a, Eq b) => Eq (Either a b)- The - Eqinstance allows- Eithervalues to be checked for equality with- ==and inequality with- /=whenever there is an- Eqinstance for both types the- Eithercan contain.
- (Eq a) => Eq1 (Either a)
- (Ord a, Ord b) => Ord (Either a b)- The - Ordinstance allows- Eithervalues to be compared with- compare,- >,- >=,- <and- <=whenever there is an- Ordinstance for both types the- Eithercan contain.- Any - Leftvalue is considered to be less than a- Rightvalue.
- (Ord a) => Ord1 (Either a)
- (Bounded a, Bounded b) => Bounded (Either a b)
- (Semigroup b) => Semigroup (Either a b)
#Effect Source
data Effect t0A native effect. The type parameter denotes the return type of running the
effect, that is, an Effect Int is a possibly-effectful computation which
eventually produces a value of the type Int when it finishes.
Instances
- Functor Effect
- Apply Effect
- Applicative Effect
- Bind Effect
- Monad Effect
- (Semigroup a) => Semigroup (Effect a)- The - Semigroupinstance for effects allows you to run two effects, one after the other, and then combine their results using the result type's- Semigroupinstance.
- (Monoid a) => Monoid (Effect a)- If you have a - Monoid ainstance, then- mempty :: Effect ais defined as- pure mempty.
#Applicative Source
class Applicative :: (Type -> Type) -> Constraintclass (Apply f) <= Applicative f where
The Applicative type class extends the Apply type class
with a pure function, which can be used to create values of type f a
from values of type a.
Where Apply provides the ability to lift functions of two or
more arguments to functions whose arguments are wrapped using f, and
Functor provides the ability to lift functions of one
argument, pure can be seen as the function which lifts functions of
zero arguments. That is, Applicative functors support a lifting
operation for any number of function arguments.
Instances must satisfy the following laws in addition to the Apply
laws:
- Identity: (pure identity) <*> v = v
- Composition: pure (<<<) <*> f <*> g <*> h = f <*> (g <*> h)
- Homomorphism: (pure f) <*> (pure x) = pure (f x)
- Interchange: u <*> (pure y) = (pure (_ $ y)) <*> u
Members
- pure :: forall a. a -> f a
Instances
#Apply Source
class Apply :: (Type -> Type) -> Constraintclass (Functor f) <= Apply f where
The Apply class provides the (<*>) which is used to apply a function
to an argument under a type constructor.
Apply can be used to lift functions of two or more arguments to work on
values wrapped with the type constructor f. It might also be understood
in terms of the lift2 function:
lift2 :: forall f a b c. Apply f => (a -> b -> c) -> f a -> f b -> f c
lift2 f a b = f <$> a <*> b
(<*>) is recovered from lift2 as lift2 ($). That is, (<*>) lifts
the function application operator ($) to arguments wrapped with the
type constructor f.
Put differently...
foo =
  functionTakingNArguments <$> computationProducingArg1
                           <*> computationProducingArg2
                           <*> ...
                           <*> computationProducingArgN
Instances must satisfy the following law in addition to the Functor
laws:
- Associative composition: (<<<) <$> f <*> g <*> h = f <*> (g <*> h)
Formally, Apply represents a strong lax semi-monoidal endofunctor.
Members
- apply :: forall a b. f (a -> b) -> f a -> f b
Instances
#Bind Source
class Bind :: (Type -> Type) -> Constraintclass (Apply m) <= Bind m where
The Bind type class extends the Apply type class with a
"bind" operation (>>=) which composes computations in sequence, using
the return value of one computation to determine the next computation.
The >>= operator can also be expressed using do notation, as follows:
x >>= f = do y <- x
             f y
where the function argument of f is given the name y.
Instances must satisfy the following laws in addition to the Apply
laws:
- Associativity: (x >>= f) >>= g = x >>= (\k -> f k >>= g)
- Apply Superclass: apply f x = f >>= \f’ -> map f’ x
Associativity tells us that we can regroup operations which use do
notation so that we can unambiguously write, for example:
do x <- m1
   y <- m2 x
   m3 x y
Members
- bind :: forall a b. m a -> (a -> m b) -> m b
Instances
- Bind (Function r)
- Bind Array- The - bind/- >>=function for- Arrayworks by applying a function to each element in the array, and flattening the results into a single, new array.- Array's - bind/- >>=works like a nested for loop. Each- bindadds another level of nesting in the loop. For example:- foo :: Array String foo = ["a", "b"] >>= \eachElementInArray1 -> ["c", "d"] >>= \eachElementInArray2 pure (eachElementInArray1 <> eachElementInArray2) -- In other words... foo -- ... is the same as... [ ("a" <> "c"), ("a" <> "d"), ("b" <> "c"), ("b" <> "d") ] -- which simplifies to... [ "ac", "ad", "bc", "bd" ]
- Bind Proxy
#BooleanAlgebra Source
class (HeytingAlgebra a) <= BooleanAlgebra a The BooleanAlgebra type class represents types that behave like boolean
values.
Instances should satisfy the following laws in addition to the
HeytingAlgebra law:
- Excluded middle:
- a || not a = tt
 
Instances
- BooleanAlgebra Boolean
- BooleanAlgebra Unit
- (BooleanAlgebra b) => BooleanAlgebra (a -> b)
- (RowToList row list, BooleanAlgebraRecord list row row) => BooleanAlgebra (Record row)
- BooleanAlgebra (Proxy a)
#Bounded Source
class (Ord a) <= Bounded a  whereThe Bounded type class represents totally ordered types that have an
upper and lower boundary.
Instances should satisfy the following law in addition to the Ord laws:
- Bounded: bottom <= a <= top
Members
Instances
- Bounded Boolean
- Bounded Int- The - Bounded- Intinstance has- top :: Intequal to 2^31 - 1, and- bottom :: Intequal to -2^31, since these are the largest and smallest integers representable by twos-complement 32-bit integers, respectively.
- Bounded Char- Characters fall within the Unicode range. 
- Bounded Ordering
- Bounded Unit
- Bounded Number
- Bounded (Proxy a)
- (RowToList row list, BoundedRecord list row row) => Bounded (Record row)
#Category Source
class Category :: forall k. (k -> k -> Type) -> Constraintclass (Semigroupoid a) <= Category a where
Categorys consist of objects and composable morphisms between them, and
as such are Semigroupoids, but unlike semigroupoids
must have an identity element.
Instances must satisfy the following law in addition to the
Semigroupoid law:
- Identity: identity <<< p = p <<< identity = p
Members
- identity :: forall t. a t t
Instances
#CommutativeRing Source
class (Ring a) <= CommutativeRing a The CommutativeRing class is for rings where multiplication is
commutative.
Instances must satisfy the following law in addition to the Ring
laws:
- Commutative multiplication: a * b = b * a
Instances
- CommutativeRing Int
- CommutativeRing Number
- CommutativeRing Unit
- (CommutativeRing b) => CommutativeRing (a -> b)
- (RowToList row list, CommutativeRingRecord list row row) => CommutativeRing (Record row)
- CommutativeRing (Proxy a)
#DivisionRing Source
class (Ring a) <= DivisionRing a  whereThe DivisionRing class is for non-zero rings in which every non-zero
element has a multiplicative inverse. Division rings are sometimes also
called skew fields.
Instances must satisfy the following laws in addition to the Ring laws:
- Non-zero ring: one /= zero
- Non-zero multiplicative inverse: recip a * a = a * recip a = onefor all non-zeroa
The result of recip zero is left undefined; individual instances may
choose how to handle this case.
If a type has both DivisionRing and CommutativeRing instances, then
it is a field and should have a Field instance.
Members
- recip :: a -> a
Instances
#Eq Source
class Eq a  whereThe Eq type class represents types which support decidable equality.
Eq instances should satisfy the following laws:
- Reflexivity: x == x = true
- Symmetry: x == y = y == x
- Transitivity: if x == yandy == zthenx == z
Note: The Number type is not an entirely law abiding member of this
class due to the presence of NaN, since NaN /= NaN. Additionally,
computing with Number can result in a loss of precision, so sometimes
values that should be equivalent are not.
Members
Instances
#EuclideanRing Source
class (CommutativeRing a) <= EuclideanRing a  whereThe EuclideanRing class is for commutative rings that support division.
The mathematical structure this class is based on is sometimes also called
a Euclidean domain.
Instances must satisfy the following laws in addition to the Ring
laws:
- Integral domain: one /= zero, and ifaandbare both nonzero then so is their producta * b
- Euclidean function degree:- Nonnegativity: For all nonzero a,degree a >= 0
- Quotient/remainder: For all aandb, wherebis nonzero, letq = a / bandr = a `mod` b; thena = q*b + r, and also eitherr = zeroordegree r < degree b
 
- Nonnegativity: For all nonzero 
- Submultiplicative euclidean function:
- For all nonzero aandb,degree a <= degree (a * b)
 
- For all nonzero 
The behaviour of division by zero is unconstrained by these laws,
meaning that individual instances are free to choose how to behave in this
case. Similarly, there are no restrictions on what the result of
degree zero is; it doesn't make sense to ask for degree zero in the
same way that it doesn't make sense to divide by zero, so again,
individual instances may choose how to handle this case.
For any EuclideanRing which is also a Field, one valid choice
for degree is simply const 1. In fact, unless there's a specific
reason not to, Field types should normally use this definition of
degree.
The EuclideanRing Int instance is one of the most commonly used
EuclideanRing instances and deserves a little more discussion. In
particular, there are a few different sensible law-abiding implementations
to choose from, with slightly different behaviour in the presence of
negative dividends or divisors. The most common definitions are "truncating"
division, where the result of a / b is rounded towards 0, and "Knuthian"
or "flooring" division, where the result of a / b is rounded towards
negative infinity. A slightly less common, but arguably more useful, option
is "Euclidean" division, which is defined so as to ensure that a `mod` b
is always nonnegative. With Euclidean division, a / b rounds towards
negative infinity if the divisor is positive, and towards positive infinity
if the divisor is negative. Note that all three definitions are identical if
we restrict our attention to nonnegative dividends and divisors.
In versions 1.x, 2.x, and 3.x of the Prelude, the EuclideanRing Int
instance used truncating division. As of 4.x, the EuclideanRing Int
instance uses Euclidean division. Additional functions quot and rem are
supplied if truncating division is desired.
Members
Instances
#Field Source
class (EuclideanRing a, DivisionRing a) <= Field a The Field class is for types that are (commutative) fields.
Mathematically, a field is a ring which is commutative and in which every
nonzero element has a multiplicative inverse; these conditions correspond
to the CommutativeRing and DivisionRing classes in PureScript
respectively. However, the Field class has EuclideanRing and
DivisionRing as superclasses, which seems like a stronger requirement
(since CommutativeRing is a superclass of EuclideanRing). In fact, it
is not stronger, since any type which has law-abiding CommutativeRing
and DivisionRing instances permits exactly one law-abiding
EuclideanRing instance. We use a EuclideanRing superclass here in
order to ensure that a Field constraint on a function permits you to use
div on that type, since div is a member of EuclideanRing.
This class has no laws or members of its own; it exists as a convenience, so a single constraint can be used when field-like behaviour is expected.
This module also defines a single Field instance for any type which has
both EuclideanRing and DivisionRing instances. Any other instance
would overlap with this instance, so no other Field instances should be
defined in libraries. Instead, simply define EuclideanRing and
DivisionRing instances, and this will permit your type to be used with a
Field constraint.
Instances
- (EuclideanRing a, DivisionRing a) => Field a
#Functor Source
class Functor :: (Type -> Type) -> Constraintclass Functor f where
A Functor is a type constructor which supports a mapping operation
map.
map can be used to turn functions a -> b into functions
f a -> f b whose argument and return types use the type constructor f
to represent some computational context.
Instances must satisfy the following laws:
- Identity: map identity = identity
- Composition: map (f <<< g) = map f <<< map g
Members
- map :: forall a b. (a -> b) -> f a -> f b
Instances
#HeytingAlgebra Source
class HeytingAlgebra a  whereThe HeytingAlgebra type class represents types that are bounded lattices with
an implication operator such that the following laws hold:
- Associativity:
- a || (b || c) = (a || b) || c
- a && (b && c) = (a && b) && c
 
- Commutativity:
- a || b = b || a
- a && b = b && a
 
- Absorption:
- a || (a && b) = a
- a && (a || b) = a
 
- Idempotent:
- a || a = a
- a && a = a
 
- Identity:
- a || ff = a
- a && tt = a
 
- Implication:
- a `implies` a = tt
- a && (a `implies` b) = a && b
- b && (a `implies` b) = b
- a `implies` (b && c) = (a `implies` b) && (a `implies` c)
 
- Complemented:
- not a = a `implies` ff
 
Members
Instances
- HeytingAlgebra Boolean
- HeytingAlgebra Unit
- (HeytingAlgebra b) => HeytingAlgebra (a -> b)
- HeytingAlgebra (Proxy a)
- (RowToList row list, HeytingAlgebraRecord list row row) => HeytingAlgebra (Record row)
#Monad Source
class Monad :: (Type -> Type) -> Constraintclass (Applicative m, Bind m) <= Monad m
The Monad type class combines the operations of the Bind and
Applicative type classes. Therefore, Monad instances represent type
constructors which support sequential composition, and also lifting of
functions of arbitrary arity.
Instances must satisfy the following laws in addition to the
Applicative and Bind laws:
- Left Identity: pure x >>= f = f x
- Right Identity: x >>= pure = x
Instances
#MonadEffect Source
class MonadEffect :: (Type -> Type) -> Constraintclass (Monad m) <= MonadEffect m where
The MonadEffect class captures those monads which support native effects.
Instances are provided for Effect itself, and the standard monad
transformers.
liftEffect can be used in any appropriate monad transformer stack to lift an
action of type Effect a into the monad.
Members
- liftEffect :: forall a. Effect a -> m a
Instances
#MonadWriter Source
class MonadWriter :: Type -> (Type -> Type) -> Constraintclass (Monoid w, MonadTell w m) <= MonadWriter w m | m -> w
An extension of the MonadTell class that introduces some operations on
the accumulator:
- listenmodifies the result to include the changes to the accumulator.
- passapplies the returned function to the accumulator.
An implementation is provided for WriterT, and for other monad
transformers defined in this library.
Laws in addition to the MonadTell law:
- do { tell x ; tell y } = tell (x <> y)
- listen (pure a) = pure (Tuple a mempty)
- listen (writer a x) = tell x $> Tuple a x
#Monoid Source
class (Semigroup m) <= Monoid m  whereA Monoid is a Semigroup with a value mempty, which is both a
left and right unit for the associative operation <>:
- Left unit: (mempty <> x) = x
- Right unit: (x <> mempty) = x
Monoids are commonly used as the result of fold operations, where
<> is used to combine individual results, and mempty gives the result
of folding an empty collection of elements.
Newtypes for Monoid
Some types (e.g. Int, Boolean) can implement multiple law-abiding
instances for Monoid. Let's use Int as an example
- <>could be- +and- memptycould be- 0
- <>could be- *and- memptycould be- 1.
To clarify these ambiguous situations, one should use the newtypes
defined in Data.Monoid.<NewtypeName> modules.
In the above ambiguous situation, we could use Additive
for the first situation or Multiplicative for the second one.
Members
- mempty :: m
Instances
#Ord Source
class (Eq a) <= Ord a  whereThe Ord type class represents types which support comparisons with a
total order.
Ord instances should satisfy the laws of total orderings:
- Reflexivity: a <= a
- Antisymmetry: if a <= bandb <= athena == b
- Transitivity: if a <= bandb <= cthena <= c
Note: The Number type is not an entirely law abiding member of this
class due to the presence of NaN, since NaN <= NaN evaluates to false
Members
Instances
#Ring Source
class (Semiring a) <= Ring a  whereThe Ring class is for types that support addition, multiplication,
and subtraction operations.
Instances must satisfy the following laws in addition to the Semiring
laws:
- Additive inverse: a - a = zero
- Compatibility of subandnegate:a - b = a + (zero - b)
Members
- sub :: a -> a -> a
Instances
#Semigroup Source
class Semigroup a  whereThe Semigroup type class identifies an associative operation on a type.
Instances are required to satisfy the following law:
- Associativity: (x <> y) <> z = x <> (y <> z)
One example of a Semigroup is String, with (<>) defined as string
concatenation. Another example is List a, with (<>) defined as
list concatenation.
Newtypes for Semigroup
There are two other ways to implement an instance for this type class regardless of which type is used. These instances can be used by wrapping the values in one of the two newtypes below:
- First- Use the first argument every time:- append first _ = first.
- Last- Use the last argument every time:- append _ last = last.
Members
- append :: a -> a -> a
Instances
#Semigroupoid Source
class Semigroupoid :: forall k. (k -> k -> Type) -> Constraintclass Semigroupoid a where
A Semigroupoid is similar to a Category but does not
require an identity element identity, just composable morphisms.
Semigroupoids must satisfy the following law:
- Associativity: p <<< (q <<< r) = (p <<< q) <<< r
One example of a Semigroupoid is the function type constructor (->),
with (<<<) defined as function composition.
Members
- compose :: forall b c d. a c d -> a b c -> a b d
Instances
#Semiring Source
class Semiring a  whereThe Semiring class is for types that support an addition and
multiplication operation.
Instances must satisfy the following laws:
- Commutative monoid under addition:
- Associativity: (a + b) + c = a + (b + c)
- Identity: zero + a = a + zero = a
- Commutative: a + b = b + a
 
- Associativity: 
- Monoid under multiplication:
- Associativity: (a * b) * c = a * (b * c)
- Identity: one * a = a * one = a
 
- Associativity: 
- Multiplication distributes over addition:
- Left distributivity: a * (b + c) = (a * b) + (a * c)
- Right distributivity: (a + b) * c = (a * c) + (b * c)
 
- Left distributivity: 
- Annihilation: zero * a = a * zero = zero
Note: The Number and Int types are not fully law abiding
members of this class hierarchy due to the potential for arithmetic
overflows, and in the case of Number, the presence of NaN and
Infinity values. The behaviour is unspecified in these cases.
Members
Instances
#Show Source
class Show a  whereThe Show type class represents those types which can be converted into
a human-readable String representation.
While not required, it is recommended that for any expression x, the
string show x be executable PureScript code which evaluates to the same
value as the expression x.
Members
Instances
#zipWith Source
zipWith :: forall a b c. (a -> b -> c) -> Array a -> Array b -> Array cApply a function to pairs of elements at the same index in two arrays, collecting the results in a new array.
If one array is longer, elements will be discarded from the longer array.
For example
zipWith (*) [1, 2, 3] [4, 5, 6, 7] == [4, 10, 18]
#when Source
when :: forall m. Applicative m => Boolean -> m Unit -> m UnitPerform an applicative action when a condition is true.
#void Source
void :: forall f a. Functor f => f a -> f UnitThe void function is used to ignore the type wrapped by a
Functor, replacing it with Unit and keeping only the type
information provided by the type constructor itself.
void is often useful when using do notation to change the return type
of a monadic computation:
main = forE 1 10 \n -> void do
  print n
  print (n * n)
#unless Source
unless :: forall m. Applicative m => Boolean -> m Unit -> m UnitPerform an applicative action unless a condition is true.
#unionRanges Source
unionRanges :: SourceRange -> SourceRange -> SourceRange#uncons Source
uncons :: forall a. Array a -> Maybe { head :: a, tail :: Array a }Break an array into its first element and remaining elements.
Using uncons provides a way of writing code that would use cons patterns
in Haskell or pre-PureScript 0.7:
f (x : xs) = something
f [] = somethingElse
Becomes:
f arr = case uncons arr of
  Just { head: x, tail: xs } -> something
  Nothing -> somethingElse
#try Source
try :: forall e m a. MonadError e m => m a -> m (Either e a)Return Right if the given action succeeds, Left if it throws.
#traverse_ Source
traverse_ :: forall a b f m. Applicative m => Foldable f => (a -> m b) -> f a -> m UnitTraverse a data structure, performing some effects encoded by an
Applicative functor at each value, ignoring the final result.
For example:
traverse_ print [1, 2, 3]
#traverse Source
traverse :: forall t a b m. Traversable t => Applicative m => (a -> m b) -> t a -> m (t b)#sequence_ Source
sequence_ :: forall a f m. Applicative m => Foldable f => f (m a) -> m UnitPerform all of the effects in some data structure in the order
given by the Foldable instance, ignoring the final result.
For example:
sequence_ [ trace "Hello, ", trace " world!" ]
#sequence Source
sequence :: forall t a m. Traversable t => Applicative m => t (m a) -> m (t a)#runExceptT Source
runExceptT :: forall e m a. ExceptT e m a -> m (Either e a)The inverse of ExceptT. Run a computation in the ExceptT monad.
#partition Source
partition :: forall a. (a -> Boolean) -> Array a -> { no :: Array a, yes :: Array a }Partition an array using a predicate function, creating a set of new arrays. One for the values satisfying the predicate function and one for values that don't.
partition (_ > 0) [-1, 4, -5, 7] = { yes: [4, 7], no: [-1, -5] }
#maybe Source
maybe :: forall a b. b -> (a -> b) -> Maybe a -> bTakes a default value, a function, and a Maybe value. If the Maybe
value is Nothing the default value is returned, otherwise the function
is applied to the value inside the Just and the result is returned.
maybe x f Nothing == x
maybe x f (Just y) == f y
#mapWriterT Source
mapWriterT :: forall w1 w2 m1 m2 a b. (m1 (Tuple a w1) -> m2 (Tuple b w2)) -> WriterT w1 m1 a -> WriterT w2 m2 bChange the accumulator and base monad types in a WriterT monad action.
#mapMaybe Source
mapMaybe :: forall a b. (a -> Maybe b) -> Array a -> Array bApply a function to each element in an array, keeping only the results which contain a value, creating a new array.
parseEmail :: String -> Maybe Email
parseEmail = ...
mapMaybe parseEmail ["a.com", "hello@example.com", "--"]
   = [Email {user: "hello", domain: "example.com"}]
#mapExceptT Source
mapExceptT :: forall e e' m n a b. (m (Either e a) -> n (Either e' b)) -> ExceptT e m a -> ExceptT e' n bTransform the unwrapped computation using the given function.
#liftM1 Source
liftM1 :: forall m a b. Monad m => (a -> b) -> m a -> m bliftM1 provides a default implementation of (<$>) for any
Monad, without using (<$>) as provided by the
Functor-Monad superclass relationship.
liftM1 can therefore be used to write Functor instances
as follows:
instance functorF :: Functor F where
  map = liftM1
#liftA1 Source
liftA1 :: forall f a b. Applicative f => (a -> b) -> f a -> f bliftA1 provides a default implementation of (<$>) for any
Applicative functor, without using (<$>) as provided
by the Functor-Applicative superclass
relationship.
liftA1 can therefore be used to write Functor instances
as follows:
instance functorF :: Functor F where
  map = liftA1
#lcm Source
lcm :: forall a. Eq a => EuclideanRing a => a -> a -> aThe least common multiple of two values.
#intercalate Source
intercalate :: forall f m. Foldable f => Monoid m => m -> f m -> mFold a data structure, accumulating values in some Monoid,
combining adjacent elements using the specified separator.
For example:
> intercalate ", " ["Lorem", "ipsum", "dolor"]
= "Lorem, ipsum, dolor"
> intercalate "*" ["a", "b", "c"]
= "a*b*c"
> intercalate [1] [[2, 3], [4, 5], [6, 7]]
= [2, 3, 1, 4, 5, 1, 6, 7]
#guard Source
guard :: forall m. Alternative m => Boolean -> m UnitFail using Plus if a condition does not hold, or
succeed using Applicative if it does.
For example:
import Prelude
import Control.Alternative (guard)
import Data.Array ((..))
factors :: Int -> Array Int
factors n = do
  a <- 1..n
  b <- 1..n
  guard $ a * b == n
  pure a
#groupAllBy Source
groupAllBy :: forall a. (a -> a -> Ordering) -> Array a -> Array (NonEmptyArray a)Group equal elements of an array into arrays, using the specified comparison function to determine equality.
groupAllBy (comparing Down) [1, 3, 2, 4, 3, 3]
   = [NonEmptyArray [4], NonEmptyArray [3, 3, 3], NonEmptyArray [2], NonEmptyArray [1]]
#gcd Source
gcd :: forall a. Eq a => EuclideanRing a => a -> a -> aThe greatest common divisor of two values.
#for_ Source
for_ :: forall a b f m. Applicative m => Foldable f => f a -> (a -> m b) -> m UnitA version of traverse_ with its arguments flipped.
This can be useful when running an action written using do notation for every element in a data structure:
For example:
for_ [1, 2, 3] \n -> do
  print n
  trace "squared is"
  print (n * n)
#forWithIndex_ Source
forWithIndex_ :: forall i a b f m. Applicative m => FoldableWithIndex i f => f a -> (i -> a -> m b) -> m UnitA version of traverseWithIndex_ with its arguments flipped.
This can be useful when running an action written using do notation for every element in a data structure:
For example:
forWithIndex_ ["a", "b", "c"] \i x -> do
  logShow i
  log x
#for Source
for :: forall a b m t. Applicative m => Traversable t => t a -> (a -> m b) -> m (t b)A version of traverse with its arguments flipped.
This can be useful when running an action written using do notation for every element in a data structure:
For example:
for [1, 2, 3] \n -> do
  print n
  return (n * n)
#foldlWithIndex Source
foldlWithIndex :: forall i f a b. FoldableWithIndex i f => (i -> b -> a -> b) -> b -> f a -> b#flip Source
flip :: forall a b c. (a -> b -> c) -> b -> a -> cGiven a function that takes two arguments, applies the arguments to the function in a swapped order.
flip append "1" "2" == append "2" "1" == "21"
const 1 "two" == 1
flip const 1 "two" == const "two" 1 == "two"
#flap Source
flap :: forall f a b. Functor f => f (a -> b) -> a -> f bApply a value in a computational context to a value in no context.
Generalizes flip.
longEnough :: String -> Bool
hasSymbol :: String -> Bool
hasDigit :: String -> Bool
password :: String
validate :: String -> Array Bool
validate = flap [longEnough, hasSymbol, hasDigit]
flap (-) 3 4 == 1
threeve <$> Just 1 <@> 'a' <*> Just true == Just (threeve 1 'a' true)
#execWriterT Source
execWriterT :: forall w m a. Functor m => WriterT w m a -> m wRun a computation in the WriterT monad, discarding the result.
#either Source
either :: forall a b c. (a -> c) -> (b -> c) -> Either a b -> cTakes two functions and an Either value, if the value is a Left the
inner value is applied to the first function, if the value is a Right
the inner value is applied to the second function.
either f g (Left x) == f x
either f g (Right y) == g y
#dimap Source
dimap :: forall p a b c d. Profunctor p => (a -> b) -> (c -> d) -> p b c -> p a d#const Source
const :: forall a b. a -> b -> aReturns its first argument and ignores its second.
const 1 "hello" = 1
It can also be thought of as creating a function that ignores its argument:
const 1 = \_ -> 1
#any Source
any :: forall a b f. Foldable f => HeytingAlgebra b => (a -> b) -> f a -> bany f is the same as or <<< map f; map a function over the structure,
and then get the disjunction of the results.
#(>>>) Source
Operator alias for Control.Semigroupoid.composeFlipped (right-associative / precedence 9)
#(<=<) Source
Operator alias for Control.Bind.composeKleisliFlipped (right-associative / precedence 1)
#(:) Source
Operator alias for Data.Array.cons (right-associative / precedence 6)
An infix alias for cons.
1 : [2, 3, 4] = [1, 2, 3, 4]
Note, the running time of this function is O(n).
#(/\) Source
Operator alias for Data.Tuple.Tuple (right-associative / precedence 6)
Shorthand for constructing n-tuples as nested pairs.
a /\ b /\ c /\ d /\ unit becomes Tuple a (Tuple b (Tuple c (Tuple d unit)))
#(..) Source
Operator alias for Data.Array.range (non-associative / precedence 8)
An infix synonym for range.
2 .. 5 = [2, 3, 4, 5]
#($) Source
Operator alias for Data.Function.apply (right-associative / precedence 0)
Applies a function to an argument: the reverse of (#).
length $ groupBy productCategory $ filter isInStock $ products
is equivalent to:
length (groupBy productCategory (filter isInStock products))
Or another alternative equivalent, applying chain of composed functions to a value:
length <<< groupBy productCategory <<< filter isInStock $ products
#(#) Source
Operator alias for Data.Function.applyFlipped (left-associative / precedence 1)
Applies an argument to a function: the reverse of ($).
products # filter isInStock # groupBy productCategory # length
is equivalent to:
length (groupBy productCategory (filter isInStock products))
Or another alternative equivalent, applying a value to a chain of composed functions:
products # filter isInStock >>> groupBy productCategory >>> length
#(!!) Source
Operator alias for Data.Array.index (left-associative / precedence 8)
An infix version of index.
sentence = ["Hello", "World", "!"]
sentence !! 0 = Just "Hello"
sentence !! 7 = Nothing
#type (~>) Source
Operator alias for Data.NaturalTransformation.NaturalTransformation (right-associative / precedence 4)
#type (/\) Source
Operator alias for Data.Tuple.Tuple (right-associative / precedence 6)
Shorthand for constructing n-tuple types as nested pairs.
forall a b c d. a /\ b /\ c /\ d /\ Unit becomes
forall a b c d. Tuple a (Tuple b (Tuple c (Tuple d Unit)))
#type (+) Source
Operator alias for Type.Row.RowApply (right-associative / precedence 0)
Applies a type alias of open rows to a set of rows. The primary use case this operator is as convenient sugar for combining open rows without parentheses.
type Rows1 r = (a :: Int, b :: String | r)
type Rows2 r = (c :: Boolean | r)
type Rows3 r = (Rows1 + Rows2 + r)
type Rows4 r = (d :: String | Rows1 + Rows2 + r)
- Modules
- Vscode.Client 
- Vscode.Client. Configuration 
- Vscode.Client. Executable 
- Vscode.Client. FileSystemWatcher 
- Vscode.Client. Workspace 
- Vscode.Context 
- Vscode.Events 
- Vscode.Server. Capabilities 
- Vscode.Server. Connection 
- Vscode.Server. Diagnostic 
- Vscode.Server. TextDocuments 
- Whine
- Whine.Core. CaseBranchIndentation 
- Whine.Core. CommaFirst 
- Whine.Core. CommaFirstArrays 
- Whine.Core. CommaFirstRecords 
- Whine.Core. UndesirableFunctions 
- Whine.Core. UndesirableModules 
- Whine.Core. WhineRules 
- Whine.Log 
- Whine.Muting 
- Whine.Prelude 
- Whine.Print 
- Whine.Runner 
- Whine.Runner. Cli 
- Whine.Runner. Config 
- Whine.Runner. FS 
- Whine.Runner. Glob 
- Whine.Runner. LanguageServer 
- Whine.Runner. PackageVersion 
- Whine.Runner. Prelude 
- Whine.Runner. Yaml 
- Whine.Test 
- Whine.Types 
- WhineM
This instance is provided for compatibility.
Affis always stack-safe within a given fiber. This instance will just result in unnecessary bind overhead.