Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
curry
curry-frontend
Commits
6e5ee108
Commit
6e5ee108
authored
Apr 04, 2014
by
Björn Peemöller
Browse files
Simplified verbosity options
parent
f731d1ec
Changes
4
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
6e5ee108
...
...
@@ -4,6 +4,9 @@ Change log for curry-frontend
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
when retrieving the siblings of a constructor imported using an alias.
...
...
src/Base/Messages.hs
View file @
6e5ee108
module
Base.Messages
(
-- * Output of user information
info
,
status
,
warn
,
putErrLn
,
putErrsLn
status
,
warn
,
putErrLn
,
putErrsLn
-- * program abortion
,
abortWith
,
abortWithMessage
,
abortWithMessages
,
internalError
,
errorMessage
,
errorMessages
...
...
@@ -30,9 +30,6 @@ runEitherCYIO act = do
Left
errs
->
abortWithMessages
errs
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
opts
msg
=
unless
(
optVerbosity
opts
<
VerbStatus
)
(
putMsg
msg
)
...
...
src/CompilerOpts.hs
View file @
6e5ee108
...
...
@@ -86,14 +86,12 @@ data CymakeMode
data
Verbosity
=
VerbQuiet
-- ^ be quiet
|
VerbStatus
-- ^ show status of compilation
|
VerbInfo
-- ^ also show additional info
deriving
(
Eq
,
Ord
,
Show
)
-- |Description and flag of verbosities
verbosities
::
[(
Verbosity
,
String
,
String
)]
verbosities
=
[
(
VerbQuiet
,
"0"
,
"quiet"
)
,
(
VerbStatus
,
"1"
,
"status"
)
,
(
VerbInfo
,
"2"
,
"info"
)
]
-- |Type of the target file
...
...
src/CurryBuilder.hs
View file @
6e5ee108
...
...
@@ -101,7 +101,7 @@ makeCurry opts srcs targetFile = mapM_ (process . snd) srcs
compileModule
(
opts
{
optTargetTypes
=
[
FlatCurry
],
optDumps
=
[]
})
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
,
tgt
`
elem
`
optTargetTypes
opts
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment