projects
/
matthijs
/
master-project
/
cλash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Store a use for each signal in a flattened function.
[matthijs/master-project/cλash.git]
/
Flatten.hs
diff --git
a/Flatten.hs
b/Flatten.hs
index cd515859f0879755d9d7f6e704bfb241271d9fbc..f7ab86ce107ed770e6bbc46e3d67186e83eccdb9 100644
(file)
--- a/
Flatten.hs
+++ b/
Flatten.hs
@@
-28,21
+28,22
@@
genSignals ::
-> FlattenState (SignalMap UnnamedSignal)
genSignals ty = do
-> FlattenState (SignalMap UnnamedSignal)
genSignals ty = do
- typeMapToUseMap tymap
+ typeMapToUseMap
SigInternal
tymap
where
-- First generate a map with the right structure containing the types
tymap = mkHsValueMap ty
typeMapToUseMap ::
where
-- First generate a map with the right structure containing the types
tymap = mkHsValueMap ty
typeMapToUseMap ::
- HsValueMap Type.Type
+ SigUse
+ -> HsValueMap Type.Type
-> FlattenState (SignalMap UnnamedSignal)
-> FlattenState (SignalMap UnnamedSignal)
-typeMapToUseMap (Single ty) = do
- id <- genSignalId ty
+typeMapToUseMap
use
(Single ty) = do
+ id <- genSignalId
use
ty
return $ Single id
return $ Single id
-typeMapToUseMap (Tuple tymaps) = do
- usemaps <- State.mapM
typeMapToUseMap
tymaps
+typeMapToUseMap
use
(Tuple tymaps) = do
+ usemaps <- State.mapM
(typeMapToUseMap use)
tymaps
return $ Tuple usemaps
-- | Flatten a haskell function
return $ Tuple usemaps
-- | Flatten a haskell function