on master help sign in
Remove extra space before type variables with apostrophe
commitb2c6388a016466e32ce0a411f1728368746b74c3 authorUtku Demir <me@utdemir.com> dateThu 5 Sep 2019, 10:30 (7 years ago) parentdde569e
3 files changed+9−4
data/examples/declaration/data/kind-annotations-out.hs+2 data/examples/declaration/data/kind-annotations.hs+2 src/Ormolu/Printer/Meat/Type.hs+5−4
data/examples/declaration/data/kind-annotations-out.hs+2
@@ -1 +1,3 @@
11data Something (n :: Nat) = Something
2+
3+data Format (k :: *) (k' :: *) (k'' :: *)
data/examples/declaration/data/kind-annotations.hs+2
@@ -1 +1,3 @@
11data Something (n :: Nat) = Something
2+
3+data Format (k :: *) (k' :: *) (k'' :: *)
src/Ormolu/Printer/Meat/Type.hs+5−4
@@ -39,11 +39,12 @@ p_hsType = \case
3939 _ -> located t p_hsType
4040 HsTyVar NoExt p n -> do
4141 case p of
42− Promoted -> txt "'"
42+ Promoted -> do
43+ txt "'"
44+ case showOutputable (unLoc n) of
45+ _ : '\'' : _ -> space
46+ _ -> return ()
4347 NotPromoted -> return ()
44− case showOutputable (unLoc n) of
45− _ : '\'' : _ -> space
46− _ -> return ()
4748 p_rdrName n
4849 HsAppTy NoExt f x -> sitcc $ do
4950 located f p_hsType