Skip to content

Commit 73d0632

Browse files
committed
Remove magic (dependant) constant
1 parent 6249647 commit 73d0632

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler/app/Main.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,9 @@ fromStdinIR putFormattedLn = do
199199
eof <- isEOF
200200
if eof then exitSuccess else do
201201
input <- BS.getLine
202-
if BS.isPrefixOf "!ECHO " input
203-
then let response = BS.drop 6 input
202+
let echo = "!ECHO "
203+
if BS.isPrefixOf echo input
204+
then let response = BS.drop (BS.length echo) input
204205
in do BSChar8.putStrLn response
205206
else
206207
case decode input of

0 commit comments

Comments
 (0)