summaryrefslogtreecommitdiff
path: root/libraries/base/Data/Version.hs
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/base/Data/Version.hs')
-rw-r--r--libraries/base/Data/Version.hs23
1 files changed, 2 insertions, 21 deletions
diff --git a/libraries/base/Data/Version.hs b/libraries/base/Data/Version.hs
index 742e051c4a..23d217634e 100644
--- a/libraries/base/Data/Version.hs
+++ b/libraries/base/Data/Version.hs
@@ -1,5 +1,5 @@
{-# LANGUAGE Trustworthy #-}
-{-# LANGUAGE CPP, DeriveDataTypeable #-}
+{-# LANGUAGE DeriveDataTypeable #-}
-----------------------------------------------------------------------------
-- |
@@ -37,12 +37,7 @@ import Prelude -- necessary to get dependencies right
import Text.ParserCombinators.ReadP
-#if !__GLASGOW_HASKELL__
-import Data.Typeable ( Typeable, TyCon, mkTyCon, mkTyConApp )
-#else
import Data.Typeable ( Typeable )
-#endif
-
import Data.List ( intersperse, sort )
import Control.Monad ( liftM )
import Data.Char ( isDigit, isAlphaNum )
@@ -90,19 +85,7 @@ data Version =
-- The interpretation of the list of tags is entirely dependent
-- on the entity that this version applies to.
}
- deriving (Read,Show
-#if __GLASGOW_HASKELL__
- ,Typeable
-#endif
- )
-
-#if !__GLASGOW_HASKELL__
-versionTc :: TyCon
-versionTc = mkTyCon "Version"
-
-instance Typeable Version where
- typeOf _ = mkTyConApp versionTc []
-#endif
+ deriving (Read,Show,Typeable)
instance Eq Version where
v1 == v2 = versionBranch v1 == versionBranch v2
@@ -126,9 +109,7 @@ showVersion (Version branch tags)
-- | A parser for versions in the format produced by 'showVersion'.
--
-#ifdef __GLASGOW_HASKELL__
parseVersion :: ReadP Version
-#endif
parseVersion = do branch <- sepBy1 (liftM read $ munch1 isDigit) (char '.')
tags <- many (char '-' >> munch1 isAlphaNum)
return Version{versionBranch=branch, versionTags=tags}