Skip to content

Commit

Permalink
chore(deps): remove unused dependencies
Browse files Browse the repository at this point in the history
Now that we no more include static files we can remove:
- wai-middleware-static-embedded
- file-embed
  • Loading branch information
Jassob committed Sep 13, 2023
1 parent f3e404d commit 3b03d5b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 15 deletions.
7 changes: 1 addition & 6 deletions app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

module Main
( main
)
where
) where

import Control.Concurrent ( MVar
, newMVar
Expand All @@ -19,7 +18,6 @@ import Control.Monad.Log ( defaultBatchingOptio
)
import Control.Monad.Reader ( runReaderT )
import Control.Monad.Trans ( liftIO )
import Data.FileEmbed ( embedDir )
import Data.IORef ( IORef
, readIORef
)
Expand All @@ -33,7 +31,6 @@ import Lens.Micro.Platform ( (<&>)
)
import Network.HTTP.Client.TLS ( newTlsManager )
import Network.Wai.Middleware.RequestLogger ( logStdout )
import Network.Wai.Middleware.StaticEmbedded ( static )
import System.Console.GetOpt ( ArgDescr(..)
, ArgOrder(..)
, OptDescr(..)
Expand Down Expand Up @@ -115,7 +112,5 @@ serve
-> IO ()
serve conf viewRef upd = scotty (view cPort conf) $ do
middleware logStdout
middleware (static $(embedDir "static"))
get "/" ((html . render) =<< liftIO (readIORef viewRef))
get "/r" (liftIO (tryPutMVar upd ()) >> redirect "/") -- force update

3 changes: 0 additions & 3 deletions mat-chalmers.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ library
, tagsoup == 0.14.8
, text == 1.2.4.1
, bytestring == 0.10.12.0
, file-embed
, thyme
, word8 == 0.1.3

Expand All @@ -49,15 +48,13 @@ executable mat-chalmers
build-depends: mat-chalmers
, base >= 4.7
, bytestring
, file-embed
, http-client-tls == 0.3.5.3
, microlens-platform
, logging-effect
, mtl
, scotty
, time == 1.9.3
, wai-extra
, wai-middleware-static-embedded == 0.1.0.0
, async >= 2.1.1
default-language: Haskell2010

Expand Down
8 changes: 3 additions & 5 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ let
inherit (nixpkgs) pkgs;

f = { mkDerivation, aeson, base, bytestring, css-text, errors
, exceptions, file-embed, heredoc, http-client, http-client-tls
, exceptions, heredoc, http-client, http-client-tls
, logging-effect, lucid, microlens-platform, mtl, old-locale
, prettyprinter, safe, scotty, stdenv, text, thyme, time, wai-extra
, wai-middleware-static-embedded
}:
mkDerivation {
pname = "mat-chalmers";
Expand All @@ -19,14 +18,13 @@ let
buildTools = [ haskellPackages.cabal-install ];
enableSeparateDataOutput = true;
libraryHaskellDepends = [
aeson base bytestring css-text errors exceptions file-embed heredoc
aeson base bytestring css-text errors exceptions heredoc
http-client logging-effect lucid microlens-platform mtl old-locale
prettyprinter safe text thyme
];
executableHaskellDepends = [
base bytestring file-embed http-client-tls logging-effect
base bytestring http-client-tls logging-effect
microlens-platform mtl scotty time wai-extra
wai-middleware-static-embedded
];
license = stdenv.lib.licenses.mit;
};
Expand Down
1 change: 0 additions & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ 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 }

0 comments on commit 3b03d5b

Please sign in to comment.