| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Unison.Var
Synopsis
- class (Show v, Var v) => Var v where
- data Type
- data InferenceType
- bakeId :: Var v => v -> v
- blank :: Var v => v
- freshIn :: Var v => Set v -> v -> v
- inferAbility :: Var v => v
- inferInput :: Var v => v
- inferOther :: Var v => v
- inferOutput :: Var v => v
- inferPatternBindE :: Var v => v
- inferPatternBindV :: Var v => v
- inferPatternPureE :: Var v => v
- inferPatternPureV :: Var v => v
- inferTypeConstructor :: Var v => v
- inferTypeConstructorArg :: Var v => v
- isAction :: Var v => v -> Bool
- missingResult :: Var v => v
- name :: Var v => v -> Text
- nameStr :: Var v => v -> String
- named :: Var v => Text -> v
- nameds :: Var v => String -> v
- rawName :: Type -> Text
- reset :: Var v => v -> v
- uncapitalize :: Var v => v -> v
- universallyQuantifyIfFree :: forall v. Var v => v -> Bool
- unnamedRef :: Var v => Id -> v
- unnamedTest :: Var v => Text -> v
Documentation
class (Show v, Var v) => Var v where Source #
A class for variables. Variables may have auxiliary information which
may not form part of their identity according to Eq / Ord. Laws:
- `typeOf (typed n) == n`
- `typeOf (ABT.freshIn vs v) == typeOf v`:
freshIndoes not alter the name
Constructors
| User Text | |
| Inference InferenceType | |
| MissingResult | |
| Blank | |
| UnnamedReference Id | An unnamed reference, created during unhashing a term/decl component. |
| UnnamedWatch WatchKind Text | |
| Eta | |
| ANFBlank | |
| Float | |
| Pattern | |
| Irrelevant | |
| Delay | |
| AffBlank |
data InferenceType Source #
Constructors
| Ability | |
| Input | |
| Output | |
| PatternPureE | |
| PatternPureV | |
| PatternBindE | |
| PatternBindV | |
| TypeConstructor | |
| TypeConstructorArg | |
| Other |
Instances
| Show InferenceType Source # | |
Defined in Unison.Var Methods showsPrec :: Int -> InferenceType -> ShowS # show :: InferenceType -> String # showList :: [InferenceType] -> ShowS # | |
| Eq InferenceType Source # | |
Defined in Unison.Var Methods (==) :: InferenceType -> InferenceType -> Bool # (/=) :: InferenceType -> InferenceType -> Bool # | |
| Ord InferenceType Source # | |
Defined in Unison.Var Methods compare :: InferenceType -> InferenceType -> Ordering # (<) :: InferenceType -> InferenceType -> Bool # (<=) :: InferenceType -> InferenceType -> Bool # (>) :: InferenceType -> InferenceType -> Bool # (>=) :: InferenceType -> InferenceType -> Bool # max :: InferenceType -> InferenceType -> InferenceType # min :: InferenceType -> InferenceType -> InferenceType # | |
inferAbility :: Var v => v Source #
inferInput :: Var v => v Source #
inferOther :: Var v => v Source #
inferOutput :: Var v => v Source #
inferPatternBindE :: Var v => v Source #
inferPatternBindV :: Var v => v Source #
inferPatternPureE :: Var v => v Source #
inferPatternPureV :: Var v => v Source #
inferTypeConstructor :: Var v => v Source #
inferTypeConstructorArg :: Var v => v Source #
isAction :: Var v => v -> Bool Source #
Currently, actions in blocks are encoded as bindings
with names of the form _123 (an underscore, followed by
1 or more digits). This function returns True if the
input variable has this form.
Various places check for this (the pretty-printer, to
determine how to print the binding), and the typechecker
(to decide if it should ensure the binding has type ()).
missingResult :: Var v => v Source #
uncapitalize :: Var v => v -> v Source #
universallyQuantifyIfFree :: forall v. Var v => v -> Bool Source #
unnamedRef :: Var v => Id -> v Source #
unnamedTest :: Var v => Text -> v Source #