[project @ 2001-10-24 13:45:37 by simonpj]
authorsimonpj <unknown>
Wed, 24 Oct 2001 13:45:37 +0000 (13:45 +0000)
committersimonpj <unknown>
Wed, 24 Oct 2001 13:45:37 +0000 (13:45 +0000)
NB: (Just a) `mplus` (Just b) = a

We want catMaybes, not mplus!

ghc/compiler/main/MkIface.lhs

index 5fa1360..0514ce7 100644 (file)
@@ -62,8 +62,8 @@ import Module         ( ModuleName )
 import Util            ( sortLt )
 import ErrUtils                ( dumpIfSet_dyn )
 
-import Monad           ( when, mplus )
-import Maybe           ( maybeToList )
+import Monad           ( when )
+import Maybe           ( catMaybes )
 import IO              ( IOMode(..), openFile, hClose )
 \end{code}
 
@@ -264,13 +264,12 @@ ifaceTyThing (AnId id) = iface_sig
     arity_info = arityInfo id_info
     caf_info   = cgCafInfo cg_info
 
-    hs_idinfo | opt_OmitInterfacePragmas = []
-             | otherwise                = maybeToList $
-                                                  arity_hsinfo  `mplus`
-                                                  caf_hsinfo    `mplus`
-                                                  strict_hsinfo `mplus`
-                                                  wrkr_hsinfo   `mplus`
-                                                  unfold_hsinfo 
+    hs_idinfo | opt_OmitInterfacePragmas
+             = []
+             | otherwise
+             = catMaybes [arity_hsinfo,  caf_hsinfo,
+                          strict_hsinfo, wrkr_hsinfo,
+                          unfold_hsinfo] 
 
     ------------  Arity  --------------
     arity_hsinfo | arity_info == 0 = Nothing