pwncash/lib/Internal/Config.hs

22 lines
457 B
Haskell
Raw Normal View History

2022-12-11 17:51:11 -05:00
module Internal.Config
( readConfig
-- , readYaml
)
where
2022-12-11 17:51:11 -05:00
-- import Control.Exception
-- import Data.Yaml
import Dhall hiding (record)
import Internal.Types
2023-01-05 22:23:22 -05:00
import RIO
2022-12-11 17:51:11 -05:00
2023-01-05 22:23:22 -05:00
readConfig :: MonadUnliftIO m => FilePath -> m Config
readConfig confpath = liftIO $ unfix <$> inputFile auto confpath
2022-12-11 17:51:11 -05:00
-- readYaml :: FromJSON a => FilePath -> IO a
-- readYaml p = do
-- r <- decodeFileEither p
-- case r of
-- Right a -> return a
-- Left e -> throw e