-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into basic-webservice
Pull LiBro monad changes into the webservice branch
- Loading branch information
Showing
11 changed files
with
110 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
-- | Basic definitions. | ||
module LiBro.Base where | ||
|
||
import LiBro.Config | ||
import Control.Monad.Reader | ||
|
||
newtype LiBro a = LiBro | ||
{ unLiBro :: ReaderT Config IO a | ||
} deriving ( Functor | ||
, Applicative | ||
, Monad | ||
, MonadReader Config | ||
, MonadFail | ||
, MonadIO | ||
) | ||
|
||
runLiBro :: Config -> LiBro a -> IO a | ||
runLiBro config = flip runReaderT config . unLiBro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ license: MIT | |
license-file: LICENSE | ||
author: Mirko Westermeier | ||
maintainer: [email protected] | ||
copyright: (c) 2023 Mirko Westermeier | ||
copyright: (c) 2023-2024 Mirko Westermeier | ||
|
||
source-repository head | ||
type: git | ||
|
@@ -33,10 +33,12 @@ common consumer | |
library | ||
import: basic | ||
default-extensions: OverloadedStrings | ||
, GeneralizedNewtypeDeriving | ||
, DeriveGeneric | ||
, DataKinds | ||
, TypeOperators | ||
exposed-modules: LiBro.Config | ||
exposed-modules: LiBro.Base | ||
, LiBro.Config | ||
, LiBro.Data | ||
, LiBro.Data.Storage | ||
, LiBro.Data.SafeText | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.