Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type RedundantTypeAnnotation = Bool
- type Extractor e a = MaybeT (Reader e) a
- type ErrorExtractor v loc a = Extractor (ErrorNote v loc) a
- type InfoExtractor v loc a = Extractor (InfoNote v loc) a
- type PathExtractor v loc a = Extractor (PathElement v loc) a
- type SubseqExtractor v loc a = SubseqExtractor' (ErrorNote v loc) a
- extractor :: (e -> Maybe a) -> Extractor e a
- extract :: Extractor e a -> e -> Maybe a
- subseqExtractor :: (ErrorNote v loc -> [Ranged a]) -> SubseqExtractor v loc a
- traceSubseq :: Show a => String -> SubseqExtractor' n a -> SubseqExtractor' n a
- traceNote :: Show a => String -> ErrorExtractor v loc a -> ErrorExtractor v loc a
- unique :: SubseqExtractor v loc a -> ErrorExtractor v loc a
- data SubseqExtractor' n a = SubseqExtractor' {}
- data Ranged a
- _no :: SubseqExtractor' n a -> SubseqExtractor' n ()
- _any :: SubseqExtractor v loc ()
- _any' :: (n -> Int) -> SubseqExtractor' n ()
- data DistinctRanged a = DistinctRanged a Int Int
- some :: forall n a. SubseqExtractor' n a -> SubseqExtractor' n [a]
- pathStart :: SubseqExtractor' n ()
- asPathExtractor :: (PathElement v loc -> Maybe a) -> SubseqExtractor v loc a
- inSynthesize :: SubseqExtractor v loc (Term v loc)
- inSubtype :: SubseqExtractor v loc (Type v loc, Type v loc)
- inEquate :: SubseqExtractor v loc (Type v loc, Type v loc)
- inCheck :: SubseqExtractor v loc (Term v loc, Type v loc)
- inSynthesizeApp :: SubseqExtractor v loc (Type v loc, Term v loc, Int)
- inFunctionCall :: SubseqExtractor v loc ([v], Term v loc, Type v loc, [Term v loc])
- inAndApp :: SubseqExtractor v loc ()
- inOrApp :: SubseqExtractor v loc ()
- inIfCond :: SubseqExtractor v loc ()
- inMatchGuard :: SubseqExtractor v loc ()
- inMatchBody :: SubseqExtractor v loc ()
- inMatch :: SubseqExtractor v loc loc
- inVector :: SubseqExtractor v loc loc
- inIfBody :: SubseqExtractor v loc loc
- cause :: ErrorExtractor v loc (Cause v loc)
- duplicateDefinitions :: ErrorExtractor v loc (NonEmpty (v, [loc]))
- uncoveredPatterns :: ErrorExtractor v loc (loc, NonEmpty (Pattern ()))
- redundantPattern :: ErrorExtractor v loc loc
- kindInferenceFailure :: ErrorExtractor v loc (KindError v loc)
- typeMismatch :: ErrorExtractor v loc (Context v loc)
- illFormedType :: ErrorExtractor v loc (Context v loc)
- unknownSymbol :: ErrorExtractor v loc (loc, v)
- unknownTerm :: Var v => ErrorExtractor v loc (loc, v, [Suggestion v loc], Type v loc)
- abilityCheckFailure :: ErrorExtractor v loc ([Type v loc], [Type v loc], Context v loc)
- abilityEqFailure :: ErrorExtractor v loc ([Type v loc], [Type v loc], Context v loc)
- effectConstructorWrongArgCount :: ErrorExtractor v loc (ExpectedArgCount, ActualArgCount, ConstructorReference)
- malformedEffectBind :: ErrorExtractor v loc (Type v loc, Type v loc, [Type v loc])
- solvedBlank :: InfoExtractor v loc (Recorded loc, v, Type v loc)
- errorNote :: ErrorExtractor v loc (ErrorNote v loc)
- infoNote :: InfoExtractor v loc (InfoNote v loc)
- innermostTerm :: ErrorExtractor v loc (Term v loc)
- path :: ErrorExtractor v loc [PathElement v loc]
- topLevelComponent :: InfoExtractor v loc [(v, Type v loc, RedundantTypeAnnotation)]
Documentation
type RedundantTypeAnnotation = Bool Source #
type ErrorExtractor v loc a = Extractor (ErrorNote v loc) a Source #
type InfoExtractor v loc a = Extractor (InfoNote v loc) a Source #
type PathExtractor v loc a = Extractor (PathElement v loc) a Source #
type SubseqExtractor v loc a = SubseqExtractor' (ErrorNote v loc) a Source #
subseqExtractor :: (ErrorNote v loc -> [Ranged a]) -> SubseqExtractor v loc a Source #
traceSubseq :: Show a => String -> SubseqExtractor' n a -> SubseqExtractor' n a Source #
traceNote :: Show a => String -> ErrorExtractor v loc a -> ErrorExtractor v loc a Source #
unique :: SubseqExtractor v loc a -> ErrorExtractor v loc a Source #
data SubseqExtractor' n a Source #
Instances
_no :: SubseqExtractor' n a -> SubseqExtractor' n () Source #
collects the regions where xa
doesn't match / aka invert a set of intervals
unused, but don't want to delete it yet - Aug 30, 2018
_any :: SubseqExtractor v loc () Source #
_any' :: (n -> Int) -> SubseqExtractor' n () Source #
data DistinctRanged a Source #
Instances
Eq (DistinctRanged a) Source # | |
Defined in Unison.Typechecker.Extractor (==) :: DistinctRanged a -> DistinctRanged a -> Bool # (/=) :: DistinctRanged a -> DistinctRanged a -> Bool # | |
Ord (DistinctRanged a) Source # | |
Defined in Unison.Typechecker.Extractor compare :: DistinctRanged a -> DistinctRanged a -> Ordering # (<) :: DistinctRanged a -> DistinctRanged a -> Bool # (<=) :: DistinctRanged a -> DistinctRanged a -> Bool # (>) :: DistinctRanged a -> DistinctRanged a -> Bool # (>=) :: DistinctRanged a -> DistinctRanged a -> Bool # max :: DistinctRanged a -> DistinctRanged a -> DistinctRanged a # min :: DistinctRanged a -> DistinctRanged a -> DistinctRanged a # |
some :: forall n a. SubseqExtractor' n a -> SubseqExtractor' n [a] Source #
pathStart :: SubseqExtractor' n () Source #
asPathExtractor :: (PathElement v loc -> Maybe a) -> SubseqExtractor v loc a Source #
inSynthesize :: SubseqExtractor v loc (Term v loc) Source #
inSynthesizeApp :: SubseqExtractor v loc (Type v loc, Term v loc, Int) Source #
inFunctionCall :: SubseqExtractor v loc ([v], Term v loc, Type v loc, [Term v loc]) Source #
inAndApp :: SubseqExtractor v loc () Source #
inOrApp :: SubseqExtractor v loc () Source #
inIfCond :: SubseqExtractor v loc () Source #
inMatchGuard :: SubseqExtractor v loc () Source #
inMatchBody :: SubseqExtractor v loc () Source #
inMatch :: SubseqExtractor v loc loc Source #
inVector :: SubseqExtractor v loc loc Source #
inIfBody :: SubseqExtractor v loc loc Source #
cause :: ErrorExtractor v loc (Cause v loc) Source #
duplicateDefinitions :: ErrorExtractor v loc (NonEmpty (v, [loc])) Source #
uncoveredPatterns :: ErrorExtractor v loc (loc, NonEmpty (Pattern ())) Source #
redundantPattern :: ErrorExtractor v loc loc Source #
kindInferenceFailure :: ErrorExtractor v loc (KindError v loc) Source #
typeMismatch :: ErrorExtractor v loc (Context v loc) Source #
illFormedType :: ErrorExtractor v loc (Context v loc) Source #
unknownSymbol :: ErrorExtractor v loc (loc, v) Source #
unknownTerm :: Var v => ErrorExtractor v loc (loc, v, [Suggestion v loc], Type v loc) Source #
abilityCheckFailure :: ErrorExtractor v loc ([Type v loc], [Type v loc], Context v loc) Source #
abilityEqFailure :: ErrorExtractor v loc ([Type v loc], [Type v loc], Context v loc) Source #
effectConstructorWrongArgCount :: ErrorExtractor v loc (ExpectedArgCount, ActualArgCount, ConstructorReference) Source #
malformedEffectBind :: ErrorExtractor v loc (Type v loc, Type v loc, [Type v loc]) Source #
solvedBlank :: InfoExtractor v loc (Recorded loc, v, Type v loc) Source #
errorNote :: ErrorExtractor v loc (ErrorNote v loc) Source #
infoNote :: InfoExtractor v loc (InfoNote v loc) Source #
innermostTerm :: ErrorExtractor v loc (Term v loc) Source #
path :: ErrorExtractor v loc [PathElement v loc] Source #
topLevelComponent :: InfoExtractor v loc [(v, Type v loc, RedundantTypeAnnotation)] Source #