shithub: MicroHs

Download patch

ref: fecf7571991b1fa2d797daec0976b1d1ea51828b
parent: 0424d9cae9e87a6c3d3ecd6d5d8e36fbac1892af
author: Lennart Augustsson <lennart@augustsson.net>
date: Sun Jun 9 09:31:09 EDT 2024

Better pretty printing.

--- a/src/MicroHs/Expr.hs
+++ b/src/MicroHs/Expr.hs
@@ -676,7 +676,8 @@
                | isOperChar cop -> parens (text op)
                | otherwise      -> text s
                  where op = unIdent (unQualIdent i)
-                       s = if "inst$" `isPrefixOf` op then unIdent i else op
+                       si = unIdent i
+                       s = if "inst$" `isInfixOf` si then si else op
                        cop = head op
         EApp _ _ -> ppApp [] ae
         EOper e ies -> ppE (foldl (\ e1 (i, e2) -> EApp (EApp (EVar i) e1) e2) e ies)
--