Search results

toNumber :: Int -> Number

Converts an Int value back into a Number. Any Int is a valid Number so there is no loss of precision with this function.

P purescript-integers M Data.Int
toNumber :: Int -> Number

Converts an integer into a number.

toNumber 1 -- 1.0
P purescript-neon M Neon.Primitive.Int
fromInt :: forall a. IntLiftable a => Int -> a
P purescript-sparse-polynomials M Data.Sparse.Polynomial
timeStamp :: forall e. IsEvent e => e -> Number

The time in milliseconds between 01/01/1970 and when the event was dispatched.

P purescript-dom-classy M DOM.Classy.Event
diagonal :: forall s. ToSize Number s => s -> Number

Get the diagonal of a size

P purescript-polymorphic-vectors M Data.Vector.Polymorphic
length :: forall p. ToPos Number p => p -> Number

Get the length of a position vector

P purescript-polymorphic-vectors M Data.Vector.Polymorphic
timestamp :: forall e. IsEvent e => e -> Number

When the event was generated

P purescript-dom-simple M DOM.Simple.Event
fromInt :: forall a. Ring a => Int -> a
P purescript-refined M Data.Refined.Internal
number :: forall a. ToNumber a => a -> Number
P purescript-tecton M Tecton.Internal
_angle :: forall g. IsGraphObject g => g -> Number
P purescript-gojs M GoJS.GraphObject.Properties
_autoScrollInterval :: forall d. IsDiagram d => d -> Number
P purescript-gojs M GoJS.Diagram.Properties
_centerX :: forall _l _n _e v. LayoutNetwork _l _n _e v => v -> Number
P purescript-gojs M GoJS.Layout.LayoutVertex.Properties
_centerY :: forall _l _n _e v. LayoutNetwork _l _n _e v => v -> Number
P purescript-gojs M GoJS.Layout.LayoutVertex.Properties
_column :: forall g. IsGraphObject g => g -> Number
P purescript-gojs M GoJS.GraphObject.Properties
_columnCount :: forall p. IsPanel p => p -> Number
P purescript-gojs M GoJS.GraphObject.Panel.Properties
_columnSpan :: forall g. IsGraphObject g => g -> Number
P purescript-gojs M GoJS.GraphObject.Properties
_defaultRowSeparatorStrokeWidth :: forall p. IsPanel p => p -> Number
P purescript-gojs M GoJS.GraphObject.Panel.Properties
_defaultScale :: forall d. IsDiagram d => d -> Number
P purescript-gojs M GoJS.Diagram.Properties
_edgesCount :: forall _l _n _e v. LayoutNetwork _l _n _e v => v -> Number
P purescript-gojs M GoJS.Layout.LayoutVertex.Properties
_focusX :: forall _l _n _e v. LayoutNetwork _l _n _e v => v -> Number
P purescript-gojs M GoJS.Layout.LayoutVertex.Properties
_focusY :: forall _l _n _e v. LayoutNetwork _l _n _e v => v -> Number
P purescript-gojs M GoJS.Layout.LayoutVertex.Properties
_fromEndSegmentLength :: forall g. IsGraphObject g => g -> Number
P purescript-gojs M GoJS.GraphObject.Properties
_fromMaxLinks :: forall g. IsGraphObject g => g -> Number
P purescript-gojs M GoJS.GraphObject.Properties
_fromShortLength :: forall g. IsGraphObject g => g -> Number
P purescript-gojs M GoJS.GraphObject.Properties
_graduatedMax :: forall p. IsPanel p => p -> Number
P purescript-gojs M GoJS.GraphObject.Panel.Properties
_graduatedMin :: forall p. IsPanel p => p -> Number
P purescript-gojs M GoJS.GraphObject.Panel.Properties
_graduatedRange :: forall p. IsPanel p => p -> Number
P purescript-gojs M GoJS.GraphObject.Panel.Properties
_graduatedTickUnit :: forall p. IsPanel p => p -> Number
P purescript-gojs M GoJS.GraphObject.Panel.Properties
_height :: forall g. IsGraphObject g => g -> Number
P purescript-gojs M GoJS.GraphObject.Properties
_height :: forall _l _n _e v. LayoutNetwork _l _n _e v => v -> Number
P purescript-gojs M GoJS.Layout.LayoutVertex.Properties
_initialScale :: forall d. IsDiagram d => d -> Number
P purescript-gojs M GoJS.Diagram.Properties
_itemIndex :: forall p. IsPanel p => p -> Number
P purescript-gojs M GoJS.GraphObject.Panel.Properties
_layoutConditions :: forall p. IsPart p => p -> Number
P purescript-gojs M GoJS.GraphObject.Panel.Part.Properties
_leftIndex :: forall p. IsPanel p => p -> Number
P purescript-gojs M GoJS.GraphObject.Panel.Properties
_level :: forall _l _n _e v. LayoutNetwork _l _n _e v => v -> Number
P purescript-gojs M GoJS.Layout.LayoutVertex.Properties
_maxScale :: forall d. IsDiagram d => d -> Number
P purescript-gojs M GoJS.Diagram.Properties
_maxSelectionCount :: forall d. IsDiagram d => d -> Number
P purescript-gojs M GoJS.Diagram.Properties
_minScale :: forall d. IsDiagram d => d -> Number
P purescript-gojs M GoJS.Diagram.Properties
_opacity :: forall d. IsDiagram d => d -> Number
P purescript-gojs M GoJS.Diagram.Properties
_opacity :: forall g. IsGraphObject g => g -> Number
P purescript-gojs M GoJS.GraphObject.Properties
_portGravity :: forall t. IsLinkingBaseTool t => t -> Number
P purescript-gojs M GoJS.Tool.LinkingBaseTool.Properties
_row :: forall g. IsGraphObject g => g -> Number
P purescript-gojs M GoJS.GraphObject.Properties
_rowCount :: forall p. IsPanel p => p -> Number
P purescript-gojs M GoJS.GraphObject.Panel.Properties
_rowSpan :: forall g. IsGraphObject g => g -> Number
P purescript-gojs M GoJS.GraphObject.Properties
_scale :: forall d. IsDiagram d => d -> Number
P purescript-gojs M GoJS.Diagram.Properties
_scale :: forall g. IsGraphObject g => g -> Number
P purescript-gojs M GoJS.GraphObject.Properties
_scrollHorizontalLineChange :: forall d. IsDiagram d => d -> Number
P purescript-gojs M GoJS.Diagram.Properties
_scrollVerticalLineChange :: forall d. IsDiagram d => d -> Number
P purescript-gojs M GoJS.Diagram.Properties
_segmentFraction :: forall g. IsGraphObject g => g -> Number
P purescript-gojs M GoJS.GraphObject.Properties
_segmentIndex :: forall g. IsGraphObject g => g -> Number
P purescript-gojs M GoJS.GraphObject.Properties
_shadowBlur :: forall p. IsPart p => p -> Number
P purescript-gojs M GoJS.GraphObject.Panel.Part.Properties
_toEndSegmentLength :: forall g. IsGraphObject g => g -> Number
P purescript-gojs M GoJS.GraphObject.Properties
_toMaxLinks :: forall g. IsGraphObject g => g -> Number
P purescript-gojs M GoJS.GraphObject.Properties
_topIndex :: forall p. IsPanel p => p -> Number
P purescript-gojs M GoJS.GraphObject.Panel.Properties
_toShortLengh :: forall g. IsGraphObject g => g -> Number
P purescript-gojs M GoJS.GraphObject.Properties
_width :: forall g. IsGraphObject g => g -> Number
P purescript-gojs M GoJS.GraphObject.Properties
_width :: forall _l _n _e v. LayoutNetwork _l _n _e v => v -> Number
P purescript-gojs M GoJS.Layout.LayoutVertex.Properties
_x :: forall _l _n _e v. LayoutNetwork _l _n _e v => v -> Number
P purescript-gojs M GoJS.Layout.LayoutVertex.Properties
_y :: forall _l _n _e v. LayoutNetwork _l _n _e v => v -> Number
P purescript-gojs M GoJS.Layout.LayoutVertex.Properties
abs :: forall a. Based a => a -> Number
P purescript-canvas-geometry M Graphics.Canvas.Geometry
abs :: forall a. Based a => a -> Number
P purescript-geometry-plane M Data.Geometry.Plane
button :: forall a. IsMouse a => a -> Number
P purescript-weber M Weber.Event
buttons :: forall a. IsMouse a => a -> Number
P purescript-weber M Weber.Event
charCode :: forall a. IsKeyboard a => a -> Number
P purescript-weber M Weber.Event
clientX :: forall a. IsMouse a => a -> Number
P purescript-weber M Weber.Event
clientY :: forall a. IsMouse a => a -> Number
P purescript-weber M Weber.Event
deltaMode :: forall a. IsWheel a => a -> Number
P purescript-weber M Weber.Event
deltaX :: forall a. IsWheel a => a -> Number
P purescript-weber M Weber.Event
deltaY :: forall a. IsWheel a => a -> Number
P purescript-weber M Weber.Event
deltaZ :: forall a. IsWheel a => a -> Number
P purescript-weber M Weber.Event
detail :: forall a. IsUi a => a -> Number
P purescript-weber M Weber.Event
durationToNumber :: forall d. Duration d => d -> Number
P purescript-game M Game.Util
elapsedTime :: forall a. IsAnimation a => a -> Number
P purescript-weber M Weber.Event
height :: forall a. IsPointer a => a -> Number
P purescript-weber M Weber.Event
heightSegments :: forall nt r. Newtype nt (Variant (heightSegments :: Int | r)) => Int -> nt
P purescript-rito M Rito.Properties
int :: forall t. Corecursive t (SqlF EJsonF) => Int -> t
P purescript-sql-squared M SqlSquared.Constructors
keyCode :: forall a. IsKeyboard a => a -> Number
P purescript-weber M Weber.Event
layerX :: forall a. IsMouse a => a -> Number
P purescript-weber M Weber.Event
layerY :: forall a. IsMouse a => a -> Number
P purescript-weber M Weber.Event
length :: forall a. Measurable a => a -> Number
P purescript-canvas-geometry M Graphics.Canvas.Geometry
length :: forall a. Measurable a => a -> Number
P purescript-geometry-plane M Data.Geometry.Plane
location :: forall a. IsKeyboard a => a -> Number
P purescript-weber M Weber.Event
movementX :: forall a. IsMouse a => a -> Number
P purescript-weber M Weber.Event
movementY :: forall a. IsMouse a => a -> Number
P purescript-weber M Weber.Event
offsetX :: forall a. IsMouse a => a -> Number
P purescript-weber M Weber.Event
offsetY :: forall a. IsMouse a => a -> Number
P purescript-weber M Weber.Event
ord :: forall a. Based a => a -> Number
P purescript-canvas-geometry M Graphics.Canvas.Geometry
ord :: forall a. Based a => a -> Number
P purescript-geometry-plane M Data.Geometry.Plane
pageX :: forall a. IsMouse a => a -> Number
P purescript-weber M Weber.Event
pageY :: forall a. IsMouse a => a -> Number
P purescript-weber M Weber.Event
pointerId :: forall a. IsPointer a => a -> Number
P purescript-weber M Weber.Event
pressure :: forall a. IsPointer a => a -> Number
P purescript-weber M Weber.Event
screenX :: forall a. IsMouse a => a -> Number
P purescript-weber M Weber.Event
screenY :: forall a. IsMouse a => a -> Number
P purescript-weber M Weber.Event
tangentialPressure :: forall a. IsPointer a => a -> Number
P purescript-weber M Weber.Event
tiltX :: forall a. IsPointer a => a -> Number
P purescript-weber M Weber.Event
tiltY :: forall a. IsPointer a => a -> Number
P purescript-weber M Weber.Event
timeStamp :: forall a. IsEvent a => a -> Number
P purescript-weber M Weber.Event
toNumber :: forall a. IsNumber a => a -> Number
P purescript-interactive-data M InteractiveData.UI.NumberInput
toNumber :: forall a. IsNumber a => a -> Number
P purescript-interactive-data M InteractiveData.UI.Slider
twist :: forall a. IsPointer a => a -> Number
P purescript-weber M Weber.Event
which :: forall a. IsKeyboard a => a -> Number
P purescript-weber M Weber.Event
width :: forall a. IsPointer a => a -> Number
P purescript-weber M Weber.Event
widthSegments :: forall nt r. Newtype nt (Variant (widthSegments :: Int | r)) => Int -> nt
P purescript-rito M Rito.Properties

x

x :: forall a. IsMouse a => a -> Number
P purescript-weber M Weber.Event

y

y :: forall a. IsMouse a => a -> Number
P purescript-weber M Weber.Event
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.

P purescript-prelude M Data.Ord
from :: forall a rep. Generic a rep => a -> rep
P purescript-prelude M Data.Generic.Rep
genericNot :: forall a rep. Generic a rep => GenericHeytingAlgebra rep => a -> a

A Generic implementation of the not member from the HeytingAlgebra type class.

P purescript-prelude M Data.HeytingAlgebra.Generic
genericNot' :: forall a. GenericHeytingAlgebra a => a -> a
P purescript-prelude M Data.HeytingAlgebra.Generic
negate :: forall a. Ring a => a -> a

negate x can be used as a shorthand for zero - x.

P purescript-prelude M Data.Ring
not :: forall a. HeytingAlgebra a => a -> a
P purescript-prelude M Data.HeytingAlgebra
recip :: forall a. DivisionRing a => a -> a
P purescript-prelude M Data.DivisionRing
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.

P purescript-prelude M Data.Ord
to :: forall a rep. Generic a rep => rep -> a
P purescript-prelude M Data.Generic.Rep
unwrap :: forall t a. Newtype t a => t -> a
P purescript-newtype M Data.Newtype
wrap :: forall t a. Newtype t a => a -> t
P purescript-newtype M Data.Newtype
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.

P purescript-unsafe-coerce M Unsafe.Coerce
inj :: forall a b. Inject a b => a -> b
P purescript-either M Data.Either.Inject
unsafePartial :: forall a. (Partial => a) -> a

Discharge a partiality constraint, unsafely.

P purescript-partial M Partial.Unsafe
from :: forall a b. TypeEquals a b => b -> a
P purescript-type-equality M Type.Equality
to :: forall a b. TypeEquals a b => a -> b
P purescript-type-equality M Type.Equality
convertDuration :: forall a b. Duration a => Duration b => a -> b

Converts directly between durations of differing types.

P purescript-datetime M Data.Time.Duration
negateDuration :: forall a. Duration a => a -> a

Negates a duration, turning a positive duration negative or a negative duration positive.

P purescript-datetime M Data.Time.Duration
coerce :: forall a b. Coercible a b => a -> b

Coerce a value of one type to a value of some other type, without changing its runtime representation. This function behaves identically to unsafeCoerce at runtime. Unlike unsafeCoerce, it is safe, because the Coercible constraint prevents any use of this function from compiling unless the compiler can prove that the two types have the same runtime representation.

One application for this function is to avoid doing work that you know is a no-op because of newtypes. For example, if you have an Array (Conj a) and you want an Array (Disj a), you could do Data.Array.map (un Conj >>> Disj), but this performs an unnecessary traversal of the array, with O(n) cost. coerce accomplishes the same with only O(1) cost:

mapConjToDisj :: forall a. Array (Conj a) -> Array (Disj a)
mapConjToDisj = coerce
P purescript-safe-coerce M Safe.Coerce
div10 :: forall x q. Div10 x q => x -> q
P purescript-typelevel M Data.Typelevel.Num.Ops
isDivBy :: forall d x. IsDivBy d x => d -> x
P purescript-typelevel M Data.Typelevel.Num.Ops
mul10 :: forall x q. Mul10 x q => x -> q
P purescript-typelevel M Data.Typelevel.Num.Ops
not :: forall b1 b2. Not b1 b2 => b1 -> b2
P purescript-typelevel M Data.Typelevel.Bool
pred :: forall x y. Pred x y => x -> y
P purescript-typelevel M Data.Typelevel.Num.Ops
succ :: forall x y. Succ x y => x -> y
P purescript-typelevel M Data.Typelevel.Num.Ops
genFloat64 :: forall m. MonadGen m => m Number
P purescript-arraybuffer M Data.ArrayBuffer.Typed.Gen
cast :: forall a b. Castable a b => a -> b
P purescript-untagged-union M Untagged.Castable
coerce :: forall expected given. Coerce given expected => given -> expected
P purescript-undefined-is-not-a-problem M Data.Undefined.NoProblem.Closed
coerce :: forall expected given. Coerce given expected => given -> expected
P purescript-undefined-is-not-a-problem M Data.Undefined.NoProblem.Open
convertTo :: forall t f r. Recursive t f => Corecursive r f => t -> r
P purescript-matryoshka M Matryoshka.Refold
fill :: forall partial complete. Fillable partial complete => partial -> complete
P purescript-justifill M Justifill.Fillable
ginverse :: forall g. Group g => g -> g
P purescript-group M Data.Group
justify :: forall unjust just. Justifiable unjust just => unjust -> just
P purescript-justifill M Justifill.Justifiable
mnegateL :: forall r x. LeftModule x r => x -> x
P purescript-modules M Data.Ring.Module
mnegateR :: forall r x. RightModule x r => x -> x
P purescript-modules M Data.Ring.Module
nextPrime :: forall a. Ord a => Semiring a => EuclideanRing a => a -> a

Ad infinitum

P purescript-sparse-polynomials M Data.Sparse.Polynomial
area :: forall s n. ToSize n s => Semiring n => s -> n

Get the area of a size

P purescript-polymorphic-vectors M Data.Vector.Polymorphic
convertPos :: forall p1 p2 n. ToPos n p1 => FromPos n p2 => p1 -> p2
P purescript-polymorphic-vectors M Data.Vector.Polymorphic
convertRegion :: forall p1 p2 n. ToRegion n p1 => FromRegion n p2 => p1 -> p2
P purescript-polymorphic-vectors M Data.Vector.Polymorphic
convertSize :: forall p1 p2 n. ToSize n p1 => FromSize n p2 => p1 -> p2
P purescript-polymorphic-vectors M Data.Vector.Polymorphic
init :: forall fn a. Init fn a => fn -> a
P purescript-classless M Classless
initProduct :: forall f a. InitProduct f a => f -> a
P purescript-classless M Classless
measure :: forall a v. Measured a v => a -> v
P purescript-sequences M Data.Sequence.Internal
midPos :: forall s p n. ToRegion n s => FromPos n p => EuclideanRing n => s -> p

Get the center position of a region

P purescript-polymorphic-vectors M Data.Vector.Polymorphic