projects
/
matthijs
/
master-project
/
cλash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
048c653
)
Don't add duplicate name hints.
author
Matthijs Kooijman
<matthijs@stdin.nl>
Tue, 3 Mar 2009 10:56:05 +0000
(11:56 +0100)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Tue, 3 Mar 2009 10:56:05 +0000
(11:56 +0100)
FlattenTypes.hs
patch
|
blob
|
history
diff --git
a/FlattenTypes.hs
b/FlattenTypes.hs
index f75b0d51e64ae9f476627e1d6477062660b1cd5b..44879d00b6683d3c54d6965aab736984091c9e6a 100644
(file)
--- a/
FlattenTypes.hs
+++ b/
FlattenTypes.hs
@@
-193,8
+193,12
@@
addNameHint :: String -> SignalId -> FlattenState ()
addNameHint hint id = do
info <- getSignalInfo id
let hints = nameHints info
- let hints' = (hint:hints)
- setSignalInfo id (info {nameHints = hints'})
+ if hint `elem` hints
+ then do
+ return ()
+ else do
+ let hints' = (hint:hints)
+ setSignalInfo id (info {nameHints = hints'})
-- | Returns the SignalInfo for the given signal. Errors if the signal is not
-- known in the session.