From 156f52f470ca76b01c0e18e07ee4c0d97f15d4be Mon Sep 17 00:00:00 2001 From: Charlie Moog Date: Fri, 14 Jun 2024 08:56:42 +0000 Subject: [PATCH] revert --- Main.hs | 3 +-- flake.nix | 11 ++++++----- fourmolu.yaml | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 fourmolu.yaml diff --git a/Main.hs b/Main.hs index fee63d3..fedafb0 100644 --- a/Main.hs +++ b/Main.hs @@ -1,6 +1,5 @@ module Main where -import Control.Concurrent.Async (mapConcurrently_) import Control.Monad import Data.ByteString.Lazy (ByteString) import Data.ByteString.Lazy qualified as L @@ -54,7 +53,7 @@ handleArgs ["fetch"] = do , "546" -- NYC East Village , "452" -- Austin Seaholm ] - mapConcurrently_ (scrapeStore conn) stores + mapM_ (scrapeStore conn) stores printlog "done" changeCount <- SQL.totalChanges conn printlog $ "changed rows: " <> show changeCount diff --git a/flake.nix b/flake.nix index 453abbf..723d5f9 100644 --- a/flake.nix +++ b/flake.nix @@ -14,20 +14,21 @@ nixpkgs-fmt haskellPackages.fourmolu nodePackages.sql-formatter ]} nixpkgs-fmt . - fourmolu --mode inplace --indentation=2 $(git ls-files '*.hs') + fourmolu --mode inplace $(git ls-files '*.hs') for file in $(git ls-files "*.sql"); do sql-formatter --fix $file done ''; in - rec { + { inherit formatter; packages.default = pkgs.haskellPackages.callCabal2nix "traderjoes" ./. { }; - devShells.default = with pkgs; mkShell { - inputsFrom = [ packages.default.env ]; - packages = [ + devShells.default = pkgs.mkShell { + inputsFrom = [ self.packages.${system}.default.env ]; + packages = with pkgs; [ cabal-install haskell-language-server + haskellPackages.fourmolu hlint nodePackages.wrangler sqlite diff --git a/fourmolu.yaml b/fourmolu.yaml new file mode 100644 index 0000000..47e652d --- /dev/null +++ b/fourmolu.yaml @@ -0,0 +1 @@ +indentation: 2