pwncash/lib/Internal/Config.hs

22 lines
424 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
2022-12-11 17:51:11 -05:00
readConfig :: FilePath -> IO Config
readConfig confpath = do
2022-12-15 23:03:07 -05:00
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