import GHC.Base
#endif
+#ifdef __NHC__
+import Prelude
+import Prelude (Maybe(..), maybe)
+import Maybe
+ ( isJust
+ , isNothing
+ , fromJust
+ , fromMaybe
+ , listToMaybe
+ , maybeToList
+ , catMaybes
+ , mapMaybe
+ )
+#else
+
+#ifndef __HUGS__
-- ---------------------------------------------------------------------------
-- The Maybe type, and instances
maybe :: b -> (a -> b) -> Maybe a -> b
maybe n _ Nothing = n
maybe _ f (Just x) = f x
+#endif /* __HUGS__ */
isJust :: Maybe a -> Bool
isJust Nothing = False
Nothing -> rs
Just r -> r:rs
+#endif /* else not __NHC__ */