From 627704704e53605dd04eeec969c927eba0668193 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Mon, 29 May 2023 15:58:27 -0400 Subject: [PATCH] REF remove config module --- app/Main.hs | 5 ++++- budget.cabal | 1 - lib/Internal/Config.hs | 11 ----------- 3 files changed, 4 insertions(+), 13 deletions(-) delete mode 100644 lib/Internal/Config.hs diff --git a/app/Main.hs b/app/Main.hs index 53579ff..a8ba0d8 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -8,8 +8,8 @@ import Control.Monad.Logger import Control.Monad.Reader import qualified Data.Text.IO as TI import Database.Persist.Monad +import Dhall hiding (double, record) import Internal.Budget -import Internal.Config import Internal.Database.Ops import Internal.History import Internal.Types.Main @@ -191,3 +191,6 @@ runSync c = do exitFailure -- showBalances + +readConfig :: MonadUnliftIO m => FilePath -> m Config +readConfig confpath = liftIO $ unfix <$> Dhall.inputFile Dhall.auto confpath diff --git a/budget.cabal b/budget.cabal index f50c6e1..1ad76c4 100644 --- a/budget.cabal +++ b/budget.cabal @@ -26,7 +26,6 @@ source-repository head library exposed-modules: Internal.Budget - Internal.Config Internal.Database.Ops Internal.History Internal.Statement diff --git a/lib/Internal/Config.hs b/lib/Internal/Config.hs deleted file mode 100644 index 93df85b..0000000 --- a/lib/Internal/Config.hs +++ /dev/null @@ -1,11 +0,0 @@ -module Internal.Config - ( readConfig - ) -where - -import Dhall hiding (record) -import Internal.Types.Main -import RIO - -readConfig :: MonadUnliftIO m => FilePath -> m Config -readConfig confpath = liftIO $ unfix <$> inputFile auto confpath