Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
curry-packages
curry-repl
Commits
92df1d61
Commit
92df1d61
authored
Nov 24, 2022
by
Michael Hanus
Browse files
Fix parenthesis printing for complex types
parent
58384346
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/REPL/Utils.curry
View file @
92df1d61
--- --------------------------------------------------------------------------
--- Some auxiliary operations for the REPL
---
--- @author Michael Hanus
--- @version November 2022
--- --------------------------------------------------------------------------
module REPL.Utils
...
...
@@ -57,7 +60,8 @@ showMonoTypeExpr' _ _ (CTCons (_,name)) = name
showMonoTypeExpr' mono p texp@(CTApply tcon targ) = maybe
(parens (p > 1) $ showMonoTypeExpr' mono 2 tcon ++ " " ++
showMonoTypeExpr' mono 2 targ)
(\ (mod,name) -> showTypeCons mono mod name (argsOfApply texp))
(\ (mod,name) -> parens (p > 0) $
showTypeCons mono mod name (argsOfApply texp))
(funOfApply texp)
where
funOfApply te = case te of CTApply (CTCons qn) _ -> Just qn
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment