File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
lib/Language/Haskell/Stylish/Step Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -59,29 +59,29 @@ data SignatureDecl = MkSignatureDecl
59
59
}
60
60
61
61
formatSignatureDecl :: Config -> Module -> Located SignatureDecl -> ChangeLine
62
- formatSignatureDecl cfg@ Config {.. } m ldecl
62
+ formatSignatureDecl cfg@ Config {.. } m ldecl@ ( L _ decl)
63
63
| fits declLength cMaxColumns = noop block
64
- | otherwise = change block (const (printDecl cfg m ldecl ))
64
+ | otherwise = change block (const (printDecl cfg m decl ))
65
65
66
66
where
67
67
block = Block (getStartLineUnsafe ldecl) (getEndLineUnsafe ldecl)
68
68
declLength = getEndColumnUnsafe ldecl
69
69
70
- printDecl :: Config -> Module -> Located SignatureDecl -> Lines
71
- printDecl Config {.. } m ( L _declPos decl) = runPrinter_ printerConfig [] m do
70
+ printDecl :: Config -> Module -> SignatureDecl -> Lines
71
+ printDecl Config {.. } m MkSignatureDecl { .. } = runPrinter_ printerConfig [] m do
72
72
printFirstLine
73
73
printSecondLine
74
74
printRemainingLines
75
75
where
76
76
77
77
printFirstLine =
78
- ( putRdrName $ sigName decl) >> space >> putText " ::" >> newline
78
+ putRdrName sigName >> space >> putText " ::" >> newline
79
79
80
80
printSecondLine =
81
- spaces 5 >> (putRdrName $ head $ sigParameters decl ) >> newline
81
+ spaces 5 >> (putRdrName $ head sigParameters) >> newline
82
82
83
83
printRemainingLines =
84
- traverse (\ para -> spaces 2 >> putText " ->" >> space >> (putRdrName para) >> newline) (tail $ sigParameters decl )
84
+ traverse (\ para -> spaces 2 >> putText " ->" >> space >> (putRdrName para) >> newline) (tail $ sigParameters)
85
85
86
86
printerConfig = PrinterConfig
87
87
{ columns = case cMaxColumns of
You can’t perform that action at this time.
0 commit comments