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
Actually make the scrutinee binder removal not crash.
[matthijs/master-project/cλash.git]
/
cλash
/
CLasH
/
Utils
/
Core
/
BinderTools.hs
diff --git
a/cλash/CLasH/Utils/Core/BinderTools.hs
b/cλash/CLasH/Utils/Core/BinderTools.hs
index a072c45f2ee95389672704fce4a9f6e412145752..ef694746286b622a70dab4f98bbef36a247a264e 100644
(file)
--- a/
cλash/CLasH/Utils/Core/BinderTools.hs
+++ b/
cλash/CLasH/Utils/Core/BinderTools.hs
@@
-4,7
+4,7
@@
module CLasH.Utils.Core.BinderTools where
-- Standard modules
module CLasH.Utils.Core.BinderTools where
-- Standard modules
-import Data.Accessor.MonadState as MonadState
+import Data.Accessor.Monad
.Trans.
State as MonadState
-- GHC API
import CoreSyn
-- GHC API
import CoreSyn
@@
-22,16
+22,14
@@
import qualified VarSet
import qualified HscTypes
-- Local imports
import qualified HscTypes
-- Local imports
-import Data.Accessor
-import Data.Accessor.MonadState as MonadState
import CLasH.Translator.TranslatorTypes
-- Create a new Unique
mkUnique :: TranslatorSession Unique.Unique
mkUnique = do
import CLasH.Translator.TranslatorTypes
-- Create a new Unique
mkUnique :: TranslatorSession Unique.Unique
mkUnique = do
- us <-
getA
tsUniqSupply
+ us <-
MonadState.get
tsUniqSupply
let (us', us'') = UniqSupply.splitUniqSupply us
let (us', us'') = UniqSupply.splitUniqSupply us
-
putA
tsUniqSupply us'
+
MonadState.set
tsUniqSupply us'
return $ UniqSupply.uniqFromSupply us''
-- Create a new internal var with the given name and type. A Unique is
return $ UniqSupply.uniqFromSupply us''
-- Create a new internal var with the given name and type. A Unique is