Skip to content

Commit ebf21a9

Browse files
committed
Qualified import of Debug.Trace in generated code
1 parent 33ef72a commit ebf21a9

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

data/AlexTemplate.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,24 +112,24 @@ alexScanUser user__ input__ IBOX(sc)
112112
case alexGetByte input__ of
113113
Nothing ->
114114
#ifdef ALEX_DEBUG
115-
trace ("End of input.") $
115+
Debug.Trace.trace ("End of input.") $
116116
#endif
117117
AlexEOF
118118
Just _ ->
119119
#ifdef ALEX_DEBUG
120-
trace ("Error.") $
120+
Debug.Trace.trace ("Error.") $
121121
#endif
122122
AlexError input__'
123123

124124
(AlexLastSkip input__'' len, _) ->
125125
#ifdef ALEX_DEBUG
126-
trace ("Skipping.") $
126+
Debug.Trace.trace ("Skipping.") $
127127
#endif
128128
AlexSkip input__'' len
129129

130130
(AlexLastAcc k input__''' len, _) ->
131131
#ifdef ALEX_DEBUG
132-
trace ("Accept.") $
132+
Debug.Trace.trace ("Accept.") $
133133
#endif
134134
AlexToken input__''' len (alex_actions ! k)
135135

@@ -147,7 +147,7 @@ alex_scan_tkn user__ orig_input len input__ s last_acc =
147147
Nothing -> (new_acc, input__)
148148
Just (c, new_input) ->
149149
#ifdef ALEX_DEBUG
150-
trace ("State: " ++ show IBOX(s) ++ ", char: " ++ show c ++ " " ++ (show . chr . fromIntegral) c) $
150+
Debug.Trace.trace ("State: " ++ show IBOX(s) ++ ", char: " ++ show c ++ " " ++ (show . chr . fromIntegral) c) $
151151
#endif
152152
case fromIntegral c of { IBOX(ord_c) ->
153153
let

src/Main.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,9 +438,7 @@ import_glaexts =
438438
import_debug :: [String]
439439
import_debug =
440440
[ "import Data.Char (chr)"
441-
, "import System.IO"
442-
, "import System.IO.Unsafe"
443-
, "import Debug.Trace"
441+
, "import qualified Debug.Trace"
444442
]
445443

446444
templateDir :: IO FilePath -> [CLIFlags] -> IO FilePath

0 commit comments

Comments
 (0)