Verified Commit a74e11fe authored by Camil Staps's avatar Camil Staps 🙂

Fix pretty-printing of non-infix maybe types in Clean.Types.Util

parent 750f8ab3
Pipeline #43829 passed with stage
in 2 minutes and 17 seconds
......@@ -147,9 +147,9 @@ typeConstructorName isInfix isArg t as
| t == "_Array" = if isInfix ("{" -- as -- "}") ("{}" -- as`)
| t == "_!Array" = if isInfix ("{!" -- as -- "}") ("{!}" -- as`)
// Maybes
| t == "_Maybe" = if (isEmpty as) ["(?^)"] ("(?^ " -- as -- ")")
| t == "_#Maybe" = if (isEmpty as) ["(?#)"] ("(?# " -- as -- ")")
| t == "_!Maybe" = if (isEmpty as) ["(?)"] ("(? " -- as -- ")")
| t == "_Maybe" = if (isEmpty as) ["(?^)"] (if isInfix ("(?^ " -- as -- ")") ("(?^) " -- as))
| t == "_#Maybe" = if (isEmpty as) ["(?#)"] (if isInfix ("(?# " -- as -- ")") ("(?#) " -- as))
| t == "_!Maybe" = if (isEmpty as) ["(?)"] (if isInfix ("(? " -- as -- ")") ("(?) " -- as))
// Tuples
| t % (0,5) == "_Tuple"
# n = toInt (t % (6, size t - 1))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment