X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Data%2FMaybe.hs;h=2f98c70e6eee655405db49719c330f2db790eb25;hb=HEAD;hp=981d028d42443c95fec1bb053b9e8c3215a4c2d1;hpb=10de2c656f74562b662c22928be85e1b3ccda796;p=ghc-base.git diff --git a/Data/Maybe.hs b/Data/Maybe.hs index 981d028..2f98c70 100644 --- a/Data/Maybe.hs +++ b/Data/Maybe.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, DeriveGeneric #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Maybe @@ -32,6 +33,7 @@ module Data.Maybe #ifdef __GLASGOW_HASKELL__ import GHC.Base +import GHC.Generics (Generic) #endif #ifdef __NHC__ @@ -64,7 +66,7 @@ import Maybe -- 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