packages feed

ide-backend 0.9.0.2 → 0.9.0.3

raw patch · 2 files changed

+1/−109 lines, 2 filesdep ~basedep ~directorydep ~filemanipPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, directory, filemanip, ide-backend-common, temporary, text, time

API changes (from Hackage documentation)

Files

ide-backend.cabal view
@@ -1,5 +1,5 @@ name:                 ide-backend-version:              0.9.0.2+version:              0.9.0.3 synopsis:             An IDE backend library description:          See README.md for more details license:              MIT@@ -113,20 +113,6 @@   other-extensions:   CPP, TemplateHaskell, ScopedTypeVariables,                       DeriveDataTypeable   ghc-options:        -Wall -fno-warn-unused-do-bind--test-suite typecheck-dir-  type:               exitcode-stdio-1.0-  main-is:            typecheck-dir.hs-  hs-source-dirs:     test-  build-depends:      base, ide-backend, ide-backend-common, temporary, filemanip, directory, time, text--  default-language:   Haskell2010-  default-extensions: MonoLocalBinds,-                      BangPatterns, RecordWildCards, NamedFieldPuns-  other-extensions:   CPP, TemplateHaskell, ScopedTypeVariables,-                      DeriveDataTypeable-  ghc-options:        -Wall -fno-warn-unused-do-bind-  ghc-options:        -with-rtsopts=-K16M  test-suite TestSuite   type:               exitcode-stdio-1.0
− test/typecheck-dir.hs
@@ -1,94 +0,0 @@-module Main where--import Control.Exception (bracket)-import Control.Monad (liftM, unless)-import Data.Monoid (mconcat)-import System.Directory-import System.Environment-import System.FilePath.Find (always, extension, find)-import System.IO.Temp (withTempDirectory)--import IdeSession----- A sample program using the library. It type-checks all files---- in the given directory and prints out the list of errors.---- | Some common extensions, etc. (please fill in).--- Curiously "-XTypeFamilies" causes the type-checking of the default--- test file to fail. The same file type-checks OK with the ghc-errors--- test program (with no GHC extensions set).-defOpts :: [String]-defOpts = [ "-hide-all-packages"  -- make sure we don't depend on local pkgs-          , "-XCPP"-          , "-XNoTemplateHaskell"  -- TH not available when profiling-          , "-XBangPatterns"-          , "-XRecordWildCards"-          , "-XNamedFieldPuns"-          , "-XPatternGuards"-          , "-XScopedTypeVariables"-          , "-XMultiParamTypeClasses"-          , "-XRankNTypes"--- causes problems with the Cabal code:          , "-XTypeFamilies"-          , "-XForeignFunctionInterface"-          , "-XDeriveDataTypeable"-          , "-package template-haskell"-          , "-package old-time"-          , "-package parallel"-          , "-package base"-          , "-package deepseq"-          , "-package filepath"-          , "-package directory"-          , "-package process"-          , "-package time"-          , "-package containers"-          , "-package array"-          , "-package pretty"-          , "-package bytestring"-          , "-package unix"-          ]--main :: IO ()-main = do-  args <- getArgs-  let (originalSourcesDir, opts) = case args of-        ["--help"] ->-          error "usage: typecheck-dir [source-dir [ghc-options]]"-        [dir] -> (dir, defOpts)-        dir : optsArg -> (dir, optsArg)-        [] -> ("TestSuite/inputs/Cabal-1.18.1.5",-               defOpts)-  slashTmp <- getTemporaryDirectory-  withTempDirectory slashTmp "typecheck-dir."-    $ check opts originalSourcesDir--check :: [String] -> FilePath -> FilePath -> IO ()-check opts what configDir = do-  putStrLn $ "Copying files from: " ++ what ++ "\n"-          ++ "to a temporary directory at: " ++ configDir ++ "\n"-  -- Init session.-  let sessionInitParams = defaultSessionInitParams {-                              sessionInitGhcOptions = opts-                            }-      sessionConfig     = defaultSessionConfig{-                              configDir-                         -- , configInProcess  = True-                            }--  bracket (initSession sessionInitParams sessionConfig)-          shutdownSession $ \session -> do-    isFile      <- doesFileExist      what-    isDirectory <- doesDirectoryExist what--    unless (isFile || isDirectory) $ fail ("invalid argument " ++ what)--    modules <- if isFile-      then return [what]-      else find always ((`elem` sourceExtensions) `liftM` extension) what--    print modules--    let update = mconcat (map updateSourceFileFromFile modules)--    updateSession session update print-    errs <- getSourceErrors session-    putStrLn $ "\nErrors and warnings:\n" ++ unlines (map show errs)