Search results
genericShow :: forall a rep. Generic a rep => GenericShow rep => a -> String
A Generic
implementation of the show
member from the Show
type class.
genericShow' :: forall a. GenericShow a => a -> String
show :: forall a. Show a => a -> String
toJsonString :: forall t. EncodeJson t => t -> String
Encode and stringify a type in one step.
encodeJSON :: forall a. Encode a => a -> String
Encode a JSON string using an Encode
instance.
unsafeStringify :: forall a. a -> String
writeJSON :: forall a. WriteForeign a => a -> String
Write a JSON string from a type a
.
unsafeStringify :: forall a. a -> String
writeJSON :: forall a. WriteForeign a => a -> String
Write a JSON string from a type a
.
defaultMessage :: forall error. error -> String
defaultName :: forall error. error -> String
message :: forall error. Error error => error -> String
name :: forall error. Error error => error -> String
toAttrib :: forall a. IsAttrib a => a -> String
toAttrib :: forall a. IsAttrib a => a -> String
code :: forall error. NodeError error => error -> String
defaultCode :: forall error. error -> String
defaultStack :: forall error. error -> String
localName :: forall el. IsElement el => el -> String
nodeName :: forall n. IsNode n => n -> String
For elements this is the tag name, for document types this is the doctype
name, for processing instructions this is the target, for all other nodes
it is a string like "#text"
, `"#comment", etc. depending on the node
type.
stack :: forall error. NodeError error => error -> String
tagName :: forall el. IsElement el => el -> String
typeOf :: forall a. a -> String
Gets the type of an object with javascript typeof
unsafeJsonStringify :: forall a. a -> String
fmtVar :: forall a. FormatVar a => a -> String
renderValue :: forall a. Value a => a -> String
stringifyKey :: forall a. GrainKey a => a -> String
toHeader :: forall x. ToHeader x => x -> String
toPathPiece :: forall x. ToPathPiece x => x -> String
innerHTML :: forall e. IsElement e => e -> String
name :: forall n. IsNode n => n -> String
textContent :: forall n. IsNode n => n -> String
toColorRep :: forall color. CanvasColor color => color -> String
toText :: forall a. DotLang a => a -> String
type' :: forall e. IsEvent e => e -> String
A string descriptor of the event name (lowercase, no on
)
encodeKey :: forall a. EncodeKey a => a -> String
getKey :: forall a. HasKey a => a -> String
mergeDecl :: forall a. IsDecl a => a -> String
renderEJson :: forall t. Recursive t EJsonF => t -> String
structName :: forall a. a -> String
Gets the contructor name for the type
toString :: forall a. Serializable a => a -> String
unsafeEventValue :: forall event. event -> String
_alignmentFocusName :: forall p. IsPanel p => p -> String
_background :: forall g. IsGraphObject g => g -> String
_category :: forall p. IsPart p => p -> String
_currentCursor :: forall d. IsDiagram d => d -> String
_cursor :: forall g. IsGraphObject g => g -> String
_dataFormat :: forall m. IsModel m => m -> String
_defaultCursor :: forall d. IsDiagram d => d -> String
_defaultRowSeparatorStroke :: forall p. IsPanel p => p -> String
_layerName :: forall p. IsPart p => p -> String
_linkingCursor :: forall t. IsLinkingBaseTool t => t -> String
_locationObjectName :: forall p. IsPart p => p -> String
_name :: forall g. IsGraphObject g => g -> String
_name :: forall m. IsModel m => m -> String
_name :: forall t. IsTool t => t -> String
_nodeKeyProperty :: forall m. IsModel m => m -> String
_renderer :: forall d. IsDiagram d => d -> String
_resizeObjectName :: forall p. IsPart p => p -> String
_rotateObjectName :: forall p. IsPart p => p -> String
_selectionObjectName :: forall p. IsPart p => p -> String
_shadowColor :: forall p. IsPart p => p -> String
_text :: forall p. IsPart p => p -> String
animationName :: forall a. IsAnimation a => a -> String
classNames :: forall a. ClassNames a => a -> String
code :: forall a. IsKeyboard a => a -> String
d :: forall a. HasDate a => a -> String
Day of month - with digits
dd :: forall a. HasDate a => a -> String
Day of month - two digits
ddd :: forall a. HasDate a => a -> String
Day of month short text - like Mon, Tue ...
dddd :: forall a. HasDate a => a -> String
Day of month full text - like Monday, Tuesday, ...
defaultEncodeJSON :: forall b a. Generic a b => GenericEncode b => a -> String
defaultHttpVersion :: forall message. message -> String
defaultPrintEnum :: forall a ty. CustomEnum a ty => a -> String
encode :: forall a. CookieEncoder a => a -> String
encode' :: forall a. EncodeJson a => a -> String
encodeBody :: forall body. EncodeBody body => body -> String
encodeJSON :: forall a. Encode a => a -> String
Encode a JSON string using an Encode
instance.
encodeParam :: forall a. EncodeParam a => a -> String
encodeResponse :: forall response. IsResponse response => response -> String
encodeYml :: forall a. EncodeJson a => a -> String
encodeYml :: forall a. EncodeJson a => a -> String
fmt :: forall @sym sym' head tail replace. Parse DefaultConfig head tail replace => Append sym EOF sym' => Cons head tail sym' => replace -> String
fmtWith :: forall @config @sym config' sym' head tail replace. Parse config' head tail replace => Append sym EOF sym' => Cons head tail sym' => EvalConfigSpec config config' => replace -> String
format :: forall a. Format a => a -> String
formatQueryString :: forall b a. Newtype a b => ToQueryString b => a -> String
from :: forall a. StringArg a => a -> String
genericPrintEnum :: forall a g. Generic a g => GenericCustomEnum g => a -> String
genericPrintEnum' :: forall a. GenericCustomEnum a => a -> String
getAddress :: forall a. Address a => a -> String
getKey :: forall a. Storable a => a -> String
Given a storable a
will produce the key that it would have in storage.
getTagName :: forall a. GetTagName a => a -> String
getTagNameImpl :: forall rep. GetTagNameImpl rep => rep -> String
getVarsTypeNames :: forall query. VarsTypeChecked query => query -> String
hh :: forall a. HasTime a => a -> String
Hours with two digits - in 24h format
httpVersion :: forall message. IncomingMessage message => message -> String
inspect :: forall a. HasInspect a => a -> String
jsonStringify :: forall a. a -> String
key :: forall a. Storable a => a -> String
Produces a key from the given a
. This is most appropriately an id
or something like it.
key :: forall a. IsKeyboard a => a -> String
m :: forall a. HasDate a => a -> String
Month with digits
mi :: forall a. HasTime a => a -> String
Minutes with two digits
mm :: forall a. HasDate a => a -> String
Month with two digits
mmm :: forall a. HasDate a => a -> String
Month short text - like Jan, Feb, ...
mmmm :: forall a. HasDate a => a -> String
Month full text - like January, Februrary, ...
nameList :: forall fieldNames. NameList fieldNames => fieldNames -> String
pointerType :: forall a. IsPointer a => a -> String
printEnum :: forall a ty. CustomEnum a ty => a -> String
printYAML :: forall a. ToYAML a => a -> String
propertyName :: forall a. IsTransition a => a -> String
pseudoElement :: forall a. IsAnimation a => a -> String
renderString :: forall a. Render a => a -> String
serialize :: forall m. SerializeState m => m -> String
serialize :: forall a. Serializable a => a -> String
serialize :: forall a. Storable a => a -> String
Takes an a
and (hopefully) reliably turns it into a string; this should be symmetric with
deserialize
. This can be conveniently implemented using Simple.JSON
.
showDebug :: forall a. ShowDebug a => a -> String
showInt :: forall a. BoundedEnum a => a -> String
showStructure :: forall s. Structure s => s -> String
showWithoutQuotes :: forall a. Show a => a -> String
ss :: forall a. HasTime a => a -> String
Seconds with two digits
toDoc :: forall a. Loggable a => a -> String
toFlowRep' :: forall a. HasFlowRep a => a -> String
A convenience function for getting the flow rep of a concrete value
toGqlAndArgsStringImpl :: forall q. GqlAndArgsString q => q -> String
toGqlArgString :: forall q. GqlArgString q => q -> String
toGqlArgStringImpl :: forall q. GqlArgString q => q -> String
toGqlQueryString :: forall q. GqlQueryString q => q -> String
Generate a GraphQL query from its purs representation
toGqlQueryStringFormatted :: forall q. GqlQueryString q => q -> String
Generate a GraphQL query from its purs representation, formatted with indentation for human readability
toHex :: forall a. ToHex a => a -> String
toJson :: forall a. EncodeJson a => a -> String
toJsonStr :: forall a. EncodeJson a => a -> String
toParam :: forall a. ToParam a => a -> String
toPathSegment :: forall a. PathPiece a => a -> String
toQueryString :: forall a. ToQueryString a => a -> String
toStr :: forall a. ShouldStr a => a -> String
toString :: forall a. IsString a => a -> String
toString :: forall a. ToString a => a -> String
toString :: forall a sym. ToString a sym => a -> String
toString :: forall a. IsNumber a => a -> String
toString :: forall rep. GenericSelect rep => rep -> String
toString :: forall a. IsLength a => a -> String
toString_ :: forall a. a -> String
type' :: forall a. IsEvent a => a -> String
typeof :: forall a. a -> String
typeofk :: forall k. k -> String
unsafeStringify :: forall a. a -> String
Uses the global JSON object to turn anything into a string. Careful! Trying to serialize functions returns undefined
whichBrushPatternStr :: forall k. k -> String
whichPictureElementStr :: forall k. k -> String
writeCSV :: forall a. WriteCSV a => a -> String
writeGraphQL :: forall a. WriteGraphQL a => a -> String
yyyy :: forall a. HasDate a => a -> String
Jear full - like 2020
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
to :: forall a b. TypeEquals a b => a -> b
convertDuration :: forall a b. Duration a => Duration b => a -> b
Converts directly between durations of differing types.
negateDuration :: forall a. Duration a => a -> a
Negates a duration, turning a positive duration negative or a negative duration positive.
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
div10 :: forall x q. Div10 x q => x -> q
isDivBy :: forall d x. IsDivBy d x => d -> x
mul10 :: forall x q. Mul10 x q => x -> q
not :: forall b1 b2. Not b1 b2 => b1 -> b2
pred :: forall x y. Pred x y => x -> y
succ :: forall x y. Succ x y => x -> y
cast :: forall a b. Castable a b => a -> b
coerce :: forall expected given. Coerce given expected => given -> expected
coerce :: forall expected given. Coerce given expected => given -> expected
ginverse :: forall g. Group g => g -> g
convertTo :: forall t f r. Recursive t f => Corecursive r f => t -> r
fill :: forall partial complete. Fillable partial complete => partial -> complete
justify :: forall unjust just. Justifiable unjust just => unjust -> just
mnegateL :: forall r x. LeftModule x r => x -> x
mnegateR :: forall r x. RightModule x r => x -> x
nextPrime :: forall a. Ord a => Semiring a => EuclideanRing a => a -> a
Ad infinitum
pad :: forall @n a b. Pad n a b => a -> b
unpad :: forall @n a b. Unpad n a b => b -> a
area :: forall s n. ToSize n s => Semiring n => s -> n
Get the area of a size
convertPos :: forall p1 p2 n. ToPos n p1 => FromPos n p2 => p1 -> p2
convertRegion :: forall p1 p2 n. ToRegion n p1 => FromRegion n p2 => p1 -> p2
convertSize :: forall p1 p2 n. ToSize n p1 => FromSize n p2 => p1 -> p2
init :: forall fn a. Init fn a => fn -> a
initProduct :: forall f a. InitProduct f a => f -> a
measure :: forall a v. Measured a v => a -> v
midPos :: forall s p n. ToRegion n s => FromPos n p => EuclideanRing n => s -> p
Get the center position of a region
perimeter :: forall s n. ToSize n s => Semiring n => s -> n
Get the perimeter of a size
ratio :: forall s n. ToSize n s => EuclideanRing n => s -> n
Get the ratio of a size by dividing the width by the height
undefer :: forall a. (Deferred => a) -> a
Note: use of this function may result in arbitrary side effects.
always :: forall a b. Always a b => a -> b
at :: forall m. XPathLike m => m -> m
Prepend an '@'
complement :: forall p. Bounded p => Ring p => p -> p
convert :: forall b a. TokenUnit a => TokenUnit b => a -> b
Convert between two denominations
debugger :: forall a. a -> a
Inserts a JavaScript debugger
statement, then returns its argument.
dir :: forall a. a -> a
Calls console.dir
with its argument, then returns it.
inj :: forall l a. Includes l a => a -> l
Inject a value into an otherwise empty heterogeneous list.
log :: forall a. a -> a
Calls console.log
with its argument, then returns it.
-- log a value as it's used
func a = todo $ log a
-- explicitly log an argument because it may not be used
func a =
let
_ = log a
in
todo
-- log the value inside a functor
func ma = do
a <- log <$> pure ma
todo
logShow :: forall a. Show a => a -> a
For an argument a
, calls console.log
on show a
, then returns a
.
nextSibling :: forall n m. IsNode n => IsNode m => n -> m
Gets the next sibling
parentNode :: forall n m. IsNode n => IsNode m => n -> m
prevSibling :: forall n m. IsNode n => IsNode m => n -> m
Gets the previous sibling
tUnit :: forall u1 u0 bf c. HasTUnit c bf u0 u1 => HasUnit c u1 => u0 -> u1
unsafeDir :: forall a b. a -> b
Like dir
except it coerces the input to any type.
unsafeLog :: forall a b. a -> b
Like log
except it coerces the input to any type.
xx :: forall m. XPathLike m => m -> m
Prepend a dummy namespace
abs :: forall a. Num a => a -> a
asTS :: forall b a. IsTSEq a b => a -> b
coerce :: forall a b. Coercible a b => a -> b
convertImpl :: forall input output. ToInternalConverter input output => input -> output
dbgs :: forall s. Show s => s -> s
embed :: forall a r. Algebra a r => r -> a
foldLineNames :: forall i o. FoldLineNames i o => i -> o
foldOf :: forall s t a b @sym lenses. IsSymbol sym => ParseSymbol sym lenses => ConstructBarlow lenses (Forget a) s t a b => s -> a
fromFractional :: forall b a. Fractional a => Fractional b => a -> b
A helper function for general conversion between Fractional
values.
fromIntegral :: forall b a. Integral a => Integral b => a -> b
A helper function for general conversion between Integral
values.
hasJSRep :: forall a. HasJSRep a => a -> a
magicProps :: forall props. props -> props
mkPrim :: forall a b. Primitive a b => a -> b
mnegateL :: forall r x. LeftModule x r => x -> x
mnegateR :: forall r x. RightModule x r => x -> x
negate :: forall a. Num a => a -> a
not :: forall a. Binary a => a -> a
px :: forall next res. PursxStringAnonymous ((Proxy "a") /\ (Proxy "") /\ (Record ())) next res => next -> res
signum :: forall a. Num a => a -> a
stripLeadingZeros :: forall a. Elastic a => a -> a
toTuples :: forall a b. ToTuples a b => a -> b
unsafeLeftShift :: forall a. Binary a => a -> a
unsafeRightShift :: forall a. Binary a => a -> a
view :: forall s t a b @sym lenses. IsSymbol sym => ParseSymbol sym lenses => ConstructBarlow lenses (Forget a) s t a b => s -> a
xformEventProps :: forall props. props -> props
_diagram :: forall t @d. IsTool t => IsDiagram d => t -> d
_fromVertex :: forall _l _n e v. LayoutNetwork _l _n e v => e -> v
_layout :: forall d @l. IsDiagram d => IsLayout l => d -> l
_locationObject :: forall p @g. IsPart p => IsGraphObject g => p -> g
_model :: forall d @m. IsDiagram d => IsModel m => d -> m
_network :: forall l n _e _v. LayoutNetwork l n _e _v => l -> n
_nodeTemplate :: forall d @p. IsDiagram d => IsPart p => d -> p
_originalFromNode :: forall t @n. IsLinkingBaseTool t => IsNode n => t -> n
_originalFromPort :: forall t @p. IsLinkingBaseTool t => IsGraphObject p => t -> p
_originalToNode :: forall t @n. IsLinkingBaseTool t => IsNode n => t -> n
_originalToPort :: forall t @p. IsLinkingBaseTool t => IsGraphObject p => t -> p
_resizeObject :: forall p @g. IsPart p => IsGraphObject g => p -> g
No further results.