on master help sign in
Fix #3397 - ibcsubdir was broken
commitbfc32ac10750d73f3aef31e5e4146e7866860205 authorEcho Nolan <echo@echonolan.net> dateThu 8 Sep 2016, 20:29 (10 years ago) parent8b659b7
2 files changed+5−2
src/Idris/Imports.hs+1−1 src/Idris/Package.hs+4−1
src/Idris/Imports.hs+1−1
@@ -48,7 +48,7 @@ ibcPath :: FilePath -> Bool -> FilePath -> FilePath
4848ibcPath ibcsd use_ibcsd fp = let (d_fp, n_fp) = splitFileName fp
4949 d = if (not use_ibcsd) || ibcsd == ""
5050 then d_fp
51− else d_fp </> ibcsd
51+ else ibcsd </> d_fp
5252 n = dropExtension n_fp
5353 in d </> n <.> "ibc"
5454
src/Idris/Package.hs+4−1
@@ -64,7 +64,10 @@ buildPkg :: [Opt] -- ^ Command line options
6464buildPkg copts warnonly (install, fp) = do
6565 pkgdesc <- parseDesc fp
6666 dir <- getCurrentDirectory
67− let idx = PkgIndex (pkgIndex (pkgname pkgdesc))
67+ let idx' = pkgIndex $ pkgname pkgdesc
68+ idx = PkgIndex $ case opt getIBCSubDir copts of
69+ (ibcsubdir:_) -> ibcsubdir </> idx'
70+ [] -> idx'
6871 oks <- mapM (testLib warnonly (pkgname pkgdesc)) (libdeps pkgdesc)
6972 when (and oks) $ do
7073 m_ist <- inPkgDir pkgdesc $ do