Skip to content

Commit 783edf8

Browse files
authored
Merge pull request #74 from TroupeLang/fork/dev-integrity/haskell_deprecacy
Fix 'Data.ByteString.getLine' is deprecated
2 parents 53b2432 + 2462d06 commit 783edf8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

compiler/app/Main.hs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ import qualified Raw2Stack
2121
import qualified Stack2JS
2222
import qualified RawOpt
2323
-- import System.IO (isEOF)
24-
import qualified Data.ByteString as BS
24+
import qualified Data.ByteString.Char8 as BS
2525
import Data.ByteString.Base64 (decode)
26-
import qualified Data.ByteString.Char8 as BSChar8
2726
import qualified Data.ByteString.Lazy.Char8 as BSLazyChar8
2827
import System.IO
2928
import System.Exit
@@ -220,7 +219,7 @@ fromStdinIR = do
220219
input <- BS.getLine
221220
if BS.isPrefixOf "!ECHO " input
222221
then let response = BS.drop 6 input
223-
in do BSChar8.putStrLn response
222+
in do BS.putStrLn response
224223
-- debugOut "echo"
225224
else
226225
case decode input of
@@ -244,7 +243,7 @@ fromStdinIRJson = do
244243
input <- BS.getLine
245244
if BS.isPrefixOf "!ECHO " input
246245
then let response = BS.drop 6 input
247-
in BSChar8.putStrLn response
246+
in BS.putStrLn response
248247
else
249248
case decode input of
250249
Right bs ->

0 commit comments

Comments
 (0)