Skip to content

Commit 7c0426d

Browse files
committed
Fix whitespace and some comments
1 parent c6c7cef commit 7c0426d

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

compiler/app/Main.hs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,11 @@ process flags fname input = do
132132
ir <- case runExcept (CC.closureConvert compileMode rwcps) of
133133
Right ir -> return ir
134134
Left s -> die $ "troupec: " ++ s
135-
136-
137-
138135

139136
when verbose $ writeFileD "out/out.ir" (show ir)
140137

141138
let iropt = IROpt.iropt ir
142139
when verbose $ writeFileD "out/out.iropt" (show iropt)
143-
144140

145141
--------------------------------------------------
146142
let debugOut = elem Debug flags
@@ -170,31 +166,26 @@ process flags fname input = do
170166
let jsFile = outFile flags (fromJust fname)
171167
writeFile jsFile stackjs
172168

173-
169+
----- MODULE ----------------------------------------
174170
case exports of
175171
Nothing -> return ()
176172
Just es -> writeExports jsFile es
177-
when verbose printHr
178173

174+
----- EPILOGUE --------------------------------------
175+
when verbose printHr
179176
exitSuccess
180177

181-
182-
183-
184178
writeExports jsF exports =
185179
let exF' = if takeExtension jsF == ".js" then dropExtension jsF else jsF
186180
in writeFileD (exF' ++ ".exports") (intercalate "\n" exports)
187181

188-
189-
190182
defaultName f =
191183
let ext = ".trp"
192184
in concat [ takeDirectory f
193185
, "/out/"
194186
, if takeExtension f == ext then takeBaseName f else takeFileName f
195187
]
196188

197-
198189
isOutFlag (OutputFile _) = True
199190
isOutFlag _ = False
200191

0 commit comments

Comments
 (0)