packages feed

MicroCabal 0.2.1.0 → 0.2.1.1

raw patch · 3 files changed

+8/−6 lines, 3 files

Files

MicroCabal.cabal view
@@ -1,6 +1,6 @@ cabal-version:         3.0 name:                  MicroCabal-version:               0.2.1.0+version:               0.2.1.1 synopsis:              A partial Cabal replacement license:               Apache-2.0 license-file:          LICENSE
src/MicroCabal/Main.hs view
@@ -249,6 +249,7 @@       sect s@(Section "executable" _ _) | TgtExe `elem` targets env = buildExe env glob s       sect s@(Section "library"    _ _) | TgtLib `elem` targets env = buildLib env glob s       sect _ = return ()+  message env 2 $ "Normalized Cabal file:\n" ++ show ncbl   mapM_ sect $ addMissing sects  buildExe :: Env -> Section -> Section -> IO ()@@ -309,6 +310,7 @@       sect s@(Section "executable" _ _) | TgtExe `elem` targets env = installExe env glob s       sect s@(Section "library"    _ _) | TgtLib `elem` targets env = installLib env glob s       sect _ = return ()+  message env 2 $ "Normalized Cabal file:\n" ++ show ncbl   mapM_ sect $ addMissing sects  installExe :: Env -> Section -> Section -> IO ()
src/MicroCabal/Parse.hs view
@@ -47,11 +47,6 @@     loop _ ('\r':cs) =        loop 0     cs     loop n ('\t':cs) = replicate k ' ' ++ loop 0 cs          where k = 8 - n `rem` 8-    -- Remove '--MHS'.-    -- Hackage does not recognize mhs as a valid compiler yet.-    -- Work around this by having mhs stuff in comments that-    -- MicroCabal ignores.-    loop 0 ('-':'-':'M':'H':'S':cs) = loop 0 cs     loop n (c:cs)    = c    : loop (n+1) cs  ------------------------------@@ -102,9 +97,14 @@ lower = map toLower  -- Change lines with first non-space being '--' into just a newline+-- Remove '--MHS'.+-- Hackage does not recognize mhs as a valid compiler yet.+-- Work around this by having mhs stuff in comments that+-- MicroCabal ignores. dropCabalComments :: String -> String dropCabalComments = unlines . map cmt . lines   where+    cmt ('-':'-':'M':'H':'S':cs) = cmt cs     cmt s | take 2 (dropWhile (== ' ') s) == "--" = ""           | otherwise = s