1-- Get an interactive shell with the right packages to load
8-- (or whichever package you like)
10-- You must have first done a 'cabal configure' or 'cabal install'
13import Distribution.Simple.LocalBuildInfo
14import Distribution.Package
15import Distribution.Version
16import Data.List (intercalate)
19 setupConfig' <- readFile "dist/setup-config"
20 let setupConfig = read $ unlines $ drop 1 $ lines setupConfig'
21 let (Just (ComponentLocalBuildInfo { componentPackageDeps = deps })) = libraryConfig setupConfig
22 let packageSpecs = map (toPackageSpec . snd) deps
23 let args = ["-optP-include", "-optP../dist/build/autogen/cabal_macros.h","-cpp","-I../dist/build/autogen","-i../dist/build/autogen"] ++ concatMap (\p -> ["-package",p]) packageSpecs
25 ph <- runProcess "ghci" args (Just "src") Nothing Nothing Nothing Nothing
28toPackageSpec pkg = pkgN ++ "-" ++ pkgV
29 where (PackageName pkgN) = pkgName pkg
30 pkgV = intercalate "." $ map show $ versionBranch $ pkgVersion pkg
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list