Removing GHCVersion.

This commit is contained in:
Kazu Yamamoto 2013-09-20 17:21:10 +09:00
parent 5f0fcd0442
commit 668e9e4771
3 changed files with 1 additions and 22 deletions

View File

@ -4,9 +4,6 @@ module Language.Haskell.GhcMod (
-- * Cradle
Cradle(..)
, findCradle
-- * GHC version
, GHCVersion
, getGHCVersion
-- * Options
, Options(..)
, LineSeparator(..)
@ -48,4 +45,3 @@ import Language.Haskell.GhcMod.Lang
import Language.Haskell.GhcMod.Lint
import Language.Haskell.GhcMod.List
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.CabalApi

View File

@ -6,12 +6,10 @@ module Language.Haskell.GhcMod.CabalApi (
, cabalAllBuildInfo
, cabalDependPackages
, cabalSourceDirs
, getGHCVersion
) where
import Control.Applicative ((<$>))
import Control.Exception (throwIO)
import Data.List (intercalate)
import Data.Maybe (maybeToList)
import Data.Set (fromList, toList)
import Distribution.Package (Dependency(Dependency)
@ -26,7 +24,7 @@ import Distribution.Simple.Program.Types (programName, programFindVersion)
import Distribution.System (buildPlatform)
import Distribution.Text (display)
import Distribution.Verbosity (silent)
import Distribution.Version (versionBranch, Version)
import Distribution.Version (Version)
import Language.Haskell.GhcMod.Types
import System.Directory (doesFileExist)
import System.FilePath
@ -151,18 +149,6 @@ uniqueAndSort = toList . fromList
----------------------------------------------------------------
-- | Getting GHC version. 7.6.3 becames 706 in the second of the result.
getGHCVersion :: IO (GHCVersion, Int)
getGHCVersion = toTupple <$> getGHC
where
toTupple v
| length vs < 2 = (verstr, 0)
| otherwise = (verstr, ver)
where
vs = versionBranch v
ver = (vs !! 0) * 100 + (vs !! 1)
verstr = intercalate "." . map show $ vs
getGHCId :: IO CompilerId
getGHCId = CompilerId GHC <$> getGHC

View File

@ -97,9 +97,6 @@ type IncludeDir = FilePath
-- | A package name.
type Package = String
-- | GHC version in 'String'.
type GHCVersion = String
-- | Haskell expression.
type Expression = String