Search results
liftEffect :: forall m a. MonadEffect m => Effect a -> m a
pull :: forall a m. MonadEffect m => Effect a -> m a
read :: forall g a. RWLockGuard g => g a -> Aff a
elements :: forall m f a. MonadGen m => Foldable1 f => f a -> m a
Creates a generator that outputs a value chosen from a selection with uniform probability.
unsafePerformEffect :: forall a. Effect a -> a
Run an effectful computation.
Note: use of this function can result in arbitrary side-effects.
inj :: forall f g a. Inject f g => f a -> g a
join :: forall f m a. MonadFork f m => f a -> m a
uninterruptible :: forall e f m a. MonadBracket e f m => m a -> m a
liftBase :: forall b m a. MonadBase b m => b a -> m a
folded :: forall event a. IsEvent event => Monoid a => event a -> event a
Combine subsequent events using a Monoid.
folded :: forall a event. IsEvent event => Monoid a => event a -> event a
Combine subsequent events using a Monoid.
sort :: forall f a. Functor f => Foldable f => Unfoldable f => Ord a => f a -> f a
Sort any structure (which has Foldable, Unfoldable, and Functor instances) by converting to an OrdSeq and back again. I am fairly sure this is usually O(n*log(n)), although of course this depends on the Unfoldable and Foldable instances.
spyM :: forall m a. Warn (Text "Debug function usage") => Monad m => m a -> m a
restoreAfter :: forall m a. MonadCanvasAction m => m a -> m a
Runs save, then the provided action, then restore
localEffect :: forall a. Effect a -> a
lookAhead :: forall m a. LookAheadParsing m => m a -> m a
once :: forall a m. MonadLogic m => m a -> m a
try :: forall m a. Parsing m => m a -> m a
forever :: forall m a b. MonadRec m => m a -> m b
forever runs an action indefinitely, using the MonadRec instance to
ensure constant stack usage.
For example:
main = forever $ trace "Hello, World!"
proof :: forall a b p. TypeEquals a b => p a -> p b
coerce :: forall f a b. Contravariant f => Functor f => f a -> f b
cleared :: forall f a b. Filterable f => f a -> f b
Filter out all values.
length :: forall sproxy proxy a b. Length a b => sproxy a -> proxy b
parseInt :: forall sproxy proxy sym a. ParseInt sym a => sproxy sym -> proxy a
parse Int a Value-Level
parseInt (Proxy :: _ "-1337") ~> N1337
parseInt (SProxy :: _ "-1337") ~> N1337
-- N1137 would be type alias for Neg (Succ^1337 Z)
parseNat :: forall sproxy proxy sym a. ParseNat sym a => sproxy sym -> proxy a
value-level parse of number
parseNat (Proxy "10") ~> D10
parseNat (SProxy "10") ~> D10
init :: forall xs ys lproxy. Init xs ys => lproxy xs -> lproxy ys
length :: forall xs r lproxy iproxy. Length xs r => lproxy xs -> iproxy r
drain :: forall a s n n1. ToString n1 s => IsSymbol s => Analytic (a n) => Analytic (a n1) => Add n1 1 n => a n -> a n1
Decrement the dimension of a point/vector by removing its last coordinate.
forever :: forall b a m. Monad m => m a -> m b
immerse :: forall a n n1. Analytic (a n) => Analytic (a n1) => Add n 1 n1 => a n -> a n1
Increments the dimension of a point/vector by adding a zero coordinate after the other coordinates.
pure :: forall f a. Applicative f => a -> f a
extract :: forall w a. Comonad w => w a -> a
and :: forall a f. Foldable f => HeytingAlgebra a => f a -> a
The conjunction of all the values in a data structure. When specialized
to Boolean, this function will test whether all of the values in a data
structure are true.
fold :: forall f m. Foldable f => Monoid m => f m -> m
Fold a data structure, accumulating values in some Monoid.
fold1 :: forall t m. Foldable1 t => Semigroup m => t m -> m
Fold a data structure, accumulating values in some Semigroup.
length :: forall a b f. Foldable f => Semiring b => f a -> b
Returns the size/length of a finite structure. Optimized for structures that are similar to cons-lists, because there is no general way to do better.
maximum :: forall f a. Ord a => Foldable1 f => f a -> a
minimum :: forall f a. Ord a => Foldable1 f => f a -> a
or :: forall a f. Foldable f => HeytingAlgebra a => f a -> a
The disjunction of all the values in a data structure. When specialized
to Boolean, this function will test whether any of the values in a data
structure is true.
product :: forall a f. Foldable f => Semiring a => f a -> a
Find the product of the numeric values in a data structure.
sum :: forall a f. Foldable f => Semiring a => f a -> a
Find the sum of the numeric values in a data structure.
singleton :: forall f a. Unfoldable1 f => a -> f a
Contain a single value. For example:
singleton "foo" == (NEL.singleton "foo" :: NEL.NonEmptyList String)
downFrom :: forall a u. Enum a => Unfoldable u => a -> u a
Produces all predecessors of an Enum value, excluding the start value.
downFromIncluding :: forall a u. Enum a => Unfoldable1 u => a -> u a
Produces all predecessors of an Enum value, including the start value.
downFromIncluding top will return all values in an Enum, in reverse
order.
upFrom :: forall a u. Enum a => Unfoldable u => a -> u a
Produces all successors of an Enum value, excluding the start value.
upFromIncluding :: forall a u. Enum a => Unfoldable1 u => a -> u a
Produces all successors of an Enum value, including the start value.
upFromIncluding bottom will return all values in an Enum.
ask :: forall e w a. ComonadAsk e w => w a -> e
pos :: forall s w a. ComonadStore s w => w a -> s
throwError :: forall e m a. MonadThrow e m => e -> m a
getSingleton :: forall f a. SingletonFunctor f => f a -> a
colambek :: forall t f. Recursive t f => Corecursive t f => f t -> t
embed :: forall t f. Corecursive t f => f t -> t
lambek :: forall t f. Recursive t f => Corecursive t f => t -> f t
project :: forall t f. Recursive t f => t -> f t
aread :: forall s r m. Refer s r => MonadEffect m => r -> m s
fread :: forall m r s. MonadEffect m => Refer s r => r -> m s
sequenceProduct :: forall specI specO f. SequenceProduct specI specO f => specI -> f specO
pure :: forall v f c. HasPure c f => ObjectOf c v => v -> f v
bottom1_ :: forall f a. Bottom1_ f => a -> f a
bottom2 :: forall f a b. Bottom2 f a => a -> f b
from1 :: forall f rep a. Generic1 f rep => f a -> rep
top1_ :: forall f a. Top1_ f => a -> f a
act :: forall m b a. Mother m => a -> m b
array :: forall f t. Corecursive t (SqlF EJsonF) => Foldable f => f t -> t
askFor :: forall a p. Ask a => p a -> a
Equivalent to ask except for accepting a Proxy for specifying the exact requested type
constructRecord :: forall ty fn proxy. ConstructRecord ty fn => proxy ty -> fn
dsingleton :: forall cnt a. Diff cnt => a -> cnt a
maximum :: forall a f. Ord a => Foldable1 f => f a -> a
minimum :: forall a f. Ord a => Foldable1 f => f a -> a
mockFun :: forall params fun verifyParams m. MockBuilder params fun verifyParams => MonadEffect m => params -> m fun
product :: forall b a. HasMultiply b => HasOne b => HasReduce a => a b -> b
Multiplies all of the elements of a container together.
product [2, 3] -- 6
product [] -- 1
pure :: forall d a. Syntax d => Eq a => a -> d a
pure :: forall f a. Unital Function Unit Unit f => Functor f => a -> f a
pure :: forall a b. HasPure a => b -> a b
pure :: forall f a. Applicative f => a -> f a
query :: forall m q r. MonadSession m => AsQuery q => FromRows r => q -> m r
Executes a query and unmarshals the result into r
read :: forall box val m. Read box val => MonadDelay m => box -> m val
Read the current value. Will never cause a refresh.
repeat :: forall a u. Unfoldable1 u => a -> u a
Create an infinite Unfoldable1 by repeating a single element.
set :: forall g f t. Corecursive t (SqlF g) => Foldable f => f t -> t
siteClock :: forall s m i c. Site s m i c => s -> m c
siteId :: forall s m i c. Site s m i c => s -> m i
sum :: forall b a. HasAdd b => HasReduce a => HasZero b => a b -> b
Adds all the elements of a container together. If the container is empty,
returns zero.
[1, 2, 3] :sum -- 6
([] :: Array Int) :sum -- 0
["ab", "cd", "ef"] :sum -- "abcdef"
([] :: Array String) :sum -- ""
throw :: forall (t10 :: Type -> Type) (t11 :: Type) (a12 :: Type). MonadThrow Error t10 => Show a12 => a12 -> t10 t11
unconsableLength :: forall num a t. Unconsable t => Semiring num => t a -> num
Equivalent to length, maybe except of stack safety.
You may want to use this function instead of length if foldr for
the particular data type you are using is not stack-safe.
unfold :: forall f a s. Convert s (Statements a) => Unfoldable1 f => s -> f a
abs :: forall a. Ord a => Ring a => a -> a
The absolute value function. abs x is defined as if x >= zero then x
else negate x.
from :: forall a rep. Generic a rep => a -> rep
genericNot :: forall a rep. Generic a rep => GenericHeytingAlgebra rep => a -> a
A Generic implementation of the not member from the HeytingAlgebra type class.
genericNot' :: forall a. GenericHeytingAlgebra a => a -> a
negate :: forall a. Ring a => a -> a
negate x can be used as a shorthand for zero - x.
not :: forall a. HeytingAlgebra a => a -> a
recip :: forall a. DivisionRing a => a -> a
signum :: forall a. Ord a => Ring a => a -> a
The sign function; returns one if the argument is positive,
negate one if the argument is negative, or zero if the argument is zero.
For floating point numbers with signed zeroes, when called with a zero,
this function returns the argument in order to preserve the sign.
For any x, we should have signum x * abs x == x.
to :: forall a rep. Generic a rep => rep -> a
unwrap :: forall t a. Newtype t a => t -> a
wrap :: forall t a. Newtype t a => a -> t
unsafeCoerce :: forall a b. a -> b
A highly unsafe function, which can be used to persuade the type system that any type is the same as any other type. When using this function, it is your (that is, the caller's) responsibility to ensure that the underlying representation for both types is the same.
Because this function is extraordinarily flexible, type inference can greatly suffer. It is highly recommended to define specializations of this function rather than using it as-is. For example:
fromBoolean :: Boolean -> Json
fromBoolean = unsafeCoerce
This way, you won't have any nasty surprises due to the inferred type being different to what you expected.
After the v0.14.0 PureScript release, some of what was accomplished via
unsafeCoerce can now be accomplished via coerce from
purescript-safe-coerce. See that library's documentation for more
context.
inj :: forall a b. Inject a b => a -> b
unsafePartial :: forall a. (Partial => a) -> a
Discharge a partiality constraint, unsafely.
from :: forall a b. TypeEquals a b => b -> a