Skip to content

Commit

Permalink
Merge pull request #5364 from unisonweb/no-ellipses
Browse files Browse the repository at this point in the history
  • Loading branch information
aryairani authored Sep 23, 2024
2 parents fd269ab + e1a7fd8 commit c057942
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions parser-typechecker/src/Unison/PrintError.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1127,10 +1127,7 @@ renderContext env ctx@(C.Context es) =

renderTerm :: (IsString s, Var v) => Env -> Term.Term' (TypeVar.TypeVar loc0 v) v loc1 -> s
renderTerm env e =
let s = Color.toPlain $ TermPrinter.pretty' (Just 80) env (TypeVar.lowerTerm e)
in if length s > Settings.renderTermMaxLength
then fromString ("..." <> drop (length s - Settings.renderTermMaxLength) s)
else fromString s
fromString (Color.toPlain $ TermPrinter.pretty' (Just 80) env (TypeVar.lowerTerm e))

renderPattern :: Env -> Pattern ann -> ColorText
renderPattern env e = Pr.renderUnbroken . Pr.syntaxToColor . fst $ TermPrinter.prettyPattern env TermPrinter.emptyAc Precedence.Annotation ([] :: [Symbol]) e
Expand Down

0 comments on commit c057942

Please sign in to comment.