diff options
| author | Ian Lynagh <igloo@earth.li> | 2008-08-04 00:41:47 +0000 |
|---|---|---|
| committer | Ian Lynagh <igloo@earth.li> | 2008-08-04 00:41:47 +0000 |
| commit | 860c51cd4747ff41fd6ef5f9cc19d35feb4e4d82 (patch) | |
| tree | 905152a170a81b689a14b593629bf1b2846d05b2 /libraries/base/Data/Either.hs | |
| parent | 8454033c69cf7bb6a11929736dd52ebcfa8350ec (diff) | |
| download | haskell-860c51cd4747ff41fd6ef5f9cc19d35feb4e4d82.tar.gz | |
Change some imports and derive Show (Either a b)
rather than writing it by hand in GHC.Show
Diffstat (limited to 'libraries/base/Data/Either.hs')
| -rw-r--r-- | libraries/base/Data/Either.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libraries/base/Data/Either.hs b/libraries/base/Data/Either.hs index 0bed2902a3..dbed24bfb8 100644 --- a/libraries/base/Data/Either.hs +++ b/libraries/base/Data/Either.hs @@ -25,6 +25,7 @@ import Data.Tuple () #ifdef __GLASGOW_HASKELL__ import GHC.Base +import GHC.Show {- -- just for testing @@ -41,7 +42,7 @@ either correct or an error; by convention, the 'Left' constructor is used to hold an error value and the 'Right' constructor is used to hold a correct value (mnemonic: \"right\" also means \"correct\"). -} -data Either a b = Left a | Right b deriving (Eq, Ord ) +data Either a b = Left a | Right b deriving (Eq, Ord, Show) -- | Case analysis for the 'Either' type. -- If the value is @'Left' a@, apply the first function to @a@; |
