Skip to content

Commit

Permalink
Everythings.hs: explicit imports
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed Nov 15, 2023
1 parent ac19a66 commit 532c00c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Everythings.hs
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -82,15 +82,15 @@ 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 #-}",
"module " ++ showFP '.' (addToFP fp "Everything") ++ " where",[]]
++ sort (fmap (\file -> "import " ++ showFP '.' file)
(delete (addToFP fp "Everything") files))
writeFile ("./" ++ showFP '/' (addToFP fp "Everything") ++ ".agda")
(unlines ls))
(unlines ls)


helpText :: String
Expand Down

0 comments on commit 532c00c

Please sign in to comment.