on master help sign in
Replace weird whitespace characters by normal spaces
8870acdmrkkrp
data/examples/declaration/value/function/do.hs+1−1
@@ -40,7 +40,7 @@ foo = do
40
40
41 c <- a + b
41 c <- a + b
42 print c
42 print c
43− rec something $ do
43+ rec something $ do
44 x <- a
44 x <- a
45 print x
45 print x
46
46
src/Ormolu/Printer/Combinators.hs+1−1
@@ -181,7 +181,7 @@ backticks m = do
181-- | Surround given entity by banana brackets (i.e., from arrow notation.)
181-- | Surround given entity by banana brackets (i.e., from arrow notation.)
182
182
183banana :: R () -> R ()
183banana :: R () -> R ()
184−banana m = sitcc $ do
184+banana m = sitcc $ do
185 txt "(|"
185 txt "(|"
186 ospaces m
186 ospaces m
187 txt "|)"
187 txt "|)"
src/Ormolu/Printer/Meat/Declaration/Class.hs+3−3
@@ -41,9 +41,9 @@ p_classDecl ctx name tvars fixity fdeps csigs cdefs cats catdefs = do
41 dependencySpans = getLoc <$> fdeps
41 dependencySpans = getLoc <$> fdeps
42 combinedSpans = getLoc ctx : (signatureSpans ++ dependencySpans)
42 combinedSpans = getLoc ctx : (signatureSpans ++ dependencySpans)
43 txt "class"
43 txt "class"
44− switchLayout combinedSpans $ do
44+ switchLayout combinedSpans $ do
45 breakpoint
45 breakpoint
46− inci $ do
46+ inci $ do
47 p_classContext ctx
47 p_classContext ctx
48 switchLayout signatureSpans $ do
48 switchLayout signatureSpans $ do
49 p_infixDefHelper
49 p_infixDefHelper
@@ -73,7 +73,7 @@ p_classDecl ctx name tvars fixity fdeps csigs cdefs cats catdefs = do
73 else newline
73 else newline
74
74
75p_classContext :: LHsContext GhcPs -> R ()
75p_classContext :: LHsContext GhcPs -> R ()
76−p_classContext ctx = unless (null (unLoc ctx)) $ do
76+p_classContext ctx = unless (null (unLoc ctx)) $ do
77 located ctx p_hsContext
77 located ctx p_hsContext
78 breakpoint
78 breakpoint
79 txt "=> "
79 txt "=> "
src/Ormolu/Printer/Meat/Declaration/Data.hs+2−2
@@ -30,12 +30,12 @@ p_dataDecl style name tpats fixity HsDataDefn {..} = do
30 txt $ case dd_ND of
30 txt $ case dd_ND of
31 NewType -> "newtype"
31 NewType -> "newtype"
32 DataType -> "data"
32 DataType -> "data"
33− txt $ case style of
33+ txt $ case style of
34 Associated -> mempty
34 Associated -> mempty
35 Free -> " instance"
35 Free -> " instance"
36 switchLayout (getLoc name : fmap getLoc tpats) $ do
36 switchLayout (getLoc name : fmap getLoc tpats) $ do
37 breakpoint
37 breakpoint
38− inci $ p_infixDefHelper
38+ inci $ p_infixDefHelper
39 (isInfix fixity)
39 (isInfix fixity)
40 inci
40 inci
41 (p_rdrName name)
41 (p_rdrName name)
src/Ormolu/Printer/Meat/Declaration/Instance.hs+1−1
@@ -69,7 +69,7 @@ p_clsInstDecl = \case
69 case cid_poly_ty of
69 case cid_poly_ty of
70 HsIB {..} -> located hsib_body $ \x -> do
70 HsIB {..} -> located hsib_body $ \x -> do
71 breakpoint
71 breakpoint
72− inci $ do
72+ inci $ do
73 match_overlap_mode cid_overlap_mode breakpoint
73 match_overlap_mode cid_overlap_mode breakpoint
74 p_hsType x
74 p_hsType x
75 -- GHC's AST does not necessarily store each kind of element in source
75 -- GHC's AST does not necessarily store each kind of element in source
src/Ormolu/Printer/Meat/Declaration/TypeFamily.hs+1−1
@@ -26,7 +26,7 @@ p_famDecl style FamilyDecl {..} = do
26 DataFamily -> Nothing <$ txt "data"
26 DataFamily -> Nothing <$ txt "data"
27 OpenTypeFamily -> Nothing <$ txt "type"
27 OpenTypeFamily -> Nothing <$ txt "type"
28 ClosedTypeFamily eqs -> Just eqs <$ txt "type"
28 ClosedTypeFamily eqs -> Just eqs <$ txt "type"
29− txt $ case style of
29+ txt $ case style of
30 Associated -> mempty
30 Associated -> mempty
31 Free -> " family"
31 Free -> " family"
32 let HsQTvs {..} = fdTyVars
32 let HsQTvs {..} = fdTyVars
src/Ormolu/Printer/Meat/Declaration/Value.hs+6−6
@@ -235,7 +235,7 @@ p_grhs' pretty style (GRHS NoExt guards body) =
235 txt "| "
235 txt "| "
236 sitcc (sep (comma >> breakpoint) (sitcc . located' p_stmt) xs)
236 sitcc (sep (comma >> breakpoint) (sitcc . located' p_stmt) xs)
237 space
237 space
238− txt $ case style of
238+ txt $ case style of
239 EqualSign -> "="
239 EqualSign -> "="
240 RightArrow -> "->"
240 RightArrow -> "->"
241 breakpoint
241 breakpoint
@@ -248,14 +248,14 @@ p_hsCmd :: HsCmd GhcPs -> R ()
248p_hsCmd = \case
248p_hsCmd = \case
249 HsCmdArrApp NoExt body input arrType _ -> do
249 HsCmdArrApp NoExt body input arrType _ -> do
250 located body p_hsExpr
250 located body p_hsExpr
251− txt $ case arrType of
251+ txt $ case arrType of
252 HsFirstOrderApp -> " -<"
252 HsFirstOrderApp -> " -<"
253 HsHigherOrderApp -> " -<<"
253 HsHigherOrderApp -> " -<<"
254 placeHanging (exprPlacement (unLoc input)) $
254 placeHanging (exprPlacement (unLoc input)) $
255 located input p_hsExpr
255 located input p_hsExpr
256− HsCmdArrForm NoExt form Prefix _ cmds -> banana $ sitcc $ do
256+ HsCmdArrForm NoExt form Prefix _ cmds -> banana $ sitcc $ do
257 located form p_hsExpr
257 located form p_hsExpr
258− unless (null cmds) $ do
258+ unless (null cmds) $ do
259 breakpoint
259 breakpoint
260 inci (sequence_ (intersperse breakpoint (located' p_hsCmdTop <$> cmds)))
260 inci (sequence_ (intersperse breakpoint (located' p_hsCmdTop <$> cmds)))
261 HsCmdArrForm NoExt form Infix _ [left, right] -> do
261 HsCmdArrForm NoExt form Infix _ [left, right] -> do
@@ -406,7 +406,7 @@ p_hsRecField
406 -> R ()
406 -> R ()
407p_hsRecField = \HsRecField {..} -> do
407p_hsRecField = \HsRecField {..} -> do
408 located hsRecFieldLbl atom
408 located hsRecFieldLbl atom
409− unless hsRecPun $ do
409+ unless hsRecPun $ do
410 txt " = "
410 txt " = "
411 located hsRecFieldArg p_hsExpr
411 located hsRecFieldArg p_hsExpr
412
412
@@ -607,7 +607,7 @@ p_hsExpr = \case
607 HsSpliceE NoExt splice -> p_hsSplice splice
607 HsSpliceE NoExt splice -> p_hsSplice splice
608 HsProc NoExt p e -> do
608 HsProc NoExt p e -> do
609 txt "proc"
609 txt "proc"
610− located p $ \x -> do
610+ located p $ \x -> do
611 breakpoint
611 breakpoint
612 inci (p_pat x)
612 inci (p_pat x)
613 breakpoint
613 breakpoint
src/Ormolu/Printer/Meat/Type.hs+1−1
@@ -165,7 +165,7 @@ p_conDeclField (XConDeclField NoExt) = notImplemented "XConDeclField"
165
165
166tyVarsToTypes :: LHsQTyVars GhcPs -> [LHsType GhcPs]
166tyVarsToTypes :: LHsQTyVars GhcPs -> [LHsType GhcPs]
167tyVarsToTypes = \case
167tyVarsToTypes = \case
168− HsQTvs {..} -> fmap tyVarToType <$> hsq_explicit
168+ HsQTvs {..} -> fmap tyVarToType <$> hsq_explicit
169 XLHsQTyVars {} -> notImplemented "XLHsQTyVars"
169 XLHsQTyVars {} -> notImplemented "XLHsQTyVars"
170
170
171tyVarToType :: HsTyVarBndr GhcPs -> HsType GhcPs
171tyVarToType :: HsTyVarBndr GhcPs -> HsType GhcPs