Skip to content

Commit aa6e7c8

Browse files
committed
[ cosmetics ] type annotations for local bindings
For better code comprehension.
1 parent 5eb985f commit aa6e7c8

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/Main.hs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ parseScript file prg =
115115

116116
Right script -> return script
117117

118-
alex :: [CLIFlags] -> FilePath -> FilePath
118+
alex :: [CLIFlags]
119+
-> FilePath
120+
-> FilePath
119121
-> (Maybe (AlexPosn, Code), [Directive], Scanner, Maybe (AlexPosn, Code))
120122
-> IO ()
121123
alex cli file basename script = do
@@ -148,7 +150,10 @@ alex cli file basename script = do
148150

149151
template_dir <- templateDir getDataDir cli
150152

151-
let (maybe_header, directives, scanner1, maybe_footer) = script
153+
let maybe_header, maybe_footer :: Maybe (AlexPosn, Code)
154+
directives :: [Directive]
155+
scanner1 :: Scanner
156+
(maybe_header, directives, scanner1, maybe_footer) = script
152157

153158
scheme <- getScheme directives
154159

@@ -158,7 +163,12 @@ alex cli file basename script = do
158163
(\h -> do hClose h; removeFile o_file)
159164
$ \out_h -> do
160165

161-
let
166+
let wrapper_name :: Maybe FilePath
167+
scanner2, scanner_final :: Scanner
168+
scs :: [StartCode]
169+
sc_hdr, actions :: ShowS
170+
encodingsScript :: [Encoding]
171+
162172
wrapper_name = wrapperFile template_dir scheme
163173
(scanner2, scs, sc_hdr) = encodeStartCodes scanner1
164174
(scanner_final, actions) = extractActions scheme scanner2

0 commit comments

Comments
 (0)