Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 28 lines (21 sloc) 0.637 kb
4d29207 @kolmodin guess-ghc-version: Add a executable to run with .cabal files to guess it...
kolmodin authored
1 module Main where
2
3 import System.Environment
4
5 import Distribution.PackageDescription
6 import Distribution.PackageDescription.Parse
7
8 import Distribution.Text
9 import Distribution.Verbosity
10
11 import Portage.GHCCore
12
13 main :: IO ()
14 main = do
15 args <- getArgs
16 gpds <- mapM (readPackageDescription silent) args
17 mapM_ guess gpds
18
19 guess :: GenericPackageDescription -> IO ()
20 guess gpd = do
21 let pkg = package . packageDescription $ gpd
22 let mghc = minimumGHCVersionToBuildPackage gpd
23 putStr (display pkg)
24 putStr "\t\t"
25 putStrLn $ case mghc of
26 Nothing -> "Unknown"
4f6ec6f @kolmodin guess-ghc-version: Integrate GHC guessing into 'hackport merge'
kolmodin authored
27 Just (compiler, _pkgs) -> display compiler
Something went wrong with that request. Please try again.