Commit 3ac2072b authored by Ryan Scott's avatar Ryan Scott
Browse files

Merge branch '2021-06-06' into 'master'

Add Agda patch

See merge request ghc/head.hackage!161
parents 21a678ac d469879e
......@@ -80,6 +80,7 @@ case $version in
9.3.*)
# package ticket
broken "doctest" 30
;;
*)
......@@ -100,6 +101,7 @@ extra_package microstache
extra_package singletons
extra_package servant
extra_package hgmp
extra_package Agda
# Build-tool packages
build_tool_package alex
......
diff --git a/src/agda-mode/Main.hs b/src/agda-mode/Main.hs
index 52ed988..40caba0 100644
--- a/src/agda-mode/Main.hs
+++ b/src/agda-mode/Main.hs
@@ -7,7 +7,7 @@ module Main (main) where
import Control.Exception
import Control.Monad
import Data.Char
-import Data.List
+import Data.List (intercalate, isInfixOf)
import Data.Maybe
import Data.Version
import Numeric
diff --git a/src/full/Agda/Compiler/Common.hs b/src/full/Agda/Compiler/Common.hs
index 6391133..5448eed 100644
--- a/src/full/Agda/Compiler/Common.hs
+++ b/src/full/Agda/Compiler/Common.hs
@@ -2,7 +2,7 @@
module Agda.Compiler.Common where
-import Data.List as List
+import qualified Data.List as List
import qualified Data.Map as Map
import Data.Set (Set)
import qualified Data.Set as Set
@@ -170,8 +170,8 @@ topLevelModuleName m = do
visited <- List.map (iModuleName . miInterface) . Map.elems <$>
getVisitedModules
-- find the module with the longest matching prefix to m
- let ms = sortBy (compare `on` (length . mnameToList)) $
- List.filter (\ m' -> mnameToList m' `isPrefixOf` mnameToList m) visited
+ let ms = List.sortBy (compare `on` (length . mnameToList)) $
+ List.filter (\ m' -> mnameToList m' `List.isPrefixOf` mnameToList m) visited
case ms of
(m' : _) -> return m'
-- if we did not get anything, it may be because m is a section
diff --git a/src/full/Agda/Syntax/Abstract/Name.hs b/src/full/Agda/Syntax/Abstract/Name.hs
index 0b2d96c..460be4c 100644
--- a/src/full/Agda/Syntax/Abstract/Name.hs
+++ b/src/full/Agda/Syntax/Abstract/Name.hs
@@ -13,7 +13,7 @@ import Data.Data (Data)
import Data.Foldable (Foldable)
import Data.Function
import Data.Hashable (Hashable(..))
-import Data.List
+import Data.List (isPrefixOf)
import Data.List.NonEmpty (NonEmpty(..))
import qualified Data.List.NonEmpty as NonEmpty
import Data.Maybe
diff --git a/src/full/Agda/Syntax/Abstract/PatternSynonyms.hs b/src/full/Agda/Syntax/Abstract/PatternSynonyms.hs
index 9d17f43..9d8e7ad 100644
--- a/src/full/Agda/Syntax/Abstract/PatternSynonyms.hs
+++ b/src/full/Agda/Syntax/Abstract/PatternSynonyms.hs
@@ -14,7 +14,7 @@ import Control.Monad.Writer hiding (forM)
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Traversable (forM)
-import Data.List
+import Data.List ((\\), union)
import Data.List.NonEmpty (NonEmpty(..))
import qualified Data.List.NonEmpty as NonEmpty
import Data.Void
diff --git a/src/full/Agda/Syntax/Concrete.hs b/src/full/Agda/Syntax/Concrete.hs
index ee550c9..83ca056 100644
--- a/src/full/Agda/Syntax/Concrete.hs
+++ b/src/full/Agda/Syntax/Concrete.hs
@@ -60,7 +60,7 @@ import Prelude hiding (null)
import Control.DeepSeq
import Data.Foldable (Foldable)
import Data.Traversable (Traversable, forM, mapM)
-import Data.List hiding (null)
+import Data.List (genericLength)
import Data.Set (Set)
import Data.Data (Data)
diff --git a/src/full/Agda/Syntax/Parser/LookAhead.hs b/src/full/Agda/Syntax/Parser/LookAhead.hs
index 95c2c24..bd989fc 100644
--- a/src/full/Agda/Syntax/Parser/LookAhead.hs
+++ b/src/full/Agda/Syntax/Parser/LookAhead.hs
@@ -43,7 +43,7 @@ newtype ErrorFunction =
-- | Throw an error message according to the supplied method.
lookAheadError :: String -> LookAhead a
-lookAheadError s = ($ s) =<< do LookAhead $ asks throwError
+lookAheadError s = ($ s) =<< do LookAhead $ asks $ \x -> throwError x
{--------------------------------------------------------------------------
Operations
diff --git a/src/full/Agda/Syntax/Parser/Parser.y b/src/full/Agda/Syntax/Parser/Parser.y
index 3c565c7..26a2347 100644
--- a/src/full/Agda/Syntax/Parser/Parser.y
+++ b/src/full/Agda/Syntax/Parser/Parser.y
@@ -29,7 +29,7 @@ import Control.Monad
import Data.Bifunctor (first)
import Data.Char
-import Data.List
+import Data.List (genericReplicate, group, intercalate, intersperse, sort)
import Data.Maybe
import Data.Monoid
import qualified Data.Traversable as T
@@ -941,7 +941,7 @@ LamClauses
| NonAbsurdLamClause { [$1] }
-- | {- empty -} { [] }
--- Parses all extended lambda clauses including a single absurd clause. For λ
+-- Parses all extended lambda clauses including a single absurd clause. For \x03BB
-- where this is not taken care of in AbsurdLambda
LamWhereClauses :: { [LamClause] }
LamWhereClauses
@@ -2062,7 +2062,7 @@ exprToAssignment (RawApp r es)
<*> pure (getRange arr)
<*> pure (RawApp (getRange es2) es2))
where
- isLeftArrow (Ident (QName (Name _ _ [Id arr]))) = arr `elem` ["<-", "←"]
+ isLeftArrow (Ident (QName (Name _ _ [Id arr]))) = arr `elem` ["<-", "\x2190"]
isLeftArrow _ = False
exprToAssignment _ = pure Nothing
diff --git a/src/full/Agda/Syntax/Position.hs b/src/full/Agda/Syntax/Position.hs
index 0f492d5..a338b60 100644
--- a/src/full/Agda/Syntax/Position.hs
+++ b/src/full/Agda/Syntax/Position.hs
@@ -73,7 +73,7 @@ import Data.Foldable (Foldable)
import qualified Data.Foldable as Fold
import Data.Function
import Data.Int
-import Data.List hiding (null)
+import Data.List (foldl', sort)
import Data.List.NonEmpty (NonEmpty(..))
import qualified Data.List.NonEmpty as NonEmpty
import Data.Map (Map)
diff --git a/src/full/Agda/Syntax/Translation/AbstractToConcrete.hs b/src/full/Agda/Syntax/Translation/AbstractToConcrete.hs
index 6892009..af58df2 100644
--- a/src/full/Agda/Syntax/Translation/AbstractToConcrete.hs
+++ b/src/full/Agda/Syntax/Translation/AbstractToConcrete.hs
@@ -217,7 +217,7 @@ instance Applicative AbsToCon where
f <*> m = AbsToCon $ unAbsToCon f <*> unAbsToCon m
instance Monad AbsToCon where
- m >>= f = AbsToCon $ unAbsToCon m >>= unAbsToCon . f
+ m >>= f = AbsToCon $ unAbsToCon m >>= (\x -> unAbsToCon (f x))
#if __GLASGOW_HASKELL__ < 808
fail = Fail.fail
#endif
@@ -238,7 +238,7 @@ instance ReadTCState AbsToCon where
locallyTCState l f m = AbsToCon $ locallyTCState l f $ unAbsToCon m
instance MonadStConcreteNames AbsToCon where
- runStConcreteNames m = AbsToCon $ runStConcreteNames $ StateT $ unAbsToCon . runStateT m
+ runStConcreteNames m = AbsToCon $ runStConcreteNames $ StateT $ \x -> unAbsToCon (runStateT m x)
instance HasOptions AbsToCon where
pragmaOptions = AbsToCon pragmaOptions
diff --git a/src/full/Agda/TypeChecking/Generalize.hs b/src/full/Agda/TypeChecking/Generalize.hs
index f6513da..cca91c5 100644
--- a/src/full/Agda/TypeChecking/Generalize.hs
+++ b/src/full/Agda/TypeChecking/Generalize.hs
@@ -539,7 +539,7 @@ pruneUnsolvedMetas genRecName genRecCon genTel genRecFields interactionPoints is
newMetaFromOld mv ρ mA = setCurrentRange mv $
case mA of
Nothing -> do
- s @ (MetaS y _) <- newSortMeta
+ s@(MetaS y _) <- newSortMeta
return (y, Sort s)
Just _A -> do
let _Aρ = applySubst ρ _A
diff --git a/src/full/Agda/VersionCommit.hs b/src/full/Agda/VersionCommit.hs
index 91984cb..ef01162 100644
--- a/src/full/Agda/VersionCommit.hs
+++ b/src/full/Agda/VersionCommit.hs
@@ -20,8 +20,8 @@ commitInfo
hash = $(gitHash)
-- | Check if any tracked files have uncommitted changes
- dirty | $(gitDirtyTracked) = "-dirty"
- | otherwise = ""
+ dirty | $(gitDirtyTracked) == True = "-dirty"
+ | otherwise = ""
-- | Abbreviate a commit hash while keeping it unambiguous
abbrev = take 7
diff --git a/active.cabal b/active.cabal
index 125c007..43eb504 100644
--- a/active.cabal
+++ b/active.cabal
@@ -1,5 +1,6 @@
name: active
version: 0.2.0.14
+x-revision: 1
synopsis: Abstractions for animation
description: "Active" abstraction for animated things with finite start and end times.
license: BSD3
@@ -24,8 +25,8 @@ library
vector >= 0.10,
semigroups >= 0.1 && < 0.20,
semigroupoids >= 1.2 && < 5.4,
- lens >= 4.0 && < 4.19,
- linear >= 1.14 && < 1.21
+ lens >= 4.0 && < 4.20,
+ linear >= 1.14 && < 1.22
hs-source-dirs: src
default-language: Haskell2010
@@ -36,8 +37,8 @@ test-suite active-tests
vector >= 0.10,
semigroups >= 0.1 && < 0.20,
semigroupoids >= 1.2 && < 5.4,
- lens >= 4.0 && < 4.19,
- linear >= 1.14 && < 1.21,
+ lens >= 4.0 && < 4.20,
+ linear >= 1.14 && < 1.22,
QuickCheck >= 2.9 && < 2.14
other-modules: Data.Active
hs-source-dirs: src, test
diff --git a/src/Data/Active.hs b/src/Data/Active.hs
index c5e1b3f..4db447b 100644
--- a/src/Data/Active.hs
+++ b/src/Data/Active.hs
@@ -162,31 +162,6 @@ import Linear.Affine
-- Time
------------------------------------------------------------
--- | An abstract type for representing /points in time/. Note that
--- literal numeric values may be used as @Time@s, thanks to the the
--- 'Num' and 'Fractional' instances.
-newtype Time n = Time { unTime :: n }
- deriving (Eq, Ord, Show, Read, Enum, Num, Fractional, Real, RealFrac, Functor)
-
-makeWrapped ''Time
-
--- | A convenient wrapper function to convert a numeric value into a time.
-toTime :: n -> Time n
-toTime = Time
-
--- | A convenient unwrapper function to turn a time into a numeric value.
-fromTime :: Time n -> n
-fromTime = unTime
-
-instance Affine Time where
- type Diff Time = Duration
- (Time t1) .-. (Time t2) = Duration (t1 - t2)
- (Time t) .+^ (Duration d) = Time (t + d)
-
--- instance Deadline Time a where
--- -- choose tm deadline (if before / at deadline) (if after deadline)
--- choose t1 t2 a b = if t1 <= t2 then a else b
-
-- | An abstract type representing /elapsed time/ between two points
-- in time. Note that durations can be negative. Literal numeric
-- values may be used as @Duration@s thanks to the 'Num' and
@@ -218,6 +193,31 @@ instance Num n => Monoid (Duration n) where
mappend = (<>)
mempty = 0
+-- | An abstract type for representing /points in time/. Note that
+-- literal numeric values may be used as @Time@s, thanks to the the
+-- 'Num' and 'Fractional' instances.
+newtype Time n = Time { unTime :: n }
+ deriving (Eq, Ord, Show, Read, Enum, Num, Fractional, Real, RealFrac, Functor)
+
+makeWrapped ''Time
+
+-- | A convenient wrapper function to convert a numeric value into a time.
+toTime :: n -> Time n
+toTime = Time
+
+-- | A convenient unwrapper function to turn a time into a numeric value.
+fromTime :: Time n -> n
+fromTime = unTime
+
+instance Affine Time where
+ type Diff Time = Duration
+ (Time t1) .-. (Time t2) = Duration (t1 - t2)
+ (Time t) .+^ (Duration d) = Time (t + d)
+
+-- instance Deadline Time a where
+-- -- choose tm deadline (if before / at deadline) (if after deadline)
+-- choose t1 t2 a b = if t1 <= t2 then a else b
+
-- | An @Era@ is a concrete span of time, that is, a pair of times
-- representing the start and end of the era. @Era@s form a
-- semigroup: the combination of two @Era@s is the smallest @Era@
diff --git a/diagrams-lib.cabal b/diagrams-lib.cabal
index 0ee8824..953f2e2 100644
--- a/diagrams-lib.cabal
+++ b/diagrams-lib.cabal
@@ -1,5 +1,6 @@
Name: diagrams-lib
Version: 1.4.3
+x-revision: 1
Synopsis: Embedded domain-specific language for declarative graphics
Description: Diagrams is a flexible, extensible EDSL for creating
graphics of many types. Graphics can be created
@@ -104,22 +105,22 @@ Library
containers >= 0.3 && < 0.7,
array >= 0.3 && < 0.6,
semigroups >= 0.3.4 && < 0.20,
- monoid-extras >= 0.3 && < 0.6,
+ monoid-extras >= 0.3 && < 0.7,
dual-tree >= 0.2 && < 0.3,
- diagrams-core >= 1.4 && < 1.5,
+ diagrams-core >= 1.4 && < 1.6,
diagrams-solve >= 0.1 && < 0.2,
active >= 0.2 && < 0.3,
colour >= 2.3.2 && < 2.4,
data-default-class < 0.2,
fingertree >= 0.1 && < 0.2,
intervals >= 0.7 && < 0.10,
- lens >= 4.6 && < 4.19,
+ lens >= 4.6 && < 4.20,
tagged >= 0.7,
optparse-applicative >= 0.11 && < 0.16,
filepath,
JuicyPixels >= 3.3.4 && < 3.4,
hashable >= 1.1 && < 1.4,
- linear >= 1.20.1 && < 1.21,
+ linear >= 1.20.1 && < 1.22,
adjunctions >= 4.0 && < 5.0,
distributive >=0.2.2 && < 1.0,
process >= 1.1 && < 1.7,
diff --git a/src/Diagrams/BoundingBox.hs b/src/Diagrams/BoundingBox.hs
index a4dce3b..e082d68 100644
--- a/src/Diagrams/BoundingBox.hs
+++ b/src/Diagrams/BoundingBox.hs
@@ -80,7 +80,7 @@ type instance V (NonEmptyBoundingBox v n) = v
type instance N (NonEmptyBoundingBox v n) = n
fromNonEmpty :: NonEmptyBoundingBox v n -> BoundingBox v n
-fromNonEmpty = BoundingBox . Option . Just
+fromNonEmpty = BoundingBox . Just
fromMaybeEmpty :: Maybe (NonEmptyBoundingBox v n) -> BoundingBox v n
fromMaybeEmpty = maybe emptyBox fromNonEmpty
@@ -95,7 +95,7 @@ instance (Additive v, Ord n) => Semigroup (NonEmptyBoundingBox v n) where
-- | A bounding box is an axis-aligned region determined by two points
-- indicating its \"lower\" and \"upper\" corners. It can also represent
-- an empty bounding box - the points are wrapped in @Maybe@.
-newtype BoundingBox v n = BoundingBox (Option (NonEmptyBoundingBox v n))
+newtype BoundingBox v n = BoundingBox (Maybe (NonEmptyBoundingBox v n))
deriving (Eq, Functor)
deriving instance (Additive v, Ord n) => Semigroup (BoundingBox v n)
@@ -166,7 +166,7 @@ instance Read (v n) => Read (BoundingBox v n) where
-- | An empty bounding box. This is the same thing as @mempty@, but it doesn't
-- require the same type constraints that the @Monoid@ instance does.
emptyBox :: BoundingBox v n
-emptyBox = BoundingBox $ Option Nothing
+emptyBox = BoundingBox Nothing
-- | Create a bounding box from a point that is component-wise @(<=)@ than the
-- other. If this is not the case, then @mempty@ is returned.
@@ -196,17 +196,17 @@ boundingBox a = fromMaybeEmpty $ do
-- | Queries whether the BoundingBox is empty.
isEmptyBox :: BoundingBox v n -> Bool
-isEmptyBox (BoundingBox (Option Nothing)) = True
-isEmptyBox _ = False
+isEmptyBox (BoundingBox Nothing) = True
+isEmptyBox _ = False
-- | Gets the lower and upper corners that define the bounding box.
getCorners :: BoundingBox v n -> Maybe (Point v n, Point v n)
-getCorners (BoundingBox p) = nonEmptyCorners <$> getOption p
+getCorners (BoundingBox p) = nonEmptyCorners <$> p
-- | Computes all of the corners of the bounding box.
getAllCorners :: (Additive v, Traversable v) => BoundingBox v n -> [Point v n]
-getAllCorners (BoundingBox (Option Nothing)) = []
-getAllCorners (BoundingBox (Option (Just (NonEmptyBoundingBox (l, u)))))
+getAllCorners (BoundingBox Nothing) = []
+getAllCorners (BoundingBox (Just (NonEmptyBoundingBox (l, u))))
= T.sequence (liftI2 (\a b -> [a,b]) l u)
-- | Get the size of the bounding box - the vector from the (component-wise)
diff --git a/src/Diagrams/Combinators.hs b/src/Diagrams/Combinators.hs
index 82387b3..6e41fd1 100644
--- a/src/Diagrams/Combinators.hs
+++ b/src/Diagrams/Combinators.hs
@@ -165,7 +165,7 @@ deformEnvelope
=> n -> v n -> QDiagram b v n m -> QDiagram b v n m
deformEnvelope s v = over (envelope . _Wrapping Envelope) deformE
where
- deformE = Option . fmap deformE' . getOption
+ deformE = fmap deformE'
deformE' env v'
| dp > 0 = Max $ getMax (env v') + (dp * s) / quadrance v'
| otherwise = env v'
diff --git a/src/Diagrams/CubicSpline/Internal.hs b/src/Diagrams/CubicSpline/Internal.hs
index 1087d4e..08c09f6 100644
--- a/src/Diagrams/CubicSpline/Internal.hs
+++ b/src/Diagrams/CubicSpline/Internal.hs
@@ -21,7 +21,7 @@ module Diagrams.CubicSpline.Internal
import Diagrams.Solve.Tridiagonal
-import Data.List
+import Data.List (zip4)
-- | Use the tri-diagonal solver with the appropriate parameters for an open cubic spline.
solveCubicSplineDerivatives :: Fractional a => [a] -> [a]
diff --git a/src/Diagrams/Trail.hs b/src/Diagrams/Trail.hs
index d5b152a..c65fa96 100644
--- a/src/Diagrams/Trail.hs
+++ b/src/Diagrams/Trail.hs
@@ -311,7 +311,7 @@ instance (Metric v, OrderedField n, Real n)
-- (along with a default value) to a function on an entire trail.
trailMeasure :: ( SegMeasure v n :>: m, FT.Measured (SegMeasure v n) t )
=> a -> (m -> a) -> t -> a
-trailMeasure d f = option d f . get . FT.measure
+trailMeasure d f = maybe d f . get . FT.measure
-- | Compute the number of segments of anything measured by
-- 'SegMeasure' (/e.g./ @SegMeasure@ itself, @Segment@, @SegTree@,
diff --git a/src/Diagrams/Transform.hs b/src/Diagrams/Transform.hs
index 1f29243..36dbb69 100644
--- a/src/Diagrams/Transform.hs
+++ b/src/Diagrams/Transform.hs
@@ -125,4 +125,4 @@ movedFrom p = iso (moveOriginTo (negated p)) (moveOriginTo p)
-- @
translated :: (InSpace v n a, SameSpace a b, Transformable a, Transformable b)
=> v n -> Iso a b a b
-translated = transformed . translation
+translated v = transformed $ translation v
diff --git a/src/Diagrams/Transform/Matrix.hs b/src/Diagrams/Transform/Matrix.hs
index 4bba99b..8aba3e2 100644
--- a/src/Diagrams/Transform/Matrix.hs
+++ b/src/Diagrams/Transform/Matrix.hs
@@ -30,7 +30,7 @@ import Linear.Vector
-- | Build a matrix from a 'Transformation', ignoring the translation.
mkMat :: (HasBasis v, Num n) => Transformation v n -> v (v n)
-mkMat t = distribute . tabulate $ apply t . unit . el
+mkMat t = distribute . tabulate $ \x -> apply t $ unit $ el x
-- | Build a 3D transformation matrix in homogeneous coordinates from
-- a 'Transformation V3'.
diff --git a/src/Diagrams/TwoD/Arrow.hs b/src/Diagrams/TwoD/Arrow.hs
index 3465b31..b40d38b 100644
--- a/src/Diagrams/TwoD/Arrow.hs
+++ b/src/Diagrams/TwoD/Arrow.hs
@@ -401,7 +401,7 @@ arrow' opts len = mkQD' (DelayedLeaf delayedArrow)
-- uniformly as the transformation applied to the entire arrow.
-- See https://github.com/diagrams/diagrams-lib/issues/112.
delayedArrow da g n =
- let (trans, globalSty) = option mempty untangle . fst $ da
+ let (trans, globalSty) = maybe mempty untangle . fst $ da
in dArrow globalSty trans len g n
-- Build an arrow and set its endpoints to the image under tr of origin and (len,0).
diff --git a/src/Diagrams/TwoD/Transform.hs b/src/Diagrams/TwoD/Transform.hs
index c328202..1a26b5d 100644
--- a/src/Diagrams/TwoD/Transform.hs
+++ b/src/Diagrams/TwoD/Transform.hs
@@ -98,7 +98,7 @@ rotateBy = transform . rotation . review turn
-- @
rotated :: (InSpace V2 n a, Floating n, SameSpace a b, Transformable a, Transformable b)
=> Angle n -> Iso a b a b
-rotated = transformed . rotation
+rotated a = transformed $ rotation a
-- | @rotationAbout p@ is a rotation about the point @p@ (instead of
-- around the local origin).
diff --git a/src/Diagrams/Util.hs b/src/Diagrams/Util.hs
index 5207c72..12f4e81 100644
--- a/src/Diagrams/Util.hs
+++ b/src/Diagrams/Util.hs
@@ -40,7 +40,7 @@ import Control.Monad.Catch
import Control.Monad.Trans
import Control.Monad.Trans.Maybe
import Data.Default.Class
-import Data.List
+import Data.List (find, isSuffixOf)
import Data.List.Lens
import Data.Maybe
import Data.Monoid
diff --git a/diagrams-lib.cabal b/diagrams-lib.cabal
index f6e283a..cf3f44c 100644
--- a/diagrams-lib.cabal
+++ b/diagrams-lib.cabal
@@ -1,5 +1,6 @@
Name: diagrams-lib
Version: 1.4.4
+x-revision: 1
Synopsis: Embedded domain-specific language for declarative graphics
Description: Diagrams is a flexible, extensible EDSL for creating
graphics of many types. Graphics can be created
@@ -132,7 +133,7 @@ Library
profunctors >= 5.0 && < 6.0,
exceptions >= 0.6 && < 1.0,
cereal >=0.4.1.1 && <0.6,
- bytestring >=0.9 && <0.11
+ bytestring >=0.9 && <0.12
if impl(ghc < 7.6)
Build-depends: ghc-prim
if !impl(ghc >= 8.0)
@@ -161,7 +162,7 @@ test-suite tests
, Instances
hs-source-dirs: test
build-depends: base,
- tasty >= 0.10 && < 1.3,
+ tasty >= 0.10 && < 1.5,
tasty-hunit >= 0.9.2 && < 0.11,
tasty-quickcheck >= 0.8 && < 0.11,
QuickCheck >= 2.7,
diff --git a/src/Diagrams/CubicSpline/Internal.hs b/src/Diagrams/CubicSpline/Internal.hs
index 1087d4e..08c09f6 100644
--- a/src/Diagrams/CubicSpline/Internal.hs
+++ b/src/Diagrams/CubicSpline/Internal.hs
@@ -21,7 +21,7 @@ module Diagrams.CubicSpline.Internal
import Diagrams.Solve.Tridiagonal
-import Data.List
+import Data.List (zip4)
-- | Use the tri-diagonal solver with the appropriate parameters for an open cubic spline.
solveCubicSplineDerivatives :: Fractional a => [a] -> [a]
diff --git a/src/Diagrams/Util.hs b/src/Diagrams/Util.hs
index 5207c72..12f4e81 100644
--- a/src/Diagrams/Util.hs
+++ b/src/Diagrams/Util.hs
@@ -40,7 +40,7 @@ import Control.Monad.Catch
import Control.Monad.Trans
import Control.Monad.Trans.Maybe
import Data.Default.Class
-import Data.List
+import Data.List (find, isSuffixOf)
import Data.List.Lens
import Data.Maybe
import Data.Monoid
diff --git a/Text/EditDistance/Bits.hs b/Text/EditDistance/Bits.hs
index 0f76d23..a60e13d 100644
--- a/Text/EditDistance/Bits.hs
+++ b/Text/EditDistance/Bits.hs
@@ -7,7 +7,7 @@ module Text.EditDistance.Bits (
import Data.Bits
import Data.Char
import Data.Word
-import Data.List
+import Data.List (foldl')
import qualified Data.IntMap as IM
--import Debug.Trace
diff --git a/src/Data/Label/Derive.hs b/src/Data/Label/Derive.hs
index 70500d8..6019a7a 100644
--- a/src/Data/Label/Derive.hs
+++ b/src/Data/Label/Derive.hs
@@ -225,12 +225,12 @@ data Label
= LabelDecl
Name -- The label name.
DecQ -- An INLINE pragma for the label.
- [TyVarBndr] -- The type variables requiring forall.
+ [TyVarBndrSpec] -- The type variables requiring forall.
CxtQ -- The context.
TypeQ -- The type.
ExpQ -- The label body.
| LabelExpr
- [TyVarBndr] -- The type variables requiring forall.
+ [TyVarBndrSpec] -- The type variables requiring forall.
CxtQ -- The context.
TypeQ -- The type.
ExpQ -- The label body.
@@ -254,7 +254,7 @@ data Typing = Typing
Bool -- Monomorphic type or polymorphic.
TypeQ -- The lens input type.
TypeQ -- The lens output type.
- [TyVarBndr] -- All used type variables.
+ [TyVarBndrUnit] -- All used type variables.
-------------------------------------------------------------------------------
@@ -296,7 +296,7 @@ generateLabels mk concrete failing dec =
forM fields $ generateLabel failing concrete name vars cons
-groupFields :: (String -> String) -> [TyVarBndr] -> [Con] -> [Field ([Context], Subst)]
+groupFields :: (String -> String) -> [TyVarBndrUnit] -> [Con] -> [Field ([Context], Subst)]
groupFields mk vs
= map (rename mk)
. concatMap (\fs -> let vals = concat (toList <$> fs)
@@ -312,7 +312,7 @@ groupFields mk vs
rename f (Field n a b c) =
Field (mkName . f . nameBase <$> n) a b c
-constructorFields :: [TyVarBndr] -> Con -> [Field (Context, Subst)]
+constructorFields :: [TyVarBndrUnit] -> Con -> [Field (Context, Subst)]
constructorFields vs con =
case con of
@@ -350,7 +350,7 @@ constructorFields vs con =
where fsTys = map (typeVariables . trd) (delete f fs)
mono = any (\x -> any (elem x) fsTys) (typeVariables ty)
-mkSubst :: [TyVarBndr] -> Type -> Subst
+mkSubst :: [TyVarBndr_ spec] -> Type -> Subst
mkSubst vars t = go (reverse vars) t
where
go [] _ = []
@@ -402,7 +402,7 @@ generateLabel
:: Bool
-> Bool
-> Name
- -> [TyVarBndr]
+ -> [TyVarBndrUnit]
-> [Con]
-> Field ([Context], Subst)
-> Q Label
@@ -542,13 +542,13 @@ freshNames = map pure ['a'..'z'] ++ map (('a':) . show) [0 :: Integer ..]
-------------------------------------------------------------------------------
-computeTypes :: Bool -> Type -> Name -> [TyVarBndr] -> Subst -> Q Typing
+computeTypes :: Bool -> Type -> Name -> [TyVarBndrUnit] -> Subst -> Q Typing
</