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:
ee2454d
)
Do the naming of a signal in named function instead of a lambda.
author
Matthijs Kooijman
<m.kooijman@student.utwente.nl>
Thu, 19 Feb 2009 13:26:13 +0000
(14:26 +0100)
committer
Matthijs Kooijman
<m.kooijman@student.utwente.nl>
Thu, 19 Feb 2009 13:26:13 +0000
(14:26 +0100)
Translator.hs
patch
|
blob
|
history
diff --git
a/Translator.hs
b/Translator.hs
index 26cf79d7bb0c86d00a0ddde95ebdb11ec616cb54..0431823f1dcc249c738aac1ddf0ab7a6eecdfc9a 100644
(file)
--- a/
Translator.hs
+++ b/
Translator.hs
@@
-1,5
+1,5
@@
module Translator where
module Translator where
-import GHC hiding (loadModule)
+import GHC hiding (loadModule
, sigName
)
import CoreSyn
import qualified CoreUtils
import qualified Var
import CoreSyn
import qualified CoreUtils
import qualified Var
@@
-221,9
+221,14
@@
nameFlatFunction hsfunc fdata =
-- Name the signals in all other functions
Just flatfunc ->
let s = flat_sigs flatfunc in
-- Name the signals in all other functions
Just flatfunc ->
let s = flat_sigs flatfunc in
- let s' = map
(\(id, (SignalInfo Nothing use ty hints)) -> (id, SignalInfo (Just $ "sig_" ++ (show id)) use ty hints))
s in
+ let s' = map
nameSignal
s in
let flatfunc' = flatfunc { flat_sigs = s' } in
setFlatFunc hsfunc flatfunc'
let flatfunc' = flatfunc { flat_sigs = s' } in
setFlatFunc hsfunc flatfunc'
+ where
+ nameSignal :: (SignalId, SignalInfo) -> (SignalId, SignalInfo)
+ nameSignal (id, info) =
+ let name = "sig_" ++ (show id) in
+ (id, info {sigName = Just name})
-- | Splits a tuple type into a list of element types, or Nothing if the type
-- is not a tuple type.
-- | Splits a tuple type into a list of element types, or Nothing if the type
-- is not a tuple type.