projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
180df34
)
[project @ 2005-07-04 10:22:17 by ross]
author
ross
<unknown>
Mon, 4 Jul 2005 10:22:17 +0000
(10:22 +0000)
committer
ross
<unknown>
Mon, 4 Jul 2005 10:22:17 +0000
(10:22 +0000)
add Typeable instance
Data/Tree.hs
patch
|
blob
|
history
diff --git
a/Data/Tree.hs
b/Data/Tree.hs
index
5c95f2a
..
8137f86
100644
(file)
--- a/
Data/Tree.hs
+++ b/
Data/Tree.hs
@@
-31,6
+31,9
@@
import Prelude
import Control.Monad
import Data.Maybe
import Data.Queue
+import Data.Typeable
+
+#include "Typeable.h"
-- | Multi-way trees, also known as /rose trees/.
data Tree a = Node {
@@
-46,6
+49,8
@@
instance Show a => Show (Tree a)
#endif
type Forest a = [Tree a]
+INSTANCE_TYPEABLE1(Tree,treeTc,"Tree")
+
instance Functor Tree where
fmap = mapTree