on master help sign in
Adds package paths used by stack to script session.
f21cb20Diogo Biazus
src/lib/ProjectM36/ScriptSession.hs+4−2
@@ -46,7 +46,9 @@ initScriptSession ghcPkgPaths = do
46
46
47 sandboxPkgPaths <- liftIO $ concat <$> mapM glob [
47 sandboxPkgPaths <- liftIO $ concat <$> mapM glob [
48 "./dist-newstyle/packagedb/ghc-" ++ ghcVersion,
48 "./dist-newstyle/packagedb/ghc-" ++ ghcVersion,
49− ".cabal-sandbox/*ghc-" ++ ghcVersion ++ "-packages.conf.d",
49+ ".cabal-sandbox/*ghc-" ++ ghcVersion ++ "-packages.conf.d",
50+ ".stack-work/install/*/*/" ++ ghcVersion ++ "/pkgdb",
51+ homeDir </> ".stack/snapshots/*/*/" ++ ghcVersion ++ "/pkgdb",
50 homeDir </> ".cabal/store/ghc-" ++ ghcVersion ++ "/package.db"
52 homeDir </> ".cabal/store/ghc-" ++ ghcVersion ++ "/package.db"
51 ]
53 ]
52
54
@@ -171,4 +173,4 @@ typeCheckScript expectedType inp = do
171 pure Nothing
173 pure Nothing
172 else
174 else
173 pure (Just (TypeCheckCompilationError (showType dflags expectedType) (showType dflags funcType)))
175 pure (Just (TypeCheckCompilationError (showType dflags expectedType) (showType dflags funcType)))
174−
176+