Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
curry
curry-frontend
Commits
43e7ee38
Commit
43e7ee38
authored
Jan 04, 2018
by
Finn Teegen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust warning message for potentially unreachable pattern matches
parent
9b17c498
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
5 deletions
+6
-5
CHANGELOG.md
CHANGELOG.md
+1
-0
curry-frontend.cabal
curry-frontend.cabal
+2
-2
src/Checks/WarnCheck.hs
src/Checks/WarnCheck.hs
+1
-1
test/TestFrontend.hs
test/TestFrontend.hs
+2
-2
No files found.
CHANGELOG.md
View file @
43e7ee38
...
...
@@ -10,6 +10,7 @@ Under development (1.0.1)
functions
`Prelude.fromInt`
and
`Prelude.fromFloat`
.
*
Fixed bug with wrong original names of imported record labels
*
Fixed bug when compiling type constructor classes with super classes
*
Adjusted warning message for potentially unreachable pattern matches
Version 1.0.0
=============
...
...
curry-frontend.cabal
View file @
43e7ee38
Name: curry-frontend
Version: 1.0.
0
Version: 1.0.
1
Cabal-Version: >= 1.10
Synopsis: Compile the functional logic language Curry to several
intermediate formats
...
...
@@ -164,4 +164,4 @@ Test-Suite test-frontend
default-language: Haskell2010
test-module: TestFrontend
build-depends: base == 4.*, Cabal >= 1.20, curry-base == 1.0.0
, curry-frontend == 1.0.
0
, filepath
, curry-frontend == 1.0.
1
, filepath
src/Checks/WarnCheck.hs
View file @
43e7ee38
...
...
@@ -923,7 +923,7 @@ warnMissingPattern p loc pats = posMessage p
-- additional pattern are abbreviated by dots.
warnUnreachablePattern
::
Position
->
[[
Pattern
a
]]
->
Message
warnUnreachablePattern
p
pats
=
posMessage
p
$
text
"Pattern matches are unreachable"
$
text
"Pattern matches are
potentially
unreachable"
$+$
text
"In a case alternative:"
$+$
nest
2
(
vcat
(
ppExPats
pats
)
<+>
text
"->"
<+>
text
"..."
)
where
...
...
test/TestFrontend.hs
View file @
43e7ee38
...
...
@@ -265,7 +265,7 @@ warnInfos = map (uncurry mkFailTest)
[
"An fcase expression is potentially non-deterministic due to overlapping rules"
,
"Pattern matches are non-exhaustive"
,
"In an fcase alternative"
,
"In a case alternative"
,
"In an equation for `fp'"
,
"Pattern matches are unreachable"
,
"Pattern matches are
potentially
unreachable"
,
"Function `fp' is potentially non-deterministic due to overlapping rules"
,
"Pattern matches are non-exhaustive"
]
...
...
@@ -299,7 +299,7 @@ warnInfos = map (uncurry mkFailTest)
,
"In an equation for `g'"
,
"In an equation for `rec'"
]
)
,
(
"OverlappingPatterns"
,
[
"Pattern matches are unreachable"
,
"In a case alternative"
[
"Pattern matches are
potentially
unreachable"
,
"In a case alternative"
,
"An fcase expression is potentially non-deterministic due to overlapping rules"
,
"Function `i' is potentially non-deterministic due to overlapping rules"
,
"Function `j' is potentially non-deterministic due to overlapping rules"
...
...
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