diff options
| author | adelon <22380201+adelon@users.noreply.github.com> | 2026-02-14 00:54:19 +0100 |
|---|---|---|
| committer | adelon <22380201+adelon@users.noreply.github.com> | 2026-02-14 00:54:19 +0100 |
| commit | 823710c6836c5eec5243d835b206430358782318 (patch) | |
| tree | 8131430d7a64d902cf56e3008a32a17f12add4dd /source/Syntax/Abstract.hs | |
| parent | 806c46bad96a1e1aa61d740cfdd25aa9178127d2 (diff) | |
Fix parentheses in `Show` instance of `VarSymbol`
Diffstat (limited to 'source/Syntax/Abstract.hs')
| -rw-r--r-- | source/Syntax/Abstract.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/Syntax/Abstract.hs b/source/Syntax/Abstract.hs index a62ee63..b20f6ca 100644 --- a/source/Syntax/Abstract.hs +++ b/source/Syntax/Abstract.hs @@ -42,9 +42,11 @@ pattern FreshVar n <- FreshVarAt _ n where {-# COMPLETE NamedVar, FreshVar #-} instance Show VarSymbol where - show = \case - NamedVarAt _ x -> "NamedVar " <> show x - FreshVarAt _ n -> "FreshVar " <> show n + showsPrec d = \case + NamedVarAt _ x -> + showParen (d > 10) (showString "NamedVar " . showsPrec 11 x) + FreshVarAt _ n -> + showParen (d > 10) (showString "FreshVar " . showsPrec 11 n) instance Eq VarSymbol where NamedVarAt _ x == NamedVarAt _ y = x == y |
