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,251
Issues
4,251
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
398
Merge Requests
398
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
c0fb187b
Commit
c0fb187b
authored
Apr 06, 2013
by
Gabor Greif
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Derive instance Eq for CmmNode
parent
9b3d4cdd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
14 deletions
+3
-14
compiler/cmm/CmmNode.hs
compiler/cmm/CmmNode.hs
+3
-14
No files found.
compiler/cmm/CmmNode.hs
View file @
c0fb187b
-- CmmNode type for representation using Hoopl graphs.
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS -fno-warn-tabs #-}
...
...
@@ -199,20 +200,8 @@ way is done in cmm/CmmOpt.hs currently. We should fix this!
---------------------------------------------
-- Eq instance of CmmNode
-- It is a shame GHC cannot infer it by itself :(
instance
Eq
(
CmmNode
e
x
)
where
(
CmmEntry
a
)
==
(
CmmEntry
a'
)
=
a
==
a'
(
CmmComment
a
)
==
(
CmmComment
a'
)
=
a
==
a'
(
CmmAssign
a
b
)
==
(
CmmAssign
a'
b'
)
=
a
==
a'
&&
b
==
b'
(
CmmStore
a
b
)
==
(
CmmStore
a'
b'
)
=
a
==
a'
&&
b
==
b'
(
CmmUnsafeForeignCall
a
b
c
)
==
(
CmmUnsafeForeignCall
a'
b'
c'
)
=
a
==
a'
&&
b
==
b'
&&
c
==
c'
(
CmmBranch
a
)
==
(
CmmBranch
a'
)
=
a
==
a'
(
CmmCondBranch
a
b
c
)
==
(
CmmCondBranch
a'
b'
c'
)
=
a
==
a'
&&
b
==
b'
&&
c
==
c'
(
CmmSwitch
a
b
)
==
(
CmmSwitch
a'
b'
)
=
a
==
a'
&&
b
==
b'
(
CmmCall
a
b
c
d
e
f
)
==
(
CmmCall
a'
b'
c'
d'
e'
f'
)
=
a
==
a'
&&
b
==
b'
&&
c
==
c'
&&
d
==
d'
&&
e
==
e'
&&
f
==
f'
(
CmmForeignCall
a
b
c
d
e
f
)
==
(
CmmForeignCall
a'
b'
c'
d'
e'
f'
)
=
a
==
a'
&&
b
==
b'
&&
c
==
c'
&&
d
==
d'
&&
e
==
e'
&&
f
==
f'
_
==
_
=
False
deriving
instance
Eq
(
CmmNode
e
x
)
----------------------------------------------
-- Hoopl instances of CmmNode
...
...
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