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:
c77b715
)
Add a getSignalInfo accessor.
author
Matthijs Kooijman
<m.kooijman@student.utwente.nl>
Wed, 18 Feb 2009 18:30:20 +0000
(19:30 +0100)
committer
Matthijs Kooijman
<m.kooijman@student.utwente.nl>
Wed, 18 Feb 2009 18:30:20 +0000
(19:30 +0100)
FlattenTypes.hs
patch
|
blob
|
history
diff --git
a/FlattenTypes.hs
b/FlattenTypes.hs
index bcb8be7d55d8e17a762b13e50d4314ab8a512b9b..c7db378ef27279f1ef7519f458df5de78426f0e8 100644
(file)
--- a/
FlattenTypes.hs
+++ b/
FlattenTypes.hs
@@
-176,3
+176,10
@@
genSignalId use ty = do
let s = (n, SignalInfo Nothing use ty)
State.put (defs, s:sigs, n+1)
return n
+
+-- | Returns the SignalInfo for the given signal. Errors if the signal is not
+-- known in the session.
+getSignalInfo :: SignalId -> FlattenState SignalInfo
+getSignalInfo id = do
+ (defs, sigs, n) <- State.get
+ return $ signalInfo sigs id