packages feed

mida 1.0.0 → 1.0.1

raw patch · 5 files changed

+24/−15 lines, 5 filesdep ~midaPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: mida

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,9 @@+## MIDA 1.0.1++* Fixed issues with `directory` package. Please use `directory-1.2.3.0` or+  newer. `stack.yaml` file is updated accordingly, if you clone the+  repository.+ ## MIDA 1.0.0  * Use the `path-io` library.
mida.cabal view
@@ -17,7 +17,7 @@ -- with this program. If not, see <http://www.gnu.org/licenses/>.  name:                 mida-version:              1.0.0+version:              1.0.1 synopsis:             Language for algorithmic generation of MIDI files description: @@ -111,7 +111,7 @@                     , formatting             >= 6.2                     , haskeline              >= 0.7.1.3                     , megaparsec             >= 4.2-                    , mida                   >= 1.0.0+                    , mida                   >= 1.0.1                     , mtl                    >= 2.1.3.1                     , optparse-applicative   >= 0.11.0.2                     , path                   >= 0.5.3@@ -158,7 +158,7 @@                     , base                       >= 4.8 && < 5                     , containers                 >= 0.5.5.1                     , megaparsec                 >= 4.2-                    , mida                       >= 1.0.0+                    , mida                       >= 1.0.1                     , mtl                        >= 2.1.3.1                     , random                     , test-framework             >= 0.4 && < 1
src/Main.hs view
@@ -94,14 +94,15 @@  runMida' :: Mida a -> IO () runMida' e = do-  mconfig <- forgivingAbsence (resolveFile' ".mida.yaml")-  c <- case mconfig of-    Nothing -> return def-    Just file -> do-      econfig <- parseMidaConfig file+  configFile <- resolveFile' ".mida.yaml"+  configExists <- doesFileExist configFile+  c <- if configExists+    then do+      econfig <- parseMidaConfig configFile       case econfig of         Left msg -> liftIO (putStrLn msg) >> return def         Right val -> return val+    else return def   srcFile <- makeAbsolute (configSrcFile c)   void $ runMida e     MidaSt  { stPrevLen  = configPrevLen c
src/Mida/Configuration.hs view
@@ -71,7 +71,7 @@         τ :: Int -> Parser Natural         τ x = if x >= 0                 then return (fromIntegral x)-                else fail $ "the value must be positive: " ++ show x+                else fail $ "the value must be non-negative: " ++ show x     configPrevLen <- ω configPrevLen τ "prevlen"     configSrcFile <- ω configSrcFile ξ "src"     configProg    <- ω configProg    τ "prog"@@ -82,6 +82,8 @@     configProgOp  <- ω configProgOp  return "progop"     configTempoOp <- ω configTempoOp return "tempop"     return MidaConfig {..}++-- | Parse configuration from specified YAML file.  parseMidaConfig :: MonadIO m => Path b File -> m (Either String MidaConfig) parseMidaConfig path = liftIO $
src/Mida/Interaction/Commands.hs view
@@ -337,12 +337,12 @@   => FilePath            -- ^ Given file name   -> String              -- ^ Extension   -> m (Path Abs File)   -- ^ Absolute path to output file-output given' ext = do-  given  <- resolveFile' given'-  actual <- fromAbsFile <$> gets stSrcFile-  a      <- parseAbsFile $-    if null ext then actual else FP.replaceExtension actual ext-  return (if null given' then a else given)+output given' ext =+  if null given'+    then do+      actual <- fromAbsFile <$> gets stSrcFile+      parseAbsFile (if null ext then actual else FP.replaceExtension actual ext)+    else resolveFile' given'  -- | Change current file name.