This commit is contained in:
Joscha 2020-01-06 18:07:02 +00:00
parent fa15162620
commit e72e647b5f
3 changed files with 1 additions and 13 deletions

View file

@ -1,6 +1,4 @@
module Main where
import Lib
main :: IO ()
main = someFunc
main = putStrLn "Nothing to see here"

View file

@ -65,7 +65,6 @@ instance FromJSON Event where
, EventSnapshot <$> parseJSON v
]
--TODO: Add more exceptions for other things that can also go wrong (parsing, connection already closed, ...)
data ClientException e
= ServerException (Maybe T.Text) (Maybe T.Text)
-- ^ @'ServerError' error throttled@ is an error sent by the server in
@ -187,7 +186,6 @@ defaultDetails = ConnectionDetails
, cdPingInterval = 10
}
--TODO: Close connection after client finishes running if it hasn't already been closed
runClient :: ConnectionDetails -> Client e a -> IO (Either (ClientException e) a)
runClient details (Client stack)
= withSocketsDo
@ -324,8 +322,6 @@ respondingToPing holdingEvent = do
{- Exception handling -}
--TODO: Add more commands and find more appropriate names
throw :: e -> Client e a
throw = throwRaw . CustomException

View file

@ -1,6 +0,0 @@
module Lib
( someFunc
) where
someFunc :: IO ()
someFunc = putStrLn "someFunc"