Fix rendering of implicit parameter variables
commit516500314994d2996d248b9482d0c065fabcd4a3
authormrkkrp <mark.karpov@tweag.io>
dateMon 10 Jun 2019, 22:38 (7 years ago)
parentbe0ce29
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
222222 HsOverLabel NoExt _ v -> do
223223 txt "#"
224224 atom v
225− HsIPVar NoExt (HsIPName name) -> atom name
225+ HsIPVar NoExt (HsIPName name) -> do
226+ txt "?"
227+ atom name
226228 HsOverLit NoExt v -> atom (ol_val v)
227229 HsLit NoExt lit -> atom lit
228230 HsLam NoExt mgroup ->