Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
The1Penguin committed Jun 4, 2024
1 parent 1a56185 commit e9be812
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 33 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM haskell:9.4.5 as BIN
FROM haskell:9.6.4 as BIN
WORKDIR /app/user
COPY *.cabal ./

Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.7'

services:
mat:
build: .
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

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

7 changes: 5 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

outputs = { self, nixpkgs, flake-utils }:
let
ghcVer = "ghc945";
ghcVer = "ghc964";
makeHaskellOverlay = overlay: final: prev: {
haskell = prev.haskell // {
packages = prev.haskell.packages // {
Expand Down Expand Up @@ -52,7 +52,10 @@
packages = p: [ self.packages.${system}.mat ];
withHoogle = true;
buildInputs =
[ pkgs.docker ] ++
[
pkgs.docker
pkgs.zlib
] ++
(with haskellPackages; [
haskell-language-server
cabal-install
Expand Down
38 changes: 19 additions & 19 deletions mat-chalmers.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ author: Adam Sandberg Eriksson
maintainer: [email protected]
category: Web
build-type: Simple
Tested-With: GHC ==9.4.5
Tested-With: GHC ==9.6.4
data-files:
static/style.css
static/icon.png
Expand All @@ -18,7 +18,7 @@ data-files:
static/fonts/OFL.txt

library
default-language: Haskell2010
default-language: GHC2021
hs-source-dirs: src
ghc-options: -Wall -Werror -Wunused-binds -Wunused-imports -Wcompat
exposed-modules: Model
Expand All @@ -34,26 +34,26 @@ library
-- versions in the `build-depends` blocks below.
build-depends: aeson >= 2.1.2.1 && < 3.0
, attoparsec >= 0.14.4 && < 0.15
, base >=4.17.1.0 && < 5.0
, base >=4.18.2.0 && < 5.0
, bytestring >=0.11 && < 0.12
, css-text >= 0.1.3.0 && < 0.2
, exceptions >= 0.10.5 && < 0.11.0
, heredoc == 0.2.0.0
, heredoc >= 0.2.0.0 && < 0.3
, logging-effect >= 1.4.0 && <= 2.0
, microlens-platform >= 0.4.3.3 && < 0.5
, lucid >= 2 && < 3
, mtl == 2.2.2
, microlens-platform >= 0.4.3.5 && < 0.5
, lucid >= 2.11.1 && < 3
, mtl >= 2.3.1 && < 2.5
, old-locale == 1.0.0.7
, prettyprinter == 1.7.1
, req >= 3.13 && < 4.0
, retry == 0.8.1.2
, safe == 0.3.19
, retry == 0.9.3.1
, safe >= 0.3.21 && < 0.4
, tagsoup == 0.14.8
, text >= 2.0 && <= 3.0
, file-embed >= 0.0.15.0 && < 1.0
, file-embed >= 0.0.16.0 && < 1.0
, thyme >= 0.4 && <= 0.5
, word8 == 0.1.3
, extra >= 1.7.10 && <= 1.8
, extra >= 1.7.16 && <= 1.8

executable mat-chalmers
main-is: Main.hs
Expand All @@ -69,23 +69,23 @@ executable mat-chalmers
, mtl
, req
, prettyprinter
, scotty >= 0.12.1 && < 0.13
, time >= 1.12 && < 1.13
, wai-extra >= 3.1.13.0 && < 4.0
, scotty >= 0.20 && < 0.30
, time >= 1.12.2 && < 1.13
, wai-extra >= 3.1.14 && < 4.0
, wai-middleware-static-embedded == 0.1.0.0
, async >= 2.2.4 && <= 3.0
default-language: Haskell2010
, async >= 2.2.5 && <= 3.0
default-language: GHC2021

Test-Suite test-mat
type: exitcode-stdio-1.0
main-is: Main.hs
hs-source-dirs: test
default-language: Haskell2010
default-language: GHC2021
build-depends: base
, bytestring
, mat-chalmers
, aeson >= 2.1.2.1 && < 3.0
, hspec >= 2.10.10 && < 3.0
, hspec >= 2.11.8 && < 3.0
, HUnit >= 1.6.2.0 && < 2.0
, text
, thyme >= 0.3.5.5
, thyme >= 0.4 && <= 0.5
2 changes: 1 addition & 1 deletion src/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ defaultConfig = Config False 14 (1000000 * 60 * 30) 5007
-- TODO: Feel free to bikeshed the function name.
reifyConfig
:: ([Config -> Config], [String], [String]) -> (Config, [String], [String])
reifyConfig = (& _1 %~ foldl' (flip id) defaultConfig)
reifyConfig = _1 %~ foldl' (flip id) defaultConfig
5 changes: 3 additions & 2 deletions src/Model/Wijkanders.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Control.Arrow ( (***)
, (&&&)
, (>>>)
)
import Control.Monad ( (<=<) )
import Data.Attoparsec.ByteString.Lazy ( maybeResult
, parse
, skip
Expand Down Expand Up @@ -53,7 +54,7 @@ import Util ( menusToEitherNoLunch
-- ..and gives them in another order to play nice with the
-- YearMonthDay constructor.
hasDate :: ByteString -> Maybe (Months, Days)
hasDate = maybeResult . parse ((\d m -> (m, d)) <$> parseDay <*> parseMonth)
hasDate = maybeResult . parse (flip (,) <$> parseDay <*> parseMonth)
where
parseDay = skipMany (skip (not . W8.isDigit)) *> integerParser
parseMonth = string (B8.pack "/") *> integerParser
Expand Down Expand Up @@ -90,7 +91,7 @@ getWijkanders d =
>>> dropWhile (~/= "<strong>")
>>> removeWhitespaceTags
>>> partitions (~== "<strong>")
>>> mapMaybe ((maybeTagText =<<) . (`atMay` 1))
>>> mapMaybe (maybeTagText <=< (`atMay` 1))
>>> map
( BL.break (== W8._colon)
>>> ( decodeUtf8With ignore
Expand Down

0 comments on commit e9be812

Please sign in to comment.