Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions src/Action/Generate.hs
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,20 @@ actionGenerate g@Generate{..} = withTiming (if debug then Just $ replaceExtensio
warnFlagIgnored "--haddock" "set" (local_ /= []) "--local"
warnFlagIgnored "--haddock" "set" (isJust download) "--download"
readHaskellHaddock timing settings dir
| [""] <- local_ -> do
warnFlagIgnored "--local" "used as flag (no paths)" (isJust download) "--download"
readHaskellGhcpkg timing settings
| [] <- local_ -> do readHaskellOnline timing settings doDownload
| otherwise -> readHaskellDirs timing settings local_
| otherwise -> do
let (localFlag, dirs) = partition (=="") local_
(ghcPkgCbl, ghcPkgWant, ghcPkgSource) <-
if null localFlag
then pure (Map.empty, Set.empty, pure ())
else do
warnFlagIgnored "--local" "used as flag (no paths)" (isJust download) "--download"
readHaskellGhcpkg timing settings
(dirsCbl, dirsWant, dirsSource) <-
if null dirs
then pure (Map.empty, Set.empty, pure ())
else readHaskellDirs timing settings dirs
pure (Map.union dirsCbl ghcPkgCbl, Set.union dirsWant ghcPkgWant, ghcPkgSource >> dirsSource)
Frege | [] <- local_ -> readFregeOnline timing doDownload
| otherwise -> errorIO "No support for local Frege databases"
(cblErrs, popularity) <- evaluate $ packagePopularity cbl
Expand Down