summaryrefslogtreecommitdiff
path: root/ghc/compiler/hsSyn/HsBinds.lhs
diff options
context:
space:
mode:
authorsimonm <unknown>1998-12-02 13:32:30 +0000
committersimonm <unknown>1998-12-02 13:32:30 +0000
commit438596897ebbe25a07e1c82085cfbc5bdb00f09e (patch)
treeda7a441396aed2e13f6e0cc55282bf041b0cf72c /ghc/compiler/hsSyn/HsBinds.lhs
parent967cc47f37cb93a5e2b6df7822c9a646f0428247 (diff)
downloadhaskell-438596897ebbe25a07e1c82085cfbc5bdb00f09e.tar.gz
[project @ 1998-12-02 13:17:09 by simonm]
Move 4.01 onto the main trunk.
Diffstat (limited to 'ghc/compiler/hsSyn/HsBinds.lhs')
-rw-r--r--ghc/compiler/hsSyn/HsBinds.lhs16
1 files changed, 10 insertions, 6 deletions
diff --git a/ghc/compiler/hsSyn/HsBinds.lhs b/ghc/compiler/hsSyn/HsBinds.lhs
index f75117cecb..a9729e6934 100644
--- a/ghc/compiler/hsSyn/HsBinds.lhs
+++ b/ghc/compiler/hsSyn/HsBinds.lhs
@@ -1,5 +1,5 @@
%
-% (c) The GRASP/AQUA Project, Glasgow University, 1992-1996
+% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
\section[HsBinds]{Abstract syntax: top-level bindings and signatures}
@@ -19,14 +19,13 @@ import CoreSyn ( CoreExpr )
import PprCore () -- Instances for Outputable
--others:
-import Id ( Id, GenId )
+import Id ( Id )
import Name ( OccName, NamedThing(..) )
import BasicTypes ( RecFlag(..) )
import Outputable
import Bag
import SrcLoc ( SrcLoc )
-import Type ( GenType )
-import TyVar ( GenTyVar )
+import Var ( GenTyVar )
\end{code}
%************************************************************************
@@ -157,8 +156,13 @@ nullMonoBinds EmptyMonoBinds = True
nullMonoBinds (AndMonoBinds bs1 bs2) = nullMonoBinds bs1 && nullMonoBinds bs2
nullMonoBinds other_monobind = False
-andMonoBinds :: [MonoBinds flexi id pat] -> MonoBinds flexi id pat
-andMonoBinds binds = foldr AndMonoBinds EmptyMonoBinds binds
+andMonoBinds :: MonoBinds flexi id pat -> MonoBinds flexi id pat -> MonoBinds flexi id pat
+andMonoBinds EmptyMonoBinds mb = mb
+andMonoBinds mb EmptyMonoBinds = mb
+andMonoBinds mb1 mb2 = AndMonoBinds mb1 mb2
+
+andMonoBindList :: [MonoBinds flexi id pat] -> MonoBinds flexi id pat
+andMonoBindList binds = foldr AndMonoBinds EmptyMonoBinds binds
\end{code}
\begin{code}