unison-parser-typechecker-0.0.0
Safe HaskellNone
LanguageHaskell2010

Unison.PrintError

Synopsis

Documentation

ordinal :: IsString s => Int -> s Source #

Return the ordinal representation of a number in English. A number ending with '1' must finish with st A number ending with '2' must finish with nd A number ending with '3' must finish with rd _except_ for 11, 12, and 13 which must finish with th

prettyResolutionFailures Source #

Arguments

:: (Annotated a, Ord a) 
=> String

src

-> [ResolutionFailure a] 
-> Pretty ColorText 

Pretty prints resolution failure annotations, including a table of disambiguation suggestions.

renderNoteAsANSI :: (Var v, Annotated a, Show a, Ord a) => Width -> Env -> String -> Note v a -> Text Source #

renderTypeWarnings :: (Var v, Annotated loc, Ord loc, Show loc) => Env -> String -> [Warn v loc] -> Pretty ColorText Source #

rangeForErrorNote :: (Annotated loc, Semigroup loc) => ErrorNote v loc -> Maybe Range Source #

The most specific source location to point an editor at for a given type error: a location carried directly by the error's cause when there is one, otherwise the innermost subterm the typechecker was looking at. Used to render a clickable `file:line:col` reference in the CLI.

rangeForWarn :: Annotated loc => Warn v loc -> Maybe Range Source #

The source location to point an editor at for a typechecker warning.