Commit 6e5ee108 authored by Björn Peemöller 's avatar Björn Peemöller
Browse files

Simplified verbosity options

parent f731d1ec
...@@ -4,6 +4,9 @@ Change log for curry-frontend ...@@ -4,6 +4,9 @@ Change log for curry-frontend
Version 0.3.9 Version 0.3.9
============= =============
* Simplified verbosity options by merging options "-v1" and "-v2".
Now only "-v0" and "-v1" are supported.
* Fixed bug in non-exhaustive pattern matching check which occured * Fixed bug in non-exhaustive pattern matching check which occured
when retrieving the siblings of a constructor imported using an alias. when retrieving the siblings of a constructor imported using an alias.
......
module Base.Messages module Base.Messages
( -- * Output of user information ( -- * Output of user information
info, status, warn, putErrLn, putErrsLn status, warn, putErrLn, putErrsLn
-- * program abortion -- * program abortion
, abortWith, abortWithMessage, abortWithMessages , abortWith, abortWithMessage, abortWithMessages
, internalError, errorMessage, errorMessages , internalError, errorMessage, errorMessages
...@@ -30,9 +30,6 @@ runEitherCYIO act = do ...@@ -30,9 +30,6 @@ runEitherCYIO act = do
Left errs -> abortWithMessages errs Left errs -> abortWithMessages errs
Right val -> return val Right val -> return val
info :: MonadIO m => Options -> String -> m ()
info opts msg = unless (optVerbosity opts < VerbInfo) (putMsg msg)
status :: MonadIO m => Options -> String -> m () status :: MonadIO m => Options -> String -> m ()
status opts msg = unless (optVerbosity opts < VerbStatus) (putMsg msg) status opts msg = unless (optVerbosity opts < VerbStatus) (putMsg msg)
......
...@@ -86,14 +86,12 @@ data CymakeMode ...@@ -86,14 +86,12 @@ data CymakeMode
data Verbosity data Verbosity
= VerbQuiet -- ^ be quiet = VerbQuiet -- ^ be quiet
| VerbStatus -- ^ show status of compilation | VerbStatus -- ^ show status of compilation
| VerbInfo -- ^ also show additional info
deriving (Eq, Ord, Show) deriving (Eq, Ord, Show)
-- |Description and flag of verbosities -- |Description and flag of verbosities
verbosities :: [(Verbosity, String, String)] verbosities :: [(Verbosity, String, String)]
verbosities = [ ( VerbQuiet , "0", "quiet" ) verbosities = [ ( VerbQuiet , "0", "quiet" )
, ( VerbStatus, "1", "status") , ( VerbStatus, "1", "status")
, ( VerbInfo , "2", "info" )
] ]
-- |Type of the target file -- |Type of the target file
......
...@@ -101,7 +101,7 @@ makeCurry opts srcs targetFile = mapM_ (process . snd) srcs ...@@ -101,7 +101,7 @@ makeCurry opts srcs targetFile = mapM_ (process . snd) srcs
compileModule (opts { optTargetTypes = [FlatCurry], optDumps = [] }) f compileModule (opts { optTargetTypes = [FlatCurry], optDumps = [] }) f
skipFinal f = status opts $ "skipping " ++ normalise f skipFinal f = status opts $ "skipping " ++ normalise f
skip f = info opts $ "skipping " ++ normalise f skip f = status opts $ "skipping " ++ normalise f
destNames fn = [ gen fn | (tgt, gen) <- nameGens destNames fn = [ gen fn | (tgt, gen) <- nameGens
, tgt `elem` optTargetTypes opts] , tgt `elem` optTargetTypes opts]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment