organised library for p2prc; moved Error, Environment and JSON logic to their own files

This commit is contained in:
2024-11-09 20:50:41 +00:00
parent 4a384f2c5c
commit 86dab8919e
7 changed files with 277 additions and 247 deletions

17
haskell/lib/Error.hs Normal file
View 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