Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix flake update #64

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ jobs:
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}
- run: nix develop -c task api:test
- run: nix flake check
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
.pre-commit-config.yaml
.task
result
dist-newstyle
50 changes: 25 additions & 25 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions src/API/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ databaseConfigCodec :: TomlCodec DatabaseConfig
databaseConfigCodec =
DatabaseConfig
<$> Toml.diwrap (Toml.text "host")
.= host
.= host
<*> Toml.diwrap (Toml.int "port")
.= port
.= port
<*> Toml.diwrap (Toml.text "dbname")
.= dbname
.= dbname
<*> Toml.diwrap (Toml.text "user")
.= user
.= user
<*> Toml.diwrap (Toml.text "password")
.= password
.= password

-- |
-- A bidirectional codec for 'ApiConfig'
Expand All @@ -93,6 +93,6 @@ configCodec :: TomlCodec Config
configCodec =
Config
<$> Toml.table databaseConfigCodec "database"
.= database
.= database
<*> Toml.table apiConfigCodec "api"
.= api
.= api
2 changes: 1 addition & 1 deletion src/Tagger/Content.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ instance (ToJSON tag) => ToJSON (Content tag)
-- |
-- checks whether a 'Content' is indexed by all the provided 'tag's
hasAllTags :: (Eq tag) => [tag] -> Content tag -> Bool
hasAllTags tags' content = and $ (\tag -> tag `elem` tags content) <$> tags'
hasAllTags tags' content = all (\tag -> tag `elem` tags content) tags'