From cbe08ea0b6d00cfd59472013bbd707563ba40f21 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Sun, 12 Nov 2023 21:03:49 +0100 Subject: [PATCH 1/3] Bump cubical-utils to GHC 9.8 --- Everythings.hs | 2 +- cubical-utils.cabal | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Everythings.hs b/Everythings.hs index e1e85e61f2..6c3425d791 100644 --- a/Everythings.hs +++ b/Everythings.hs @@ -117,7 +117,7 @@ main = do "gen-except" :ex_dirs -> genEverythings (all_dirs \\ ex_dirs) ["check-README"] -> checkREADME ["get-imports-README"] -> do - imported <- filter (\fp -> head fp == "Everything") + imported <- filter (\fp -> listToMaybe fp == Just "Everything") <$> getImported ["README","Cubical"] putStrLn . unwords $ map (\fp -> showFP '/' fp ++ ".agda") imported "help":_ -> putStrLn helpText diff --git a/cubical-utils.cabal b/cubical-utils.cabal index fa785fd26a..42464c3d07 100644 --- a/cubical-utils.cabal +++ b/cubical-utils.cabal @@ -10,5 +10,5 @@ executable Everythings hs-source-dirs: . main-is: Everythings.hs default-language: Haskell2010 - build-depends: base >= 4.9.0.0 && < 4.18 + build-depends: base >= 4.9.0.0 && < 4.20 , directory >= 1.0.0.0 && < 1.4 From ad64909e3eee22edffba0630d4ec7117c479e483 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Sun, 12 Nov 2023 21:04:24 +0100 Subject: [PATCH 2/3] Everythings.hs: explicit imports --- Everythings.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Everythings.hs b/Everythings.hs index 6c3425d791..8329b4023b 100644 --- a/Everythings.hs +++ b/Everythings.hs @@ -1,9 +1,9 @@ -import System.Environment -import System.Directory -import System.Exit -import Control.Monad -import Data.Maybe -import Data.List +import System.Environment ( getArgs ) +import System.Directory ( getDirectoryContents ) +import System.Exit ( exitFailure ) +import Control.Monad ( forM, forM_ ) +import Data.Maybe ( listToMaybe, maybeToList, mapMaybe ) +import Data.List ( (\\), delete, find, intercalate, sort, stripPrefix ) stripSuffix :: (Eq a) => [a] -> [a] -> Maybe [a] stripSuffix sfx = fmap reverse . stripPrefix (reverse sfx) . reverse @@ -82,7 +82,7 @@ checkREADME = do genEverythings :: [String] -> IO () genEverythings = - mapM_ (\dir -> do + mapM_ $ \ dir -> do let fp = addToFP ["Cubical"] dir files <- getMissingFiles fp Nothing let ls = ["{-# OPTIONS --safe #-}", @@ -90,7 +90,7 @@ genEverythings = ++ sort (fmap (\file -> "import " ++ showFP '.' file) (delete (addToFP fp "Everything") files)) writeFile ("./" ++ showFP '/' (addToFP fp "Everything") ++ ".agda") - (unlines ls)) + (unlines ls) helpText :: String From 6e6f9a6aa822c31e04f1ccbf741cff49b016d4a7 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Sun, 12 Nov 2023 22:34:32 +0100 Subject: [PATCH 3/3] Add `cabal.project` so that `cubical-utils` also works as a submodule Without a `cabal.project` here, `cabal` will use one higher up in the directory tree. --- cabal.project | 1 + 1 file changed, 1 insertion(+) create mode 100644 cabal.project diff --git a/cabal.project b/cabal.project new file mode 100644 index 0000000000..e6fdbadb43 --- /dev/null +++ b/cabal.project @@ -0,0 +1 @@ +packages: .