mirror of
https://github.com/anoma/juvix.git
synced 2025-01-08 08:39:26 +03:00
[pretty] group infix declaration with symbol definition
This commit is contained in:
parent
4d14338c30
commit
7510cd2240
@ -213,6 +213,9 @@ groupStatements = reverse . map reverse . uncurry cons . foldl' aux ([], [])
|
|||||||
definesSymbol :: Symbol -> Statement 'Scoped -> Bool
|
definesSymbol :: Symbol -> Statement 'Scoped -> Bool
|
||||||
definesSymbol n s = case s of
|
definesSymbol n s = case s of
|
||||||
StatementTypeSignature sig -> n == S._nameConcrete (sigName sig)
|
StatementTypeSignature sig -> n == S._nameConcrete (sigName sig)
|
||||||
|
StatementInductive InductiveDef{..} ->
|
||||||
|
n == S._nameConcrete inductiveName ||
|
||||||
|
elem n (map (S._nameConcrete . constructorName) inductiveConstructors)
|
||||||
_ -> False
|
_ -> False
|
||||||
|
|
||||||
ppStatements :: Members '[Reader Options] r => [Statement 'Scoped] -> Sem r (Doc Ann)
|
ppStatements :: Members '[Reader Options] r => [Statement 'Scoped] -> Sem r (Doc Ann)
|
||||||
|
Loading…
Reference in New Issue
Block a user