From 48c4ab12c4195da2d9a1e0747f1166366a655e16 Mon Sep 17 00:00:00 2001 From: Laura Date: Thu, 5 Jan 2023 15:40:17 +0100 Subject: Close file --- miaowe.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/miaowe.hs b/miaowe.hs index 7cdcb0d..a575bc2 100644 --- a/miaowe.hs +++ b/miaowe.hs @@ -200,8 +200,10 @@ mainLoop channel = waitForCommand main :: IO () main = openFile "conf" ReadMode - >>= hGetLine - >>= putStr . ircConnect + >>= (\handle -> + hGetLine handle + >>= putStr . ircConnect + >> hClose handle) >> hFlush stdout >> waitForCloak >> hFlush stdout -- cgit v1.2.3