-{-# OPTIONS_GHC -fno-implicit-prelude #-}
+{-# LANGUAGE CPP, NoImplicitPrelude, DeriveGeneric #-}
+
-----------------------------------------------------------------------------
-- |
-- Module : Data.Maybe
#ifdef __GLASGOW_HASKELL__
import GHC.Base
+import GHC.Generics (Generic)
#endif
#ifdef __NHC__
-- error monad can be built using the 'Data.Either.Either' type.
data Maybe a = Nothing | Just a
- deriving (Eq, Ord)
+ deriving (Eq, Ord, Generic)
instance Functor Maybe where
fmap _ Nothing = Nothing