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:
829e3b4
)
Show classes in listBindings output.
author
Matthijs Kooijman
<matthijs@stdin.nl>
Mon, 8 Mar 2010 10:54:45 +0000
(11:54 +0100)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Mon, 8 Mar 2010 10:54:45 +0000
(11:54 +0100)
cλash/CLasH/Utils/GhcTools.hs
patch
|
blob
|
history
diff --git
a/cλash/CLasH/Utils/GhcTools.hs
b/cλash/CLasH/Utils/GhcTools.hs
index d898795c9dbb6107e848f4856cba3015a4ca5d0b..c407436e61939553832e4b5fb66e5162edb8e892 100644
(file)
--- a/
cλash/CLasH/Utils/GhcTools.hs
+++ b/
cλash/CLasH/Utils/GhcTools.hs
@@
-19,6
+19,7
@@
import qualified Name
import qualified Serialized
import qualified Var
import qualified Outputable
import qualified Serialized
import qualified Var
import qualified Outputable
+import qualified Class
-- Local Imports
import CLasH.Utils.Pretty
-- Local Imports
import CLasH.Utils.Pretty
@@
-31,6
+32,9
@@
listBindings libdir filenames = do
(cores,_,_) <- loadModules libdir filenames Nothing
let binds = concatMap (CoreSyn.flattenBinds . HscTypes.cm_binds) cores
mapM listBinding binds
(cores,_,_) <- loadModules libdir filenames Nothing
let binds = concatMap (CoreSyn.flattenBinds . HscTypes.cm_binds) cores
mapM listBinding binds
+ putStr "\n=========================\n"
+ let classes = concatMap (HscTypes.typeEnvClasses . HscTypes.cm_types) cores
+ mapM listClass classes
listBinding :: (CoreSyn.CoreBndr, CoreSyn.CoreExpr) -> IO ()
listBinding (b, e) = do
listBinding :: (CoreSyn.CoreBndr, CoreSyn.CoreExpr) -> IO ()
listBinding (b, e) = do
@@
-45,6
+49,14
@@
listBinding (b, e) = do
putStr "\n\nType of Expression: \n"
putStr $ Outputable.showSDoc $ Outputable.ppr $ CoreUtils.exprType e
putStr "\n\n"
putStr "\n\nType of Expression: \n"
putStr $ Outputable.showSDoc $ Outputable.ppr $ CoreUtils.exprType e
putStr "\n\n"
+
+listClass :: Class.Class -> IO ()
+listClass c = do
+ putStr "\nClass: "
+ putStr $ show (Class.className c)
+ putStr "\nSelectors: "
+ putStr $ show (Class.classSelIds c)
+ putStr "\n"
-- | Show the core structure of the given binds in the given file.
listBind :: FilePath -> [FilePath] -> String -> IO ()
-- | Show the core structure of the given binds in the given file.
listBind :: FilePath -> [FilePath] -> String -> IO ()