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
Generalize FApp and CondDef into SigDef and add UncondDef.
[matthijs/master-project/cλash.git]
/
Pretty.hs
diff --git
a/Pretty.hs
b/Pretty.hs
index ba0e3d01113c05167ca2387fd69dad2ef4b6fdc9..183125cc65761869c7221e8bb4b5c75c641e38f4 100644
(file)
--- a/
Pretty.hs
+++ b/
Pretty.hs
@@
-37,21
+37,19
@@
instance Pretty HsValueUse where
pPrint (HighOrder _ _) = text "Higher Order"
instance Pretty FlatFunction where
pPrint (HighOrder _ _) = text "Higher Order"
instance Pretty FlatFunction where
- pPrint (FlatFunction args res
apps cond
s sigs) =
+ pPrint (FlatFunction args res
def
s sigs) =
(text "Args: ") $$ nest 10 (pPrint args)
$+$ (text "Result: ") $$ nest 10 (pPrint res)
(text "Args: ") $$ nest 10 (pPrint args)
$+$ (text "Result: ") $$ nest 10 (pPrint res)
- $+$ (text "Apps: ") $$ nest 10 (vcat (map pPrint apps))
- $+$ (text "Conds: ") $$ nest 10 (pPrint conds)
+ $+$ (text "Defs: ") $$ nest 10 (pPrint defs)
$+$ text "Signals: " $$ nest 10 (printList ppsig sigs)
where
ppsig (id, info) = pPrint id <> pPrint info
$+$ text "Signals: " $$ nest 10 (printList ppsig sigs)
where
ppsig (id, info) = pPrint id <> pPrint info
-instance Pretty
FApp
where
+instance Pretty
SigDef
where
pPrint (FApp func args res) =
pPrint func <> text " : " <> pPrint args <> text " -> " <> pPrint res
pPrint (FApp func args res) =
pPrint func <> text " : " <> pPrint args <> text " -> " <> pPrint res
-
-instance Pretty CondDef where
- pPrint _ = text "TODO"
+ pPrint (CondDef _ _ _ _) = text "TODO"
+ pPrint (UncondDef src dst) = text "TODO"
instance Pretty SignalInfo where
pPrint (SignalInfo name use ty) =
instance Pretty SignalInfo where
pPrint (SignalInfo name use ty) =