projects
/
haskell-directory.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e42f2d7
)
[project @ 2005-10-25 09:29:47 by ross]
author
ross
<unknown>
Tue, 25 Oct 2005 09:29:47 +0000
(09:29 +0000)
committer
ross
<unknown>
Tue, 25 Oct 2005 09:29:47 +0000
(09:29 +0000)
add Monoid instance
Data/Sequence.hs
patch
|
blob
|
history
diff --git
a/Data/Sequence.hs
b/Data/Sequence.hs
index
80c42d3
..
c68a6ad
100644
(file)
--- a/
Data/Sequence.hs
+++ b/
Data/Sequence.hs
@@
-81,6
+81,7
@@
import Prelude hiding (
reverse)
import qualified Data.List (foldl')
import Control.Monad (MonadPlus(..), liftM2)
+import Data.Monoid (Monoid(..))
import Data.FunctorM
import Data.Typeable
@@
-160,6
+161,10
@@
instance Read a => Read (Seq a) where
return (fromList xs,t)
#endif
+instance Monoid (Seq a) where
+ mempty = empty
+ mappend = (><)
+
#include "Typeable.h"
INSTANCE_TYPEABLE1(Seq,seqTc,"Seq")