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:
6a10620
)
Add setSignalInfo accessor for FlattenState.
author
Matthijs Kooijman
<m.kooijman@student.utwente.nl>
Wed, 18 Feb 2009 19:18:36 +0000
(20:18 +0100)
committer
Matthijs Kooijman
<m.kooijman@student.utwente.nl>
Wed, 18 Feb 2009 19:18:36 +0000
(20:18 +0100)
FlattenTypes.hs
patch
|
blob
|
history
diff --git
a/FlattenTypes.hs
b/FlattenTypes.hs
index c7db378ef27279f1ef7519f458df5de78426f0e8..8dbdc3b6ab2b9b1a676cd554ba72a78d96e52b38 100644
(file)
--- a/
FlattenTypes.hs
+++ b/
FlattenTypes.hs
@@
-183,3
+183,9
@@
getSignalInfo :: SignalId -> FlattenState SignalInfo
getSignalInfo id = do
(defs, sigs, n) <- State.get
return $ signalInfo sigs id
+
+setSignalInfo :: SignalId -> SignalInfo -> FlattenState ()
+setSignalInfo id' info' = do
+ (defs, sigs, n) <- State.get
+ let sigs' = map (\(id, info) -> (id, if id == id' then info' else info)) sigs
+ State.put (defs, sigs', n)