From 7abe33e03c6fa0776af515414a354eead6b34422 Mon Sep 17 00:00:00 2001 From: Andreas Ekeroot Date: Mon, 25 Sep 2023 21:37:58 +0200 Subject: [PATCH] Remove Stack We can build without Stack and it feels nice to not be dependent on another tool built on top of another tool etc. Massage some versions of dependencies and some datetime formatting code to make everything work with the versions of the dependencies installed. --- .gitignore | 1 + mat-chalmers.cabal | 18 +++++++++--------- src/View.hs | 4 ++-- stack.yaml | 8 -------- 4 files changed, 12 insertions(+), 19 deletions(-) delete mode 100644 stack.yaml diff --git a/.gitignore b/.gitignore index bccf002..febbcdd 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ cabal.sandbox.config .*.swp *.log *.dump-hi +dist-newstyle/ diff --git a/mat-chalmers.cabal b/mat-chalmers.cabal index 445673a..95cea27 100644 --- a/mat-chalmers.cabal +++ b/mat-chalmers.cabal @@ -30,13 +30,14 @@ library build-depends: aeson , attoparsec - , base >=4.7 + , base >=4.9 + , bytestring >=0.10.8.2 && <0.12 , css-text , exceptions == 0.10.4 , heredoc == 0.2.0.0 , http-client - , http-client-tls == 0.3.5.3 - , logging-effect == 1.3.12 + , http-client-tls >= 0.3.6.3 && <= 0.4 + , logging-effect >= 1.4.0 && <= 2.0 , microlens-platform , lucid >= 2 , mtl == 2.2.2 @@ -44,8 +45,7 @@ library , prettyprinter == 1.7.1 , safe == 0.3.19 , tagsoup == 0.14.8 - , text == 1.2.4.1 - , bytestring == 0.10.12.0 + , text >= 2.0 && <= 3.0 , file-embed , thyme , word8 == 0.1.3 @@ -55,10 +55,10 @@ executable mat-chalmers ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Werror -Wunused-binds -Wunused-imports -Wcompat hs-source-dirs: app build-depends: mat-chalmers - , base >= 4.7 + , base >= 4.9 , bytestring , file-embed - , http-client-tls == 0.3.5.3 + , http-client-tls , microlens-platform , logging-effect , mtl @@ -66,7 +66,7 @@ executable mat-chalmers , time == 1.9.3 , wai-extra , wai-middleware-static-embedded == 0.1.0.0 - , async >= 2.1.1 + , async >= 2.2.4 && <= 3.0 default-language: Haskell2010 Test-Suite test-mat @@ -74,7 +74,7 @@ Test-Suite test-mat main-is: Main.hs hs-source-dirs: test default-language: Haskell2010 - build-depends: base >= 4.7 + build-depends: base >= 4.9 , bytestring , mat-chalmers , hspec == 2.7.10 diff --git a/src/View.hs b/src/View.hs index 3edbd4b..5948c31 100644 --- a/src/View.hs +++ b/src/View.hs @@ -9,13 +9,13 @@ where import Data.FileEmbed import qualified Data.Text.Lazy as T import qualified Data.Text.Lazy.Builder as T -import Data.Thyme +import Data.Thyme ( defaultTimeLocale + , formatTime ) import Lens.Micro.Platform ( (&) , (%~) , both ) import Lucid -import System.Locale ( defaultTimeLocale ) import qualified Text.CSS.Parse as CSS import qualified Text.CSS.Render as CSS diff --git a/stack.yaml b/stack.yaml deleted file mode 100644 index bfa1c8b..0000000 --- a/stack.yaml +++ /dev/null @@ -1,8 +0,0 @@ -resolver: lts-18.28 -packages: - - "." -extra-deps: - - wai-middleware-static-embedded-0.1.0.0@sha256:036b7823a5e69452d1fe1e270ef3d4988063caa5bb00b6dfc356e1c21b7433e3 - - logging-effect-1.3.12@sha256:72d168dd09887649ba9501627219b6027cbec2d5541931555b7885b133785ce3,1679 - -ghc-options: { "$locals": -ddump-to-file -ddump-hi }