Rule 2s-atexp-longvar
Atomic Expressions
(2)
Comments
Referred to from
TeX source
\defnrule[r:s-atexp-longvar]
{C(\longvar) = (\sigma, \is) \premsep \sigma \succ \tau}
{\jdg{C}{\longvar}{\tau}}Tests (20)
- elm / DebugLogLambdaBoundaryTestA `case` branch that returns a lambda whose parameter is named `log` can still call `Debug.log` inside that lambda.
- elm / EmbeddedNothingPolymorphicTest`Nothing`, `[]` and `""` pass unchanged through the polymorphic `identity`, the first two then also through a function with a concrete type.
- elm / ImportResolutionQualifiedImportedFunctionTestA call written with the module qualifier, `Basics.negate`, resolves to the imported function even though the module is also imported with `exposing (..)`.
- elm / LetNumberContainerDualTestOne unannotated `let`-bound tuple of number literals is used both as Ints and as Floats.
- elm / LetNumberDualUseTestAn unannotated let-bound `number` value can be used as an `Int` and as a `Float` in the same expression, because Elm generalizes the type of a `let` binding and each use picks its own type.
- elm / LetNumberListCaseTestA `number` computed by a `case` over a let-bound list can be used both as an `Int` and as a `Float`, because Elm generalizes the type of a `let` binding.
- elm / MinimalVariableTestA top-level variable denotes the value of its definition.
- elm / NamingErrorAnUnknownVariableTestA reference to a variable that is defined nowhere, `undefinedName`, is rejected with a NAMING ERROR.
- elm / PartialAppCaptureTypesTestTests partial applications that hold a bound `Float`, `Char`, `Bool` or `String` argument and return it when later given the remaining arguments.
- elm / PolyApplyLambdaTestTests a polymorphic `apply f x = f x` called with an `Int` function, a `String` function and an anonymous lambda.
- elm / PolyChainCallTestTests a polymorphic function that calls another polymorphic function twice, building a binary tree of two nodes that is then counted.
- elm / PolyChainDictLikeInsertChained5TimesWithTupleKeysConcreteCallerTestTests a polymorphic `insert` on a list-like dictionary type, called five times in a chain from a function with concrete `( String, Int )` keys and `Int` values.
- elm / PolyChainFoldlLikeCalled8TimesOverTupleKeyedStructureTestTests a polymorphic fold-like function called eight times in a chain, each with a step function over `( List String, Global )` elements and the previous call's result as the initial value.
- elm / PolyLetConstTestA let-bound polymorphic `const` is used at two different type combinations in the same scope, and each use returns its first argument.
- elm / PolySpecializeRecursiveTestAnnotated polymorphic recursive functions, `myLength` and `myMap`, give the right results when called at both `Int` and `String` element types.
- elm / PolyTailRecReverseTestAn unannotated, polymorphic, tail-recursive list reverse gives the right result at both `Int` and `String` element types.
- elm / TooManyArgsTooManyArgumentsToALocalTestA top-level `Int` value applied to an argument is rejected with a TOO MANY ARGS error.
- elm / TypeClassConstraintTestChecks functions whose types use the constrained type variables `number`, `comparable` and `appendable`.
- elm / TypeMismatchDifferentlyNamedComparableVarsTestA list of two tuples whose first components are values of different custom types is rejected with a TYPE MISMATCH, where the second components are functions annotated with differently named `comparable` variables.
- elm / TypeMismatchDifferentlyNamedFlexVarsTestA list of two tuples whose first components are values of different custom types is rejected with a TYPE MISMATCH, where the second components are functions annotated with differently named type variables.
Discussions
Discuss this rule·Search the discussions on GitHub
Discussions are on GitHub; one about this rule has [r:s-atexp-longvar] in its title.
A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.