projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix dependency information for RULES
[ghc-hetmet.git]
/
compiler
/
basicTypes
/
OccName.lhs
diff --git
a/compiler/basicTypes/OccName.lhs
b/compiler/basicTypes/OccName.lhs
index
48aa6db
..
0ca7f5f
100644
(file)
--- a/
compiler/basicTypes/OccName.lhs
+++ b/
compiler/basicTypes/OccName.lhs
@@
-92,8
+92,8
@@
isSymbol = const False
%************************************************************************
\begin{code}
%************************************************************************
\begin{code}
-data NameSpace = VarName -- Variables, including "source" data constructors
- | DataName -- "Real" data constructors
+data NameSpace = VarName -- Variables, including "real" data constructors
+ | DataName -- "Source" data constructors
| TvName -- Type variables
| TcClsName -- Type constructors and classes; Haskell has them
-- in the same name space for now.
| TvName -- Type variables
| TcClsName -- Type constructors and classes; Haskell has them
-- in the same name space for now.
@@
-176,8
+176,9
@@
instance Eq OccName where
(OccName sp1 s1) == (OccName sp2 s2) = s1 == s2 && sp1 == sp2
instance Ord OccName where
(OccName sp1 s1) == (OccName sp2 s2) = s1 == s2 && sp1 == sp2
instance Ord OccName where
- compare (OccName sp1 s1) (OccName sp2 s2) = (s1 `compare` s2) `thenCmp`
- (sp1 `compare` sp2)
+ -- Compares lexicographically, *not* by Unique of the string
+ compare (OccName sp1 s1) (OccName sp2 s2)
+ = (s1 `compare` s2) `thenCmp` (sp1 `compare` sp2)
\end{code}
\end{code}