1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00

Don’t set the precedence recursively.

This commit is contained in:
Rob Rix 2019-07-23 12:31:35 -04:00
parent edbea6991c
commit 99668a33a1
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -55,7 +55,7 @@ withPrec n = local (const (Prec n))
inParens :: (Member (Reader Prec) sig, Carrier sig m) => Int -> m AnsiDoc -> m AnsiDoc
inParens amount go = do
prec <- ask
body <- withPrec amount go
body <- go
pure (if prec > Prec amount then parens body else body)
prettyCore :: Style -> Term Core User -> AnsiDoc