summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshersh <>2018-02-01 20:16:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2018-02-01 20:16:00 (GMT)
commit1e78d1eaa682a5ad09c925e8fd8fa69d47af7771 (patch)
tree0ba67a0255f70c839ee38182b882200b702a2524
parentdd98973f8e58c0283bd98b0e9ade9356f8e93e8c (diff)
version 0.9.10.9.1
-rw-r--r--CHANGELOG.md5
-rw-r--r--haskell-names.cabal8
-rw-r--r--src/Language/Haskell/Names/Annotated.hs2
-rw-r--r--src/Language/Haskell/Names/Environment.hs2
-rw-r--r--src/Language/Haskell/Names/Exports.hs1
-rw-r--r--src/Language/Haskell/Names/GetBound.hs2
-rw-r--r--src/Language/Haskell/Names/Imports.hs1
-rw-r--r--src/Language/Haskell/Names/LocalSymbolTable.hs1
-rw-r--r--src/Language/Haskell/Names/ModuleSymbols.hs3
-rw-r--r--src/Language/Haskell/Names/Open/Base.hs5
-rw-r--r--src/Language/Haskell/Names/Open/Derived.hs4
-rw-r--r--src/Language/Haskell/Names/Open/Instances.hs5
-rw-r--r--src/Language/Haskell/Names/ScopeUtils.hs1
-rw-r--r--src/Language/Haskell/Names/SyntaxUtils.hs2
-rw-r--r--src/Language/Haskell/Names/Types.hs1
-rw-r--r--tests/run.hs9
16 files changed, 23 insertions, 29 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1c2fe46..badccb4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,11 @@
Changes
=======
+Version 0.9.1
+-------------
+
+* Use haskell-src-exts 1.20
+
Version 0.9.0
-------------
diff --git a/haskell-names.cabal b/haskell-names.cabal
index a46e2ca..8c55984 100644
--- a/haskell-names.cabal
+++ b/haskell-names.cabal
@@ -1,5 +1,5 @@
Name: haskell-names
-Version: 0.9.0
+Version: 0.9.1
License: BSD3
Author: Philipp Schuster, Roman Cheplyaka, Lennart Augustsson
Maintainer: Philipp Schuster
@@ -236,7 +236,7 @@ Library
Default-Language: Haskell2010
Build-depends:
base >= 4 && < 5
- , haskell-src-exts >= 1.18 && < 1.20
+ , haskell-src-exts >= 1.20 && < 1.21
, mtl >= 2.2.1 && < 2.3
, transformers >=0.4.2.0 && < 0.6
, filepath >= 1.1 && < 1.5
@@ -283,11 +283,11 @@ Test-suite test
Build-depends:
base >= 4 && < 5
, haskell-names
- , haskell-src-exts >= 1.18 && < 1.20
+ , haskell-src-exts >= 1.20 && < 1.21
, mtl >= 2.2.1 && < 2.3
, filepath >= 1.1 && <1.5
, containers >= 0.2 && < 0.6
- , tasty >= 0.10.1.2 && < 0.12
+ , tasty >= 0.12 && < 0.13
, tasty-golden >= 2.2.1 && < 2.4
, filemanip >= 0.3.6.3 && < 0.4
, pretty-show >= 1.6.1 && < 1.7
diff --git a/src/Language/Haskell/Names/Annotated.hs b/src/Language/Haskell/Names/Annotated.hs
index cb53245..8274643 100644
--- a/src/Language/Haskell/Names/Annotated.hs
+++ b/src/Language/Haskell/Names/Annotated.hs
@@ -24,8 +24,6 @@ import Data.Proxy
import Data.Lens.Light
import Data.Typeable (
Typeable, (:~:)(Refl), eqT)
- -- in GHC 7.8 Data.Typeable exports (:~:). Be careful to avoid the clash.
-import Control.Applicative
annotateDecl
diff --git a/src/Language/Haskell/Names/Environment.hs b/src/Language/Haskell/Names/Environment.hs
index e8ea923..41929be 100644
--- a/src/Language/Haskell/Names/Environment.hs
+++ b/src/Language/Haskell/Names/Environment.hs
@@ -17,11 +17,9 @@ import Language.Haskell.Exts (ModuleName(ModuleName),Name,prettyPrint)
import Language.Haskell.Names.SyntaxUtils (stringToName,nameToString,dropAnn, annName)
import qualified Data.ByteString.Lazy as BS (readFile, writeFile, pack)
import Data.Aeson
-import Data.Monoid
import Data.Char
import Data.Typeable
import Control.Exception
-import Control.Applicative
import Control.Monad
import System.FilePath ((</>), (<.>))
import qualified Data.Map as Map (fromList)
diff --git a/src/Language/Haskell/Names/Exports.hs b/src/Language/Haskell/Names/Exports.hs
index 809d1b3..c90782a 100644
--- a/src/Language/Haskell/Names/Exports.hs
+++ b/src/Language/Haskell/Names/Exports.hs
@@ -6,7 +6,6 @@ module Language.Haskell.Names.Exports
import qualified Data.Map as Map
import qualified Data.Set as Set
-import Control.Applicative
import Control.Monad
import Control.Monad.Writer
import Data.Data
diff --git a/src/Language/Haskell/Names/GetBound.hs b/src/Language/Haskell/Names/GetBound.hs
index e2903c9..fe90eaf 100644
--- a/src/Language/Haskell/Names/GetBound.hs
+++ b/src/Language/Haskell/Names/GetBound.hs
@@ -62,7 +62,7 @@ instance (Data l) => GetBound (Decl l) l where
PRec _ qn fs -> qNameToName qn : concatMap getFieldBound fs where
getFieldBound (PFieldPat _ qn' _) = [qNameToName qn']
getFieldBound (PFieldPun _ qn') = [qNameToName qn']
- _ = []
+ getFieldBound (PFieldWildcard _) = []
_ -> []
ForImp _ _ _ _ n _ -> [n]
ForExp _ _ _ n _ -> [n]
diff --git a/src/Language/Haskell/Names/Imports.hs b/src/Language/Haskell/Names/Imports.hs
index df67c86..f7d9c83 100644
--- a/src/Language/Haskell/Names/Imports.hs
+++ b/src/Language/Haskell/Names/Imports.hs
@@ -9,7 +9,6 @@ module Language.Haskell.Names.Imports
import Data.Monoid
import Data.Maybe
import Data.Either
-import Control.Applicative
import Control.Monad.Writer
import Data.Map as Map (lookup)
diff --git a/src/Language/Haskell/Names/LocalSymbolTable.hs b/src/Language/Haskell/Names/LocalSymbolTable.hs
index 3a54fb2..c045224 100644
--- a/src/Language/Haskell/Names/LocalSymbolTable.hs
+++ b/src/Language/Haskell/Names/LocalSymbolTable.hs
@@ -8,7 +8,6 @@ module Language.Haskell.Names.LocalSymbolTable
) where
import qualified Data.Map as Map
-import Data.Monoid
import Language.Haskell.Exts
import Language.Haskell.Names.SyntaxUtils (dropAnn)
import Language.Haskell.Names.Types
diff --git a/src/Language/Haskell/Names/ModuleSymbols.hs b/src/Language/Haskell/Names/ModuleSymbols.hs
index dbc9b67..1edb770 100644
--- a/src/Language/Haskell/Names/ModuleSymbols.hs
+++ b/src/Language/Haskell/Names/ModuleSymbols.hs
@@ -136,7 +136,8 @@ typeOuterName t = case t of
TyApp _ typ _ -> typeOuterName typ
TyCon _ qname -> qNameToName qname
TyParen _ typ -> typeOuterName typ
- TyInfix _ _ qname _ -> qNameToName qname
+ TyInfix _ _ (PromotedName _ qname) _ -> qNameToName qname
+ TyInfix _ _ (UnpromotedName _ qname) _ -> qNameToName qname
TyKind _ typ _ -> typeOuterName typ
TyBang _ _ _ typ -> typeOuterName typ
_ -> error "illegal data family in data instance"
diff --git a/src/Language/Haskell/Names/Open/Base.hs b/src/Language/Haskell/Names/Open/Base.hs
index e5c9c67..3f05ff2 100644
--- a/src/Language/Haskell/Names/Open/Base.hs
+++ b/src/Language/Haskell/Names/Open/Base.hs
@@ -5,6 +5,7 @@
-- of how to use this module.
{-# LANGUAGE RankNTypes, FlexibleInstances, FlexibleContexts, UndecidableInstances, DefaultSignatures, TemplateHaskell, ScopedTypeVariables #-}
{-# LANGUAGE ImplicitParams, KindSignatures, TypeApplications #-}
+{-# LANGUAGE MonoLocalBinds #-}
module Language.Haskell.Names.Open.Base where
import qualified Language.Haskell.Names.GlobalSymbolTable as Global
@@ -12,7 +13,6 @@ import qualified Language.Haskell.Names.LocalSymbolTable as Local
import Language.Haskell.Names.GetBound
import Language.Haskell.Names.RecordWildcards
import Language.Haskell.Exts
-import Control.Applicative
import Control.Monad.Identity
import Data.List
import Data.Lens.Light
@@ -20,7 +20,6 @@ import Data.Generics.Traversable
import Data.Typeable
import Data.Monoid
import Data.Functor.Constant
-import GHC.Exts (Constraint)
-- | Describes how we should treat names in the current context
data NameContext
@@ -86,8 +85,6 @@ newtype Alg w = Alg
alg :: (?alg :: Alg w, Resolvable d) => d -> Scope -> w d
alg = runAlg ?alg
-data ConstraintProxy (p :: * -> Constraint) = ConstraintProxy
-
defaultRtraverse
:: (GTraversable Resolvable a, Applicative f, ?alg :: Alg f)
=> a -> Scope -> f a
diff --git a/src/Language/Haskell/Names/Open/Derived.hs b/src/Language/Haskell/Names/Open/Derived.hs
index fb510a8..97ce7e7 100644
--- a/src/Language/Haskell/Names/Open/Derived.hs
+++ b/src/Language/Haskell/Names/Open/Derived.hs
@@ -158,3 +158,7 @@ deriveGTraversable ''ResultSig
deriveGTraversable ''Unpackedness
deriveGTraversable ''EWildcard
+
+deriveGTraversable ''DerivStrategy
+
+deriveGTraversable ''MaybePromotedName
diff --git a/src/Language/Haskell/Names/Open/Instances.hs b/src/Language/Haskell/Names/Open/Instances.hs
index d812027..b9ec18b 100644
--- a/src/Language/Haskell/Names/Open/Instances.hs
+++ b/src/Language/Haskell/Names/Open/Instances.hs
@@ -1,8 +1,7 @@
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE FlexibleContexts, FlexibleInstances, TemplateHaskell,
MultiParamTypeClasses, UndecidableInstances, RankNTypes,
- OverlappingInstances #-}
-{-# LANGUAGE ImplicitParams #-}
+ ImplicitParams #-}
-- MonoLocalBinds extension prevents premature generalization, which
-- results in the "default" instance being picked.
@@ -18,9 +17,7 @@ import Language.Haskell.Names.RecordWildcards
import Language.Haskell.Exts
import Language.Haskell.Names.SyntaxUtils
import qualified Data.Data as D
-import Control.Applicative
import Data.Typeable
-import Data.Type.Equality
import Data.Lens.Light
import Data.List
import qualified Data.Traversable as T
diff --git a/src/Language/Haskell/Names/ScopeUtils.hs b/src/Language/Haskell/Names/ScopeUtils.hs
index 355115b..2e4e8f7 100644
--- a/src/Language/Haskell/Names/ScopeUtils.hs
+++ b/src/Language/Haskell/Names/ScopeUtils.hs
@@ -1,6 +1,5 @@
module Language.Haskell.Names.ScopeUtils where
-import Control.Applicative
import Control.Arrow
import Data.Monoid
import Language.Haskell.Names.Types
diff --git a/src/Language/Haskell/Names/SyntaxUtils.hs b/src/Language/Haskell/Names/SyntaxUtils.hs
index c6dbfe4..4b2867f 100644
--- a/src/Language/Haskell/Names/SyntaxUtils.hs
+++ b/src/Language/Haskell/Names/SyntaxUtils.hs
@@ -143,6 +143,8 @@ specialConToString (TupleCon _ Boxed n) = replicate (n-1) ','
specialConToString (TupleCon _ Unboxed n) = '#':replicate (n-1) ','
specialConToString (Cons _) = ":"
specialConToString (UnboxedSingleCon _) = "#"
+specialConToString (ExprHole _) = "_"
+
unCName :: CName l -> Name l
unCName (VarName _ n) = n
diff --git a/src/Language/Haskell/Names/Types.hs b/src/Language/Haskell/Names/Types.hs
index 03f418b..993d63e 100644
--- a/src/Language/Haskell/Names/Types.hs
+++ b/src/Language/Haskell/Names/Types.hs
@@ -6,7 +6,6 @@ import Language.Haskell.Exts
import Data.Typeable
import Data.Data
import Data.Foldable as F
-import Data.Traversable
import Data.Map (Map)
import Text.Printf
diff --git a/tests/run.hs b/tests/run.hs
index d7864ed..709d53b 100644
--- a/tests/run.hs
+++ b/tests/run.hs
@@ -1,8 +1,5 @@
-{-# LANGUAGE FlexibleInstances, OverlappingInstances, ImplicitParams,
- MultiParamTypeClasses, FlexibleContexts, GADTs,
- TypeApplications #-}
--- GHC 7.8 fails with the default context stack size of 20
-{-# OPTIONS_GHC -fcontext-stack=50 #-}
+{-# LANGUAGE FlexibleInstances, ImplicitParams, MultiParamTypeClasses,
+ FlexibleContexts, GADTs, TypeApplications #-}
import Test.Tasty hiding (defaultMain)
import Test.Tasty.Golden
import Test.Tasty.Golden.Manage
@@ -112,7 +109,7 @@ goldenTest path = goldenVsFileDiff
class TestAnn a where
getAnn :: a -> Maybe (String, Scoped SrcSpan)
-instance TestAnn a where
+instance {-# OVERLAPS #-} TestAnn a where
getAnn = const Nothing
instance TestAnn (QName (Scoped SrcSpan)) where