packages feed

hhp 0.0.2 → 0.0.3

raw patch · 10 files changed

+62/−17 lines, 10 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

elisp/hhp.el view
@@ -28,7 +28,7 @@ 	       (< emacs-minor-version minor)))       (error "hhp requires at least Emacs %d.%d" major minor))) -(defconst hhp-version "0.0.2")+(defconst hhp-version "0.0.3")  ;; (eval-when-compile ;;  (require 'haskell-mode))
hhp.cabal view
@@ -1,5 +1,5 @@ Name:                   hhp-Version:                0.0.2+Version:                0.0.3 Author:                 Kazu Yamamoto <kazu@iij.ad.jp> Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp> License:                BSD3
lib/Hhp/Browse.hs view
@@ -10,7 +10,7 @@ import Name (getOccString) import Outputable (ppr, Outputable) import TyCon (isAlgTyCon)-import Type (dropForAlls, splitFunTy_maybe, mkFunTy, isPredTy)+import Type (dropForAlls, splitFunTy_maybe, isPredTy)  import Control.Exception (SomeException(..)) import Data.Char (isAlpha)@@ -18,6 +18,7 @@ import Data.Maybe (catMaybes)  import Hhp.Doc (showPage, styleUnqualified)+import Hhp.Gap import Hhp.GHCApi import Hhp.Things import Hhp.Types
lib/Hhp/CabalApi.hs view
@@ -23,7 +23,13 @@ import Distribution.Verbosity (silent) import Distribution.Version (Version) -#if MIN_VERSION_Cabal(2,2,0)+#if MIN_VERSION_Cabal(3,2,0)+import Distribution.PackageDescription.Configuration (finalizePD)+import Distribution.PackageDescription.Parsec (readGenericPackageDescription)+import Distribution.Types.ComponentRequestedSpec (defaultComponentRequestedSpec)+import Distribution.Types.Flag (mkFlagAssignment)+import Distribution.Types.PackageName (unPackageName)+#elif MIN_VERSION_Cabal(2,2,0) import Distribution.PackageDescription.Configuration (finalizePD) import Distribution.PackageDescription.Parsec (readGenericPackageDescription) import Distribution.Types.ComponentRequestedSpec (defaultComponentRequestedSpec)
lib/Hhp/GHCApi.hs view
@@ -109,7 +109,7 @@             -> Options             -> CompilerOptions             -> Ghc ()-initSession build Options {..} CompilerOptions {..} = do+initSession build Options{} CompilerOptions{..} = do     df <- G.getSessionDynFlags     void $ G.setSessionDynFlags =<< (addCmdOpts ghcOptions       $ setLinkerOptions
lib/Hhp/Gap.hs view
@@ -13,14 +13,24 @@   , LPattern   , inTypes   , outType+  , HsBindLR(..)+  , languagesAndExtensions+  , mkFunTy+  , mkFunTys   ) where -import DynFlags (DynFlags)-import GHC (LHsBind, LHsExpr, LPat, Type)+import DynFlags (DynFlags, supportedLanguagesAndExtensions)+import GHC (LHsBind, LHsExpr, Type) #if __GLASGOW_HASKELL__ >= 808-import GHC (Located)+import GHC (Located, Pat)+#else+import GHC (LPat) #endif+#if __GLASGOW_HASKELL__ >= 810+import GHC.Hs.Expr (MatchGroup)+#else import HsExpr (MatchGroup)+#endif import Outputable (PrintUnqualified, PprStyle, Depth(AllTheWay), mkUserStyle)  ----------------------------------------------------------------@@ -39,7 +49,11 @@ import qualified Data.IntSet as I (IntSet, empty) #endif -#if __GLASGOW_HASKELL__ >= 806+#if __GLASGOW_HASKELL__ >= 810+import GHC.Hs.Expr (MatchGroupTc(..))+import GHC.Hs.Extension (GhcTc)+import GHC (mg_ext)+#elif __GLASGOW_HASKELL__ >= 806 import HsExpr (MatchGroupTc(..)) import HsExtension (GhcTc) import GHC (mg_ext)@@ -50,6 +64,15 @@ import GHC (Id, mg_res_ty, mg_arg_tys) #endif +#if __GLASGOW_HASKELL__ >= 810+import GHC.Hs.Binds (HsBindLR(..))+import GHC.Platform.Host+import Type (mkVisFunTy, mkVisFunTys)+#else+import HsBinds (HsBindLR(..))+import Type (mkFunTy, mkFunTys)+#endif+ ---------------------------------------------------------------- ---------------------------------------------------------------- @@ -105,7 +128,7 @@ #if __GLASGOW_HASKELL__ >= 808 type LExpression = LHsExpr GhcTc type LBinding    = LHsBind GhcTc-type LPattern    = Located (LPat GhcTc)+type LPattern    = Located (Pat GhcTc)  inTypes :: MatchGroup GhcTc LExpression -> [Type] inTypes = mg_arg_tys . mg_ext@@ -138,4 +161,21 @@ inTypes = mg_arg_tys outType :: MatchGroup Id LExpression -> Type outType = mg_res_ty+#endif++----------------------------------------------------------------++languagesAndExtensions :: [String]+#if __GLASGOW_HASKELL__ >= 810+languagesAndExtensions = supportedLanguagesAndExtensions cHostPlatformMini+#else+languagesAndExtensions = supportedLanguagesAndExtensions+#endif++#if __GLASGOW_HASKELL__ >= 810+mkFunTy :: Type -> Type -> Type+mkFunTy  = mkVisFunTy++mkFunTys :: [Type] -> Type -> Type+mkFunTys = mkVisFunTys #endif
lib/Hhp/Info.hs view
@@ -13,12 +13,11 @@ import Exception (ghandle, SomeException(..)) import GHC (Ghc, TypecheckedModule(..), DynFlags, SrcSpan, Type, GenLocated(L)) import qualified GHC as G-import HsBinds (HsBindLR(..))+ import HscTypes (ModSummary) import Outputable (PprStyle) import PprTyThing import TcHsSyn (hsPatType)-import TcType (mkFunTys)  import Control.Applicative ((<|>)) import Control.Monad (filterM)
lib/Hhp/Lang.hs view
@@ -1,10 +1,9 @@ module Hhp.Lang where -import DynFlags (supportedLanguagesAndExtensions)-+import Hhp.Gap import Hhp.Types  -- | Listing language extensions.  listLanguages :: Options -> IO String-listLanguages opt = return $ convert opt supportedLanguagesAndExtensions+listLanguages opt = return $ convert opt $ languagesAndExtensions
test/LintSpec.hs view
@@ -9,7 +9,7 @@     describe "lintSyntax" $ do         it "check syntax with HLint" $ do             res <- lintSyntax defaultOptions "test/data/hlint.hs"-            res `shouldBe` "test/data/hlint.hs:4:8: Warning: Redundant do\NULFound:\NUL  do putStrLn \"Hello, world!\"\NULPerhaps:\NUL  putStrLn \"Hello, world!\"\n"+            res `shouldBe` "test/data/hlint.hs:5:16-26: Warning: Use sum\NULFound:\NUL  foldr (+) 0\NULPerhaps:\NUL  sum\n"          context "without suggestions" $ do             it "doesn't output empty line" $ do
test/data/hlint.hs view
@@ -2,4 +2,4 @@  main :: IO () main = do-    putStrLn "Hello, world!"+    putStrLn $ foldr (+) 0 [0..10]