Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,309
Issues
4,309
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
383
Merge Requests
383
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
55754ea3
Commit
55754ea3
authored
Jul 21, 2015
by
Simon Peyton Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test T2497 to avoid infinite loop in RULES
parent
7a6ed665
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
testsuite/tests/typecheck/should_compile/T2497.hs
testsuite/tests/typecheck/should_compile/T2497.hs
+5
-1
testsuite/tests/typecheck/should_compile/T2497.stderr
testsuite/tests/typecheck/should_compile/T2497.stderr
+1
-1
No files found.
testsuite/tests/typecheck/should_compile/T2497.hs
View file @
55754ea3
...
...
@@ -14,9 +14,13 @@ foo x = x
-- Trac #2213; eq should not be reported as unused
eq
,
beq
::
Eq
a
=>
a
->
a
->
Bool
{-# NOINLINE [0] eq #-}
-- The pragma and [~1] in the RULE are to prevent an infinite loo
-- in the simplifier, where the RULE fires infinitely in its
-- own RHS
eq
=
(
==
)
-- Used
beq
=
(
==
)
-- Unused
{-# RULES
"rule 1" forall x y. x == y = y `eq` x
"rule 1"
[~1]
forall x y. x == y = y `eq` x
#-}
testsuite/tests/typecheck/should_compile/T2497.stderr
View file @
55754ea3
T2497.hs:
18:1: W
arning: Defined but not used: ‘beq’
T2497.hs:
22:1: w
arning: Defined but not used: ‘beq’
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