organised library for p2prc; moved Error, Environment and JSON logic to their own files
This commit is contained in:
17
haskell/lib/Error.hs
Normal file
17
haskell/lib/Error.hs
Normal file
@@ -0,0 +1,17 @@
|
||||
module Error where
|
||||
|
||||
|
||||
data Error
|
||||
= MkUnknownError String
|
||||
| MkErrorSpawningProcess String
|
||||
| MkSystemError Int String String
|
||||
deriving Show
|
||||
|
||||
type IOEitherError a = IO (Either Error a)
|
||||
|
||||
assignError :: String -> Error
|
||||
assignError = MkUnknownError
|
||||
--
|
||||
-- TODO: add megaparsec to parse Error Messages
|
||||
--
|
||||
-- TODO: add error when internet connection is off
|
||||
Reference in New Issue
Block a user