on master help sign in
Fix rendering of implicit parameter variables
5165003mrkkrp
data/examples/declaration/value/function/implicit-params-out.hsnew file+5
@@ -0,0 +1,5 @@
1+{-# LANGUAGE ImplicitParams #-}
2+sortBy :: (a -> a -> Bool) -> [a] -> [a]
3+
4+sort :: (?cmp :: a -> a -> Bool) => [a] -> [a]
5+sort = sortBy ?cmp
data/examples/declaration/value/function/implicit-params.hsnew file+5
@@ -0,0 +1,5 @@
1+{-# LANGUAGE ImplicitParams #-}
2+sortBy :: (a -> a -> Bool) -> [a] -> [a]
3+
4+sort :: (?cmp :: a -> a -> Bool) => [a] -> [a]
5+sort = sortBy ?cmp
src/Ormolu/Printer/Meat/Declaration/Value.hs+3−1
@@ -222,7 +222,9 @@ p_hsExpr = \case
222 HsOverLabel NoExt _ v -> do
222 HsOverLabel NoExt _ v -> do
223 txt "#"
223 txt "#"
224 atom v
224 atom v
225− HsIPVar NoExt (HsIPName name) -> atom name
225+ HsIPVar NoExt (HsIPName name) -> do
226+ txt "?"
227+ atom name
226 HsOverLit NoExt v -> atom (ol_val v)
228 HsOverLit NoExt v -> atom (ol_val v)
227 HsLit NoExt lit -> atom lit
229 HsLit NoExt lit -> atom lit
228 HsLam NoExt mgroup ->
230 HsLam NoExt mgroup ->