Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ghc/head.hackage
  • RyanGlScott/head.hackage
  • vaibhavsagar/head.hackage
  • phadej/head.hackage
  • jessoune29/head.hackage
  • alanz/head.hackage
  • clint/head.hackage
  • osa1/head.hackage
  • supersven/head.hackage
  • fendor/head.hackage
  • hsyl20/head.hackage
  • adinapoli/head.hackage
  • alexbiehl/head.hackage
  • mimi.vx/head.hackage
  • Kleidukos/head.hackage
  • wz1000/head.hackage
  • alinab/head.hackage
  • teo/head.hackage
  • duog/head.hackage
  • sheaf/head.hackage
  • expipiplus1/head.hackage
  • drsooch/head.hackage
  • tobias/head.hackage
  • brandonchinn178/head.hackage
  • mpickering/hooks-setup-testing
  • Mikolaj/head.hackage
  • RandomMoonwalker/head.hackage
  • facundominguez/head.hackage
  • trac-fizzixnerd/head.hackage
  • neil.mayhew/head.hackage
  • jappeace/head.hackage
31 results
Show changes
Showing
with 2580 additions and 1947 deletions
diff --git a/Agda.cabal b/Agda.cabal
index 9a0863c..cc2f024 100644
--- a/Agda.cabal
+++ b/Agda.cabal
@@ -1,7 +1,7 @@
cabal-version: 2.4
name: Agda
version: 2.7.0.1
-build-type: Custom
+build-type: Simple
license: MIT
license-file: LICENSE
copyright: (c) 2005-2024 The Agda Team.
diff --git a/Setup.hs b/Setup.hs
deleted file mode 100644
index 7064a95..0000000
--- a/Setup.hs
+++ /dev/null
@@ -1,235 +0,0 @@
-{-# LANGUAGE BlockArguments #-}
-{-# LANGUAGE CPP #-}
-{-# LANGUAGE LambdaCase #-}
-{-# LANGUAGE ScopedTypeVariables #-}
-
-import Data.Functor ( (<&>) )
-import Data.List ( intercalate )
-import Data.Maybe ( catMaybes )
-
-import Distribution.Simple
-import Distribution.Simple.LocalBuildInfo
-import Distribution.Simple.Setup
-import Distribution.Simple.BuildPaths (exeExtension)
-import Distribution.PackageDescription
-import Distribution.System ( buildPlatform )
-
-import System.FilePath
-import System.Directory (doesFileExist, makeAbsolute, removeFile)
-import System.Environment (getEnvironment)
-import System.Process
-import System.Exit
-import System.IO
-import System.IO.Error (isDoesNotExistError)
-
-import Control.Monad
-import Control.Exception
-
-main :: IO ()
-main = defaultMainWithHooks userhooks
-
-userhooks :: UserHooks
-userhooks = simpleUserHooks
- { copyHook = copyHook'
- , instHook = instHook'
- }
-
--- Install and copy hooks are default, but amended with .agdai files in data-files.
-instHook' :: PackageDescription -> LocalBuildInfo -> UserHooks -> InstallFlags -> IO ()
-instHook' pd lbi hooks flags = instHook simpleUserHooks pd' lbi hooks flags where
- pd' = pd { dataFiles = concatMap (expandAgdaExt pd) $ dataFiles pd }
-
--- Andreas, 2020-04-25, issue #4569: defer 'generateInterface' until after
--- the library has been copied to a destination where it can be found.
--- @cabal build@ will likely no longer produce the .agdai files, but @cabal install@ does.
-copyHook' :: PackageDescription -> LocalBuildInfo -> UserHooks -> CopyFlags -> IO ()
-copyHook' pd lbi hooks flags = do
- -- Copy library and executable etc.
- copyHook simpleUserHooks pd lbi hooks flags
- if wantInterfaces flags && not (skipInterfaces lbi) then do
- -- Generate .agdai files.
- success <- generateInterfaces pd lbi
- -- Copy again, now including the .agdai files.
- when success $ copyHook simpleUserHooks pd' lbi hooks flags
- else
- putStrLn "Skipping generation of Agda core library interface files"
- where
- pd' = pd
- { dataFiles = concatMap (expandAgdaExt pd) $ dataFiles pd
- -- Andreas, 2020-04-25, issue #4569:
- -- I tried clearing some fields to avoid copying again.
- -- However, cabal does not like me messing with the PackageDescription.
- -- Clearing @library@ or @executables@ leads to internal errors.
- -- Thus, we just copy things again. Not a terrible problem.
- -- , library = Nothing
- -- , executables = []
- -- , subLibraries = []
- -- , foreignLibs = []
- -- , testSuites = []
- -- , benchmarks = []
- -- , extraSrcFiles = []
- -- , extraTmpFiles = []
- -- , extraDocFiles = []
- }
-
--- We only want to write interfaces if installing the executable.
--- If we're installing *just* the library, the interface files are not needed
--- and, most importantly, the executable will not be available to be run (cabal#10235)
-wantInterfaces :: CopyFlags -> Bool
-wantInterfaces _flags = do
-#if MIN_VERSION_Cabal(3,11,0)
- any isAgdaExe (copyArgs _flags)
- where
- isAgdaExe "exe:agda" = True
- isAgdaExe _ = False
-#else
- True
-#endif
-
--- Used to add .agdai files to data-files
-expandAgdaExt :: PackageDescription -> FilePath -> [FilePath]
-expandAgdaExt pd = \ fp ->
- -- N.B. using lambda here so that @expandAgdaExt pd@ can be partially evaluated.
- if takeExtension fp == ".agda" then [ fp, iFile fp ] else [ fp ]
- where
- iFile = toIFile pd
-
-version :: PackageDescription -> String
-version = intercalate "." . map show . versionNumbers . pkgVersion . package
-
--- | This returns @lib/prim@.
---
-projectRoot :: PackageDescription -> FilePath
-projectRoot pd = takeDirectory agdaLibFile
- where
- [agdaLibFile] = filter ((".agda-lib" ==) . takeExtension) $ dataFiles pd
-
--- | Turns e.g. @lib/prim/Agda/Primitive.agda@
--- into @lib/prim/_build/2.7.0/agda/Agda/Primitive.agdai@.
---
--- An absolute path will be returned unchanged.
-toIFile ::
- PackageDescription
- -> FilePath -- ^ Should be a relative path.
- -> FilePath -- ^ Then this is also a relative path.
-toIFile pd = (buildDir </>) . fileName
- where
- root = projectRoot pd
- -- e.g. root = "lib/prim"
- buildDir = root </> "_build" </> version pd </> "agda"
- -- e.g. buildDir = "lib/prim/_build/2.7.0/agda"
- fileName file = makeRelative root $ replaceExtension file ".agdai"
- -- e.g. fileName "lib/prim/Agda/Primitive.agda" = "Agda/Primitive.agdai"
-
--- Andreas, 2019-10-21, issue #4151:
--- skip the generation of interface files with program suffix "-quicker"
-skipInterfaces :: LocalBuildInfo -> Bool
-skipInterfaces lbi = fromPathTemplate (progSuffix lbi) == "-quicker"
-
--- | Returns 'True' if call to Agda executes without error.
---
-generateInterfaces :: PackageDescription -> LocalBuildInfo -> IO Bool
-generateInterfaces pd lbi = do
-
- putStrLn "Generating Agda core library interface files..."
-
- -- for debugging, these are examples how you can inspect the flags...
- -- print $ flagAssignment lbi
- -- print $ fromPathTemplate $ progSuffix lbi
-
- -- then...
- let bdir = buildDir lbi
- agda = bdir </> "agda" </> "agda" <.> agdaExeExtension
-
- -- We should be in the current directory root of the cabal package
- -- and data-files reside in src/data relative to this.
- --
- ddir <- makeAbsolute $ "src" </> "data"
-
- -- The Agda.Primitive* and Agda.Builtin* modules.
- let builtins = filter ((== ".agda") . takeExtension) (dataFiles pd)
-
- -- The absolute filenames of their interfaces.
- let interfaces = map ((ddir </>) . toIFile pd) builtins
-
- -- Remove all existing .agdai files.
- forM_ interfaces $ \ fp -> removeFile fp `catch` \ e ->
- unless (isDoesNotExistError e) $ throwIO e
-
- -- Type-check all builtin modules (in a single Agda session to take
- -- advantage of caching).
- let agdaDirEnvVar = "Agda_datadir"
- let agdaArgs =
- [ "--interaction"
- , "--interaction-exit-on-error"
- , "-Werror"
- , "-v0"
- ]
- let loadBuiltinCmds = concat
- [ [ cmd ("Cmd_load " ++ f ++ " []")
- , cmd "Cmd_no_metas"
- -- Fail if any meta-variable is unsolved.
- ]
- | b <- builtins
- , let f = show (ddir </> b)
- cmd c = "IOTCM " ++ f ++ " None Indirect (" ++ c ++ ")"
- ]
- let callLines = concat
- [ [ unwords $ concat
- [ [ concat [ agdaDirEnvVar, "=", ddir ] ]
- , [ agda ]
- , agdaArgs
- , [ "<<EOF" ]
- ]
- ]
- , loadBuiltinCmds
- , [ "EOF" ]
- ]
- let onIOError (e :: IOException) = False <$ do
- warn $ concat
- [ [ "*** Could not generate Agda library interface files."
- , "*** Reason:"
- , show e
- , "*** The attempted call to Agda was:"
- ]
- , callLines
- ]
- env <- getEnvironment
- handle onIOError $ do
-
- -- Generate interface files via a call to Agda.
- readCreateProcess
- (proc agda agdaArgs)
- { delegate_ctlc = True
- -- Make Agda look for data files in a
- -- certain place.
- , env = Just ((agdaDirEnvVar, ddir) : env)
- }
- (unlines loadBuiltinCmds)
-
- -- Check whether all interface files have been generated.
- missing <- catMaybes <$> forM interfaces \ f ->
- doesFileExist f <&> \case
- True -> Nothing
- False -> Just f
-
- -- Warn if not all interface files have been generated, but don't crash.
- -- This might help with issue #7455.
- let success = null missing
- unless success $ warn $ concat
- [ [ "*** Agda failed to generate the following library interface files:" ]
- , missing
- ]
- return success
-
-warn :: [String] -> IO ()
-warn msgs = putStr $ unlines $ concat
- [ [ "*** Warning!" ]
- , msgs
- , [ "*** Ignoring error, continuing installation..." ]
- ]
-
-
-
-agdaExeExtension :: String
-agdaExeExtension = exeExtension buildPlatform
name: Cabal
version: 2.4.1.0
x-revision: 2
copyright: 2003-2018, Cabal Development Team (see AUTHORS file)
license: BSD3
license-file: LICENSE
author: Cabal Development Team <cabal-devel@haskell.org>
maintainer: cabal-devel@haskell.org
homepage: http://www.haskell.org/cabal/
bug-reports: https://github.com/haskell/cabal/issues
synopsis: A framework for packaging Haskell software
description:
The Haskell Common Architecture for Building Applications and
Libraries: a framework defining a common interface for authors to more
easily build their Haskell applications in a portable way.
.
The Haskell Cabal is part of a larger infrastructure for distributing,
organizing, and cataloging Haskell libraries and tools.
category: Distribution
cabal-version: >=1.10
build-type: Simple
-- If we use a new Cabal feature, this needs to be changed to Custom so
-- we can bootstrap.
extra-source-files:
README.md tests/README.md ChangeLog.md
doc/bugs-and-stability.rst doc/concepts-and-development.rst
doc/conf.py doc/config-and-install.rst doc/developing-packages.rst
doc/images/Cabal-dark.png doc/index.rst doc/installing-packages.rst
doc/intro.rst doc/misc.rst doc/nix-local-build-overview.rst
doc/nix-local-build.rst doc/file-format-changelog.rst doc/README.md
doc/references.inc
-- Generated with 'make gen-extra-source-files'
-- Do NOT edit this section manually; instead, run the script.
-- BEGIN gen-extra-source-files
tests/ParserTests/errors/common1.cabal
tests/ParserTests/errors/common1.errors
tests/ParserTests/errors/common2.cabal
tests/ParserTests/errors/common2.errors
tests/ParserTests/errors/common3.cabal
tests/ParserTests/errors/common3.errors
tests/ParserTests/errors/forward-compat.cabal
tests/ParserTests/errors/forward-compat.errors
tests/ParserTests/errors/forward-compat2.cabal
tests/ParserTests/errors/forward-compat2.errors
tests/ParserTests/errors/forward-compat3.cabal
tests/ParserTests/errors/forward-compat3.errors
tests/ParserTests/errors/issue-5055-2.cabal
tests/ParserTests/errors/issue-5055-2.errors
tests/ParserTests/errors/issue-5055.cabal
tests/ParserTests/errors/issue-5055.errors
tests/ParserTests/errors/leading-comma.cabal
tests/ParserTests/errors/leading-comma.errors
tests/ParserTests/errors/noVersion.cabal
tests/ParserTests/errors/noVersion.errors
tests/ParserTests/errors/noVersion2.cabal
tests/ParserTests/errors/noVersion2.errors
tests/ParserTests/errors/range-ge-wild.cabal
tests/ParserTests/errors/range-ge-wild.errors
tests/ParserTests/errors/spdx-1.cabal
tests/ParserTests/errors/spdx-1.errors
tests/ParserTests/errors/spdx-2.cabal
tests/ParserTests/errors/spdx-2.errors
tests/ParserTests/errors/spdx-3.cabal
tests/ParserTests/errors/spdx-3.errors
tests/ParserTests/ipi/Includes2.cabal
tests/ParserTests/ipi/Includes2.expr
tests/ParserTests/ipi/Includes2.format
tests/ParserTests/ipi/internal-preprocessor-test.cabal
tests/ParserTests/ipi/internal-preprocessor-test.expr
tests/ParserTests/ipi/internal-preprocessor-test.format
tests/ParserTests/ipi/issue-2276-ghc-9885.cabal
tests/ParserTests/ipi/issue-2276-ghc-9885.expr
tests/ParserTests/ipi/issue-2276-ghc-9885.format
tests/ParserTests/ipi/transformers.cabal
tests/ParserTests/ipi/transformers.expr
tests/ParserTests/ipi/transformers.format
tests/ParserTests/regressions/MiniAgda.cabal
tests/ParserTests/regressions/MiniAgda.check
tests/ParserTests/regressions/Octree-0.5.cabal
tests/ParserTests/regressions/Octree-0.5.expr
tests/ParserTests/regressions/Octree-0.5.format
tests/ParserTests/regressions/bad-glob-syntax.cabal
tests/ParserTests/regressions/bad-glob-syntax.check
tests/ParserTests/regressions/cc-options-with-optimization.cabal
tests/ParserTests/regressions/cc-options-with-optimization.check
tests/ParserTests/regressions/common.cabal
tests/ParserTests/regressions/common.expr
tests/ParserTests/regressions/common.format
tests/ParserTests/regressions/common2.cabal
tests/ParserTests/regressions/common2.expr
tests/ParserTests/regressions/common2.format
tests/ParserTests/regressions/cxx-options-with-optimization.cabal
tests/ParserTests/regressions/cxx-options-with-optimization.check
tests/ParserTests/regressions/elif.cabal
tests/ParserTests/regressions/elif.expr
tests/ParserTests/regressions/elif.format
tests/ParserTests/regressions/elif2.cabal
tests/ParserTests/regressions/elif2.expr
tests/ParserTests/regressions/elif2.format
tests/ParserTests/regressions/encoding-0.8.cabal
tests/ParserTests/regressions/encoding-0.8.expr
tests/ParserTests/regressions/encoding-0.8.format
tests/ParserTests/regressions/extensions-paths-5054.cabal
tests/ParserTests/regressions/extensions-paths-5054.check
tests/ParserTests/regressions/generics-sop.cabal
tests/ParserTests/regressions/generics-sop.expr
tests/ParserTests/regressions/generics-sop.format
tests/ParserTests/regressions/ghc-option-j.cabal
tests/ParserTests/regressions/ghc-option-j.check
tests/ParserTests/regressions/haddock-api-2.18.1-check.cabal
tests/ParserTests/regressions/haddock-api-2.18.1-check.check
tests/ParserTests/regressions/issue-5055.cabal
tests/ParserTests/regressions/issue-5055.expr
tests/ParserTests/regressions/issue-5055.format
tests/ParserTests/regressions/issue-774.cabal
tests/ParserTests/regressions/issue-774.check
tests/ParserTests/regressions/issue-774.expr
tests/ParserTests/regressions/issue-774.format
tests/ParserTests/regressions/leading-comma.cabal
tests/ParserTests/regressions/leading-comma.expr
tests/ParserTests/regressions/leading-comma.format
tests/ParserTests/regressions/noVersion.cabal
tests/ParserTests/regressions/noVersion.expr
tests/ParserTests/regressions/noVersion.format
tests/ParserTests/regressions/nothing-unicode.cabal
tests/ParserTests/regressions/nothing-unicode.check
tests/ParserTests/regressions/nothing-unicode.expr
tests/ParserTests/regressions/nothing-unicode.format
tests/ParserTests/regressions/pre-1.6-glob.cabal
tests/ParserTests/regressions/pre-1.6-glob.check
tests/ParserTests/regressions/pre-2.4-globstar.cabal
tests/ParserTests/regressions/pre-2.4-globstar.check
tests/ParserTests/regressions/shake.cabal
tests/ParserTests/regressions/shake.expr
tests/ParserTests/regressions/shake.format
tests/ParserTests/regressions/spdx-1.cabal
tests/ParserTests/regressions/spdx-1.expr
tests/ParserTests/regressions/spdx-1.format
tests/ParserTests/regressions/spdx-2.cabal
tests/ParserTests/regressions/spdx-2.expr
tests/ParserTests/regressions/spdx-2.format
tests/ParserTests/regressions/spdx-3.cabal
tests/ParserTests/regressions/spdx-3.expr
tests/ParserTests/regressions/spdx-3.format
tests/ParserTests/regressions/th-lift-instances.cabal
tests/ParserTests/regressions/th-lift-instances.expr
tests/ParserTests/regressions/th-lift-instances.format
tests/ParserTests/regressions/wl-pprint-indef.cabal
tests/ParserTests/regressions/wl-pprint-indef.expr
tests/ParserTests/regressions/wl-pprint-indef.format
tests/ParserTests/warnings/bom.cabal
tests/ParserTests/warnings/bool.cabal
tests/ParserTests/warnings/deprecatedfield.cabal
tests/ParserTests/warnings/doubledash.cabal
tests/ParserTests/warnings/extratestmodule.cabal
tests/ParserTests/warnings/gluedop.cabal
tests/ParserTests/warnings/multiplesingular.cabal
tests/ParserTests/warnings/nbsp.cabal
tests/ParserTests/warnings/newsyntax.cabal
tests/ParserTests/warnings/oldsyntax.cabal
tests/ParserTests/warnings/subsection.cabal
tests/ParserTests/warnings/tab.cabal
tests/ParserTests/warnings/trailingfield.cabal
tests/ParserTests/warnings/unknownfield.cabal
tests/ParserTests/warnings/unknownsection.cabal
tests/ParserTests/warnings/utf8.cabal
tests/ParserTests/warnings/versiontag.cabal
tests/hackage/check.sh
tests/hackage/download.sh
tests/hackage/unpack.sh
tests/misc/ghc-supported-languages.hs
-- END gen-extra-source-files
source-repository head
type: git
location: https://github.com/haskell/cabal/
subdir: Cabal
flag bundled-binary-generic
default: False
library
build-depends:
array >= 0.4.0.1 && < 0.6,
base >= 4.8 && < 4.13,
bytestring >= 0.10.0.0 && < 0.11,
containers >= 0.5.0.0 && < 0.7,
deepseq >= 1.3.0.1 && < 1.5,
directory >= 1.2 && < 1.4,
filepath >= 1.3.0.1 && < 1.5,
pretty >= 1.1.1 && < 1.2,
process >= 1.1.0.2 && < 1.7,
time >= 1.4.0.1 && < 1.10
if flag(bundled-binary-generic)
build-depends: binary >= 0.5.1.1 && < 0.7
else
build-depends: binary >= 0.7 && < 0.9
if os(windows)
build-depends: Win32 >= 2.3.0.0 && < 2.9
else
build-depends: unix >= 2.6.0.0 && < 2.8
ghc-options: -Wall -fno-ignore-asserts -fwarn-tabs
if impl(ghc >= 8.0)
ghc-options: -Wcompat -Wnoncanonical-monad-instances
-Wnoncanonical-monadfail-instances
exposed-modules:
Distribution.Backpack
Distribution.Backpack.Configure
Distribution.Backpack.ComponentsGraph
Distribution.Backpack.ConfiguredComponent
Distribution.Backpack.DescribeUnitId
Distribution.Backpack.FullUnitId
Distribution.Backpack.LinkedComponent
Distribution.Backpack.ModSubst
Distribution.Backpack.ModuleShape
Distribution.Backpack.PreModuleShape
Distribution.CabalSpecVersion
Distribution.Utils.IOData
Distribution.Utils.LogProgress
Distribution.Utils.MapAccum
Distribution.Compat.CreatePipe
Distribution.Compat.Directory
Distribution.Compat.Environment
Distribution.Compat.Exception
Distribution.Compat.Graph
Distribution.Compat.Internal.TempFile
Distribution.Compat.Newtype
Distribution.Compat.Prelude.Internal
Distribution.Compat.ReadP
Distribution.Compat.Semigroup
Distribution.Compat.Stack
Distribution.Compat.Time
Distribution.Compat.DList
Distribution.Compiler
Distribution.InstalledPackageInfo
Distribution.Types.AbiDependency
Distribution.Types.ExposedModule
Distribution.Types.InstalledPackageInfo
Distribution.Types.InstalledPackageInfo.FieldGrammar
Distribution.License
Distribution.Make
Distribution.ModuleName
Distribution.Package
Distribution.PackageDescription
Distribution.PackageDescription.Check
Distribution.PackageDescription.Configuration
Distribution.PackageDescription.PrettyPrint
Distribution.PackageDescription.Utils
Distribution.ParseUtils
Distribution.PrettyUtils
Distribution.ReadE
Distribution.Simple
Distribution.Simple.Bench
Distribution.Simple.Build
Distribution.Simple.Build.Macros
Distribution.Simple.Build.PathsModule
Distribution.Simple.BuildPaths
Distribution.Simple.BuildTarget
Distribution.Simple.BuildToolDepends
Distribution.Simple.CCompiler
Distribution.Simple.Command
Distribution.Simple.Compiler
Distribution.Simple.Configure
Distribution.Simple.Flag
Distribution.Simple.GHC
Distribution.Simple.GHCJS
Distribution.Simple.Haddock
Distribution.Simple.Doctest
Distribution.Simple.Glob
Distribution.Simple.HaskellSuite
Distribution.Simple.Hpc
Distribution.Simple.Install
Distribution.Simple.InstallDirs
Distribution.Simple.LocalBuildInfo
Distribution.Simple.PackageIndex
Distribution.Simple.PreProcess
Distribution.Simple.PreProcess.Unlit
Distribution.Simple.Program
Distribution.Simple.Program.Ar
Distribution.Simple.Program.Builtin
Distribution.Simple.Program.Db
Distribution.Simple.Program.Find
Distribution.Simple.Program.GHC
Distribution.Simple.Program.HcPkg
Distribution.Simple.Program.Hpc
Distribution.Simple.Program.Internal
Distribution.Simple.Program.Ld
Distribution.Simple.Program.ResponseFile
Distribution.Simple.Program.Run
Distribution.Simple.Program.Script
Distribution.Simple.Program.Strip
Distribution.Simple.Program.Types
Distribution.Simple.Register
Distribution.Simple.Setup
Distribution.Simple.SrcDist
Distribution.Simple.Test
Distribution.Simple.Test.ExeV10
Distribution.Simple.Test.LibV09
Distribution.Simple.Test.Log
Distribution.Simple.UHC
Distribution.Simple.UserHooks
Distribution.Simple.Utils
Distribution.SPDX
Distribution.SPDX.License
Distribution.SPDX.LicenseId
Distribution.SPDX.LicenseExceptionId
Distribution.SPDX.LicenseExpression
Distribution.SPDX.LicenseListVersion
Distribution.SPDX.LicenseReference
Distribution.System
Distribution.TestSuite
Distribution.Text
Distribution.Pretty
Distribution.Types.AbiHash
Distribution.Types.AnnotatedId
Distribution.Types.Benchmark
Distribution.Types.BenchmarkInterface
Distribution.Types.BenchmarkType
Distribution.Types.BuildInfo
Distribution.Types.BuildType
Distribution.Types.ComponentInclude
Distribution.Types.Dependency
Distribution.Types.ExeDependency
Distribution.Types.LegacyExeDependency
Distribution.Types.PkgconfigDependency
Distribution.Types.DependencyMap
Distribution.Types.ComponentId
Distribution.Types.MungedPackageId
Distribution.Types.PackageId
Distribution.Types.UnitId
Distribution.Types.Executable
Distribution.Types.ExecutableScope
Distribution.Types.Library
Distribution.Types.ForeignLib
Distribution.Types.ForeignLibType
Distribution.Types.ForeignLibOption
Distribution.Types.Module
Distribution.Types.ModuleReexport
Distribution.Types.ModuleRenaming
Distribution.Types.ComponentName
Distribution.Types.MungedPackageName
Distribution.Types.PackageName
Distribution.Types.PkgconfigName
Distribution.Types.UnqualComponentName
Distribution.Types.IncludeRenaming
Distribution.Types.Mixin
Distribution.Types.SetupBuildInfo
Distribution.Types.TestSuite
Distribution.Types.TestSuiteInterface
Distribution.Types.TestType
Distribution.Types.GenericPackageDescription
Distribution.Types.Condition
Distribution.Types.CondTree
Distribution.Types.HookedBuildInfo
Distribution.Types.PackageDescription
Distribution.Types.SourceRepo
Distribution.Types.Component
Distribution.Types.ComponentLocalBuildInfo
Distribution.Types.LocalBuildInfo
Distribution.Types.ComponentRequestedSpec
Distribution.Types.TargetInfo
Distribution.Types.Version
Distribution.Types.VersionRange
Distribution.Types.VersionInterval
Distribution.Utils.Generic
Distribution.Utils.NubList
Distribution.Utils.ShortText
Distribution.Utils.Progress
Distribution.Verbosity
Distribution.Version
Language.Haskell.Extension
Distribution.Compat.Binary
-- Parsec parser-related modules
build-depends:
-- transformers-0.4.0.0 doesn't have record syntax e.g. for Identity
-- See also https://github.com/ekmett/transformers-compat/issues/35
transformers (>= 0.3 && < 0.4) || (>=0.4.1.0 && <0.6),
mtl >= 2.1 && < 2.3,
text >= 1.2.3.0 && < 1.3,
parsec >= 3.1.13.0 && < 3.2
exposed-modules:
Distribution.Compat.Parsing
Distribution.Compat.CharParsing
Distribution.FieldGrammar
Distribution.FieldGrammar.Class
Distribution.FieldGrammar.FieldDescrs
Distribution.FieldGrammar.Parsec
Distribution.FieldGrammar.Pretty
Distribution.PackageDescription.FieldGrammar
Distribution.PackageDescription.Parsec
Distribution.PackageDescription.Quirks
Distribution.Parsec.Class
Distribution.Parsec.Common
Distribution.Parsec.ConfVar
Distribution.Parsec.Field
Distribution.Parsec.FieldLineStream
Distribution.Parsec.Lexer
Distribution.Parsec.LexerMonad
Distribution.Parsec.Newtypes
Distribution.Parsec.ParseResult
Distribution.Parsec.Parser
-- Lens functionality
exposed-modules:
Distribution.Compat.Lens
Distribution.Types.Lens
Distribution.Types.Benchmark.Lens
Distribution.Types.BuildInfo.Lens
Distribution.Types.Executable.Lens
Distribution.Types.ForeignLib.Lens
Distribution.Types.GenericPackageDescription.Lens
Distribution.Types.InstalledPackageInfo.Lens
Distribution.Types.Library.Lens
Distribution.Types.PackageDescription.Lens
Distribution.Types.PackageId.Lens
Distribution.Types.SetupBuildInfo.Lens
Distribution.Types.SourceRepo.Lens
Distribution.Types.TestSuite.Lens
other-modules:
Distribution.Backpack.PreExistingComponent
Distribution.Backpack.ReadyComponent
Distribution.Backpack.MixLink
Distribution.Backpack.ModuleScope
Distribution.Backpack.UnifyM
Distribution.Backpack.Id
Distribution.Utils.UnionFind
Distribution.Utils.Base62
Distribution.Compat.CopyFile
Distribution.Compat.GetShortPathName
Distribution.Compat.MonadFail
Distribution.Compat.Prelude
Distribution.Compat.SnocList
Distribution.GetOpt
Distribution.Lex
Distribution.Utils.String
Distribution.Simple.GHC.EnvironmentParser
Distribution.Simple.GHC.Internal
Distribution.Simple.GHC.ImplInfo
Paths_Cabal
if flag(bundled-binary-generic)
other-modules:
Distribution.Compat.Binary.Class
Distribution.Compat.Binary.Generic
default-language: Haskell2010
other-extensions:
BangPatterns
CPP
DefaultSignatures
DeriveDataTypeable
DeriveFoldable
DeriveFunctor
DeriveGeneric
DeriveTraversable
ExistentialQuantification
FlexibleContexts
FlexibleInstances
GeneralizedNewtypeDeriving
ImplicitParams
KindSignatures
NondecreasingIndentation
OverloadedStrings
RankNTypes
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
Trustworthy
TypeFamilies
TypeOperators
TypeSynonymInstances
UndecidableInstances
if impl(ghc >= 7.11)
other-extensions: PatternSynonyms
-- Small, fast running tests.
test-suite unit-tests
type: exitcode-stdio-1.0
hs-source-dirs: tests
other-modules:
Test.Laws
Test.QuickCheck.Utils
UnitTests.Distribution.Compat.CreatePipe
UnitTests.Distribution.Compat.ReadP
UnitTests.Distribution.Compat.Time
UnitTests.Distribution.Compat.Graph
UnitTests.Distribution.Simple.Glob
UnitTests.Distribution.Simple.Program.Internal
UnitTests.Distribution.Simple.Utils
UnitTests.Distribution.SPDX
UnitTests.Distribution.System
UnitTests.Distribution.Types.GenericPackageDescription
UnitTests.Distribution.Utils.Generic
UnitTests.Distribution.Utils.NubList
UnitTests.Distribution.Utils.ShortText
UnitTests.Distribution.Version
main-is: UnitTests.hs
build-depends:
array,
base,
bytestring,
containers,
directory,
filepath,
integer-logarithms >= 1.0.2 && <1.1,
tasty >= 1.1.0.3 && < 1.2,
tasty-hunit,
tasty-quickcheck,
tagged,
temporary,
text,
pretty,
QuickCheck >= 2.11.3 && < 2.12,
Cabal
ghc-options: -Wall
default-language: Haskell2010
test-suite parser-tests
type: exitcode-stdio-1.0
hs-source-dirs: tests
main-is: ParserTests.hs
build-depends:
base,
base-compat >=0.10.4 && <0.11,
bytestring,
filepath,
tasty >= 1.1.0.3 && < 1.2,
tasty-hunit,
tasty-quickcheck,
tasty-golden >=2.3.1.1 && <2.4,
Diff >=0.3.4 && <0.4,
Cabal
ghc-options: -Wall
default-language: Haskell2010
if impl(ghc >= 7.8)
build-depends:
tree-diff >= 0.0.1 && <0.1
other-modules:
Instances.TreeDiff
Instances.TreeDiff.Language
Instances.TreeDiff.SPDX
Instances.TreeDiff.Version
test-suite check-tests
type: exitcode-stdio-1.0
hs-source-dirs: tests
main-is: CheckTests.hs
build-depends:
base,
bytestring,
filepath,
tasty >= 1.1.0.3 && < 1.2,
tasty-golden >=2.3.1.1 && <2.4,
Diff >=0.3.4 && <0.4,
Cabal
ghc-options: -Wall
default-language: Haskell2010
test-suite custom-setup-tests
type: exitcode-stdio-1.0
hs-source-dirs: tests/custom-setup
main-is: CustomSetupTests.hs
other-modules:
CabalDoctestSetup
IdrisSetup
build-depends:
Cabal,
base,
directory,
filepath,
process
default-language: Haskell2010
test-suite hackage-tests
type: exitcode-stdio-1.0
main-is: HackageTests.hs
-- TODO: need to get 01-index.tar on appveyor
if os(windows)
buildable: False
hs-source-dirs: tests
build-depends:
base,
Cabal,
bytestring,
deepseq,
containers,
directory,
filepath
build-depends:
base-compat >=0.10.4 && <0.11,
base-orphans >=0.6 && <0.9,
optparse-applicative >=0.13.2.0 && <0.15,
tar >=0.5.0.3 && <0.6
if impl(ghc >= 7.8)
build-depends:
tree-diff >= 0.0.1 && <0.1
other-modules:
Instances.TreeDiff
Instances.TreeDiff.Language
Instances.TreeDiff.SPDX
Instances.TreeDiff.Version
ghc-options: -Wall -rtsopts -threaded
default-extensions: CPP
default-language: Haskell2010
diff -ru Cabal-2.4.1.0.orig/Distribution/Compat/ReadP.hs Cabal-2.4.1.0/Distribution/Compat/ReadP.hs diff --git a/Distribution/Compat/Prelude.hs b/Distribution/Compat/Prelude.hs
--- Cabal-2.4.1.0.orig/Distribution/Compat/ReadP.hs 1969-12-31 19:00:00.000000000 -0500 index d032825..ecffbbc 100644
+++ Cabal-2.4.1.0/Distribution/Compat/ReadP.hs 2019-09-08 08:28:12.262274000 -0400 --- a/Distribution/Compat/Prelude.hs
+++ b/Distribution/Compat/Prelude.hs
@@ -140,7 +140,7 @@ import qualified Text.PrettyPrint as Disp
import qualified Prelude as OrigPrelude
import Distribution.Compat.Stack
-type IO a = WithCallStack (OrigPrelude.IO a)
+type IO a = OrigPrelude.IO a
type NoCallStackIO a = OrigPrelude.IO a
-- | New name for 'Text.PrettyPrint.<>'
diff --git a/Distribution/Compat/ReadP.hs b/Distribution/Compat/ReadP.hs
index 1f5a989..e314592 100644
--- a/Distribution/Compat/ReadP.hs
+++ b/Distribution/Compat/ReadP.hs
@@ -1,3 +1,4 @@ @@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-} +{-# LANGUAGE CPP #-}
{-# LANGUAGE GADTs #-} {-# LANGUAGE GADTs #-}
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
-- | -- |
@@ -113,7 +114,9 @@ @@ -113,7 +114,9 @@ instance Monad (P s) where
(Result x p) >>= k = k x `mplus` (p >>= k) (Result x p) >>= k = k x `mplus` (p >>= k)
(Final r) >>= k = final [ys' | (x,s) <- r, ys' <- run (k x) s] (Final r) >>= k = final [ys' | (x,s) <- r, ys' <- run (k x) s]
...@@ -16,7 +30,7 @@ diff -ru Cabal-2.4.1.0.orig/Distribution/Compat/ReadP.hs Cabal-2.4.1.0/Distribut ...@@ -16,7 +30,7 @@ diff -ru Cabal-2.4.1.0.orig/Distribution/Compat/ReadP.hs Cabal-2.4.1.0/Distribut
instance Fail.MonadFail (P s) where instance Fail.MonadFail (P s) where
fail _ = Fail fail _ = Fail
@@ -172,7 +175,9 @@ @@ -172,7 +175,9 @@ instance s ~ Char => Alternative (Parser r s) where
instance Monad (Parser r s) where instance Monad (Parser r s) where
return = pure return = pure
...@@ -26,15 +40,51 @@ diff -ru Cabal-2.4.1.0.orig/Distribution/Compat/ReadP.hs Cabal-2.4.1.0/Distribut ...@@ -26,15 +40,51 @@ diff -ru Cabal-2.4.1.0.orig/Distribution/Compat/ReadP.hs Cabal-2.4.1.0/Distribut
R m >>= f = R (\k -> m (\a -> let R m' = f a in m' k)) R m >>= f = R (\k -> m (\a -> let R m' = f a in m' k))
instance Fail.MonadFail (Parser r s) where instance Fail.MonadFail (Parser r s) where
diff -ru Cabal-2.4.1.0.orig/Distribution/Parsec/Class.hs Cabal-2.4.1.0/Distribution/Parsec/Class.hs diff --git a/Distribution/FieldGrammar/FieldDescrs.hs b/Distribution/FieldGrammar/FieldDescrs.hs
--- Cabal-2.4.1.0.orig/Distribution/Parsec/Class.hs 1969-12-31 19:00:00.000000000 -0500 index 4bd50d4..ce85fc0 100644
+++ Cabal-2.4.1.0/Distribution/Parsec/Class.hs 2019-09-08 08:31:12.836405979 -0400 --- a/Distribution/FieldGrammar/FieldDescrs.hs
+++ b/Distribution/FieldGrammar/FieldDescrs.hs
@@ -44,7 +44,7 @@ fieldDescrPretty (F m) fn = pPretty <$> Map.lookup fn m
-- | Lookup a field value parser.
fieldDescrParse :: P.CabalParsing m => FieldDescrs s a -> String -> Maybe (s -> m s)
-fieldDescrParse (F m) fn = pParse <$> Map.lookup fn m
+fieldDescrParse (F m) fn = (\f -> pParse f) <$> Map.lookup fn m
fieldDescrsToList
:: P.CabalParsing m
diff --git a/Distribution/ParseUtils.hs b/Distribution/ParseUtils.hs
index 0e79049..f4b805c 100644
--- a/Distribution/ParseUtils.hs
+++ b/Distribution/ParseUtils.hs
@@ -19,6 +19,7 @@
-- This module is meant to be local-only to Distribution...
{-# OPTIONS_HADDOCK hide #-}
+{-# LANGUAGE CPP #-}
{-# LANGUAGE Rank2Types #-}
module Distribution.ParseUtils (
LineNo, PError(..), PWarning(..), locatedErrorMsg, syntaxError, warning,
@@ -107,7 +108,9 @@ instance Monad ParseResult where
ParseOk ws x >>= f = case f x of
ParseFailed err -> ParseFailed err
ParseOk ws' x' -> ParseOk (ws'++ws) x'
+#if !(MIN_VERSION_base(4,13,0))
fail = Fail.fail
+#endif
instance Fail.MonadFail ParseResult where
fail s = ParseFailed (FromString s Nothing)
diff --git a/Distribution/Parsec/Class.hs b/Distribution/Parsec/Class.hs
index d65ea54..d182360 100644
--- a/Distribution/Parsec/Class.hs
+++ b/Distribution/Parsec/Class.hs
@@ -1,3 +1,4 @@ @@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-} +{-# LANGUAGE CPP #-}
{-# LANGUAGE GADTs #-} {-# LANGUAGE GADTs #-}
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE RankNTypes #-}
@@ -55,7 +56,7 @@ @@ -55,7 +56,7 @@ class Parsec a where
-- --
-- * knows @cabal-version@ we work with -- * knows @cabal-version@ we work with
-- --
...@@ -43,7 +93,7 @@ diff -ru Cabal-2.4.1.0.orig/Distribution/Parsec/Class.hs Cabal-2.4.1.0/Distribut ...@@ -43,7 +93,7 @@ diff -ru Cabal-2.4.1.0.orig/Distribution/Parsec/Class.hs Cabal-2.4.1.0/Distribut
parsecWarning :: PWarnType -> String -> m () parsecWarning :: PWarnType -> String -> m ()
parsecHaskellString :: m String parsecHaskellString :: m String
@@ -116,7 +117,9 @@ @@ -116,7 +117,9 @@ instance Monad ParsecParser where
(>>) = (*>) (>>) = (*>)
{-# INLINE (>>) #-} {-# INLINE (>>) #-}
...@@ -53,60 +103,157 @@ diff -ru Cabal-2.4.1.0.orig/Distribution/Parsec/Class.hs Cabal-2.4.1.0/Distribut ...@@ -53,60 +103,157 @@ diff -ru Cabal-2.4.1.0.orig/Distribution/Parsec/Class.hs Cabal-2.4.1.0/Distribut
instance MonadPlus ParsecParser where instance MonadPlus ParsecParser where
mzero = empty mzero = empty
diff -ru Cabal-2.4.1.0.orig/Distribution/ParseUtils.hs Cabal-2.4.1.0/Distribution/ParseUtils.hs diff --git a/Distribution/Parsec/Lexer.hs b/Distribution/Parsec/Lexer.hs
--- Cabal-2.4.1.0.orig/Distribution/ParseUtils.hs 1969-12-31 19:00:00.000000000 -0500 index 64f5222..20781a4 100644
+++ Cabal-2.4.1.0/Distribution/ParseUtils.hs 2019-09-08 08:31:47.628803805 -0400 --- a/Distribution/Parsec/Lexer.hs
@@ -19,6 +19,7 @@ +++ b/Distribution/Parsec/Lexer.hs
-- This module is meant to be local-only to Distribution... @@ -230,35 +230,35 @@ alex_action_0 = \_ len _ -> do
when (len /= 0) $ addWarning LexWarningBOM
setStartCode bol_section
lexToken
-
-alex_action_1 = \_pos len inp -> checkWhitespace len inp >> adjustPos retPos >> lexToken
+
+alex_action_1 = \_pos len inp -> checkWhitespace len inp >> adjustPos retPos >> lexToken
alex_action_3 = \pos len inp -> checkLeadingWhitespace len inp >>
if B.length inp == len
then return (L pos EOF)
else setStartCode in_section
- >> return (L pos (Indent len))
-alex_action_4 = tok OpenBrace
-alex_action_5 = tok CloseBrace
-alex_action_8 = toki TokSym
-alex_action_9 = \pos len inp -> return $! L pos (TokStr (B.take (len - 2) (B.tail inp)))
-alex_action_10 = toki TokOther
-alex_action_11 = toki TokOther
-alex_action_12 = tok Colon
-alex_action_13 = tok OpenBrace
-alex_action_14 = tok CloseBrace
-alex_action_15 = \_ _ _ -> adjustPos retPos >> setStartCode bol_section >> lexToken
+ >> return (L pos (Indent len))
+alex_action_4 = tok OpenBrace
+alex_action_5 = tok CloseBrace
+alex_action_8 = toki TokSym
+alex_action_9 = \pos len inp -> return $! L pos (TokStr (B.take (len - 2) (B.tail inp)))
+alex_action_10 = toki TokOther
+alex_action_11 = toki TokOther
+alex_action_12 = tok Colon
+alex_action_13 = tok OpenBrace
+alex_action_14 = tok CloseBrace
+alex_action_15 = \_ _ _ -> adjustPos retPos >> setStartCode bol_section >> lexToken
alex_action_16 = \pos len inp -> checkLeadingWhitespace len inp >>= \len' ->
if B.length inp == len
then return (L pos EOF)
else setStartCode in_field_layout
- >> return (L pos (Indent len'))
-alex_action_18 = toki TokFieldLine
-alex_action_19 = \_ _ _ -> adjustPos retPos >> setStartCode bol_field_layout >> lexToken
-alex_action_20 = \_ _ _ -> setStartCode in_field_braces >> lexToken
-alex_action_22 = toki TokFieldLine
-alex_action_23 = tok OpenBrace
-alex_action_24 = tok CloseBrace
-alex_action_25 = \_ _ _ -> adjustPos retPos >> setStartCode bol_field_braces >> lexToken
+ >> return (L pos (Indent len'))
+alex_action_18 = toki TokFieldLine
+alex_action_19 = \_ _ _ -> adjustPos retPos >> setStartCode bol_field_layout >> lexToken
+alex_action_20 = \_ _ _ -> setStartCode in_field_braces >> lexToken
+alex_action_22 = toki TokFieldLine
+alex_action_23 = tok OpenBrace
+alex_action_24 = tok CloseBrace
+alex_action_25 = \_ _ _ -> adjustPos retPos >> setStartCode bol_field_braces >> lexToken
{-# LINE 1 "templates/GenericTemplate.hs" #-}
{-# LINE 1 "templates/GenericTemplate.hs" #-}
{-# LINE 1 "<built-in>" #-}
@@ -310,11 +310,14 @@ alexIndexInt16OffAddr (AlexA# arr) off =
low = int2Word# (ord# (indexCharOffAddr# arr off'))
off' = off *# 2#
#else
- indexInt16OffAddr# arr off
+#if __GLASGOW_HASKELL__ >= 901
+ int16ToInt#
+#endif
+ (indexInt16OffAddr# arr off)
#endif
{-# OPTIONS_HADDOCK hide #-} {-# INLINE alexIndexInt32OffAddr #-}
+{-# LANGUAGE CPP #-} -alexIndexInt32OffAddr (AlexA# arr) off =
{-# LANGUAGE Rank2Types #-} +alexIndexInt32OffAddr (AlexA# arr) off =
module Distribution.ParseUtils ( #ifdef WORDS_BIGENDIAN
LineNo, PError(..), PWarning(..), locatedErrorMsg, syntaxError, warning, narrow32Int# i
@@ -107,7 +108,9 @@ where
ParseOk ws x >>= f = case f x of @@ -327,7 +330,10 @@ alexIndexInt32OffAddr (AlexA# arr) off =
ParseFailed err -> ParseFailed err b0 = int2Word# (ord# (indexCharOffAddr# arr off'))
ParseOk ws' x' -> ParseOk (ws'++ws) x' off' = off *# 4#
+#if !(MIN_VERSION_base(4,13,0)) #else
fail = Fail.fail - indexInt32OffAddr# arr off
+#if __GLASGOW_HASKELL__ >= 901
+ int32ToInt#
+#endif +#endif
+ (indexInt32OffAddr# arr off)
#endif
instance Fail.MonadFail ParseResult where #if __GLASGOW_HASKELL__ < 503
fail s = ParseFailed (FromString s Nothing) @@ -354,7 +360,7 @@ alexScanUser user input (I# (sc))
diff -ru Cabal-2.4.1.0.orig/Distribution/Simple/PreProcess.hs Cabal-2.4.1.0/Distribution/Simple/PreProcess.hs = case alex_scan_tkn user input 0# input sc AlexNone of
--- Cabal-2.4.1.0.orig/Distribution/Simple/PreProcess.hs 1969-12-31 19:00:00.000000000 -0500 (AlexNone, input') ->
+++ Cabal-2.4.1.0/Distribution/Simple/PreProcess.hs 2019-09-08 08:26:37.233096478 -0400 case alexGetByte input of
@@ -122,6 +122,12 @@ - Nothing ->
-- preprocessor's output name format. + Nothing ->
type PreProcessorExtras = FilePath -> IO [FilePath]
AlexEOF
+-- | A newtype around 'PreProcessorExtras', useful for storing Just _ ->
+-- 'PreProcessorExtras' inside of another type constructor (e.g., a list) @@ -374,20 +380,20 @@ alexScanUser user input (I# (sc))
+-- without impredicativity (recall that the 'IO' type, which is contained in
+-- 'PreProcessorExtras', is a synonym for @'HasCallStack' => Prelude.IO@, which alex_scan_tkn user orig_input len input s last_acc =
+-- is a polymorphic type). input `seq` -- strict in the input
+newtype WrappedPreProcessorExtras = WrapPPE { unWrapPPE :: PreProcessorExtras } - let
+ let
mkSimplePreProcessor :: (FilePath -> FilePath -> Verbosity -> IO ()) new_acc = (check_accs (alex_accept `quickIndex` (I# (s))))
-> (FilePath, FilePath) in
@@ -694,8 +700,8 @@ new_acc `seq`
] case alexGetByte input of
Nothing -> (new_acc, input)
-- |Standard preprocessors with possible extra C sources: c2hs, hsc2hs. - Just (c, new_input) ->
-knownExtrasHandlers :: [ PreProcessorExtras ] + Just (c, new_input) ->
-knownExtrasHandlers = [ ppC2hsExtras, ppHsc2hsExtras ]
+knownExtrasHandlers :: [ WrappedPreProcessorExtras ] case fromIntegral c of { (I# (ord_c)) ->
+knownExtrasHandlers = [ WrapPPE ppC2hsExtras, WrapPPE ppHsc2hsExtras ] let
base = alexIndexInt32OffAddr alex_base s
-- | Find any extra C sources generated by preprocessing that need to offset = (base +# ord_c)
-- be added to the component (addresses issue #238). check = alexIndexInt16OffAddr alex_check offset
@@ -732,7 +738,7 @@ -
pp :: FilePath -> IO [FilePath] +
pp dir = (map (dir </>) . filter not_sub . concat) new_s = if GTE(offset,0#) && EQ(check,ord_c)
<$> for knownExtrasHandlers then alexIndexInt16OffAddr alex_table offset
- (withLexicalCallStack (\f -> f dir)) else alexIndexInt16OffAddr alex_deflt s
+ (withLexicalCallStack (\f -> f dir) . unWrapPPE) diff --git a/Distribution/Simple/Utils.hs b/Distribution/Simple/Utils.hs
-- TODO: This is a terrible hack to work around #3545 while we don't index 871a3e9..d2f45d8 100644
-- reorganize the directory layout. Basically, for the main --- a/Distribution/Simple/Utils.hs
-- library, we might accidentally pick up autogenerated sources for +++ b/Distribution/Simple/Utils.hs
@@ -1360,7 +1360,7 @@ withTempFileEx opts tmpDir template action =
(\(name, handle) -> do hClose handle
unless (optKeepTempFiles opts) $
handleDoesNotExist () . removeFile $ name)
- (withLexicalCallStack (uncurry action))
+ (withLexicalCallStack (\x -> uncurry action x))
-- | Create and use a temporary directory.
--
@@ -1375,7 +1375,7 @@ withTempFileEx opts tmpDir template action =
withTempDirectory :: Verbosity -> FilePath -> String -> (FilePath -> IO a) -> IO a
withTempDirectory verbosity targetDir template f = withFrozenCallStack $
withTempDirectoryEx verbosity defaultTempFileOptions targetDir template
- (withLexicalCallStack f)
+ (withLexicalCallStack (\x -> f x))
-- | A version of 'withTempDirectory' that additionally takes a
-- 'TempFileOptions' argument.
@@ -1386,7 +1386,7 @@ withTempDirectoryEx _verbosity opts targetDir template f = withFrozenCallStack $
(createTempDirectory targetDir template)
(unless (optKeepTempFiles opts)
. handleDoesNotExist () . removeDirectoryRecursive)
- (withLexicalCallStack f)
+ (withLexicalCallStack (\x -> f x))
-----------------------------------
-- Safely reading and writing files
diff --git a/Distribution/Compat/Prelude.hs b/Distribution/Compat/Prelude.hs
index c3bc040..166e58d 100644
--- a/Distribution/Compat/Prelude.hs
+++ b/Distribution/Compat/Prelude.hs
@@ -158,7 +158,7 @@ import qualified Text.PrettyPrint as Disp
import qualified Prelude as OrigPrelude
import Distribution.Compat.Stack
-type IO a = WithCallStack (OrigPrelude.IO a)
+type IO a = OrigPrelude.IO a
type NoCallStackIO a = OrigPrelude.IO a
-- | New name for 'Text.PrettyPrint.<>'
diff --git a/Distribution/FieldGrammar/FieldDescrs.hs b/Distribution/FieldGrammar/FieldDescrs.hs
index b1d23db..82e58e6 100644
--- a/Distribution/FieldGrammar/FieldDescrs.hs
+++ b/Distribution/FieldGrammar/FieldDescrs.hs
@@ -45,7 +45,7 @@ fieldDescrPretty (F m) fn = pPretty <$> Map.lookup fn m
-- | Lookup a field value parser.
fieldDescrParse :: P.CabalParsing m => FieldDescrs s a -> P.FieldName -> Maybe (s -> m s)
-fieldDescrParse (F m) fn = pParse <$> Map.lookup fn m
+fieldDescrParse (F m) fn = (\f -> pParse f) <$> Map.lookup fn m
fieldDescrsToList
:: P.CabalParsing m
diff --git a/Distribution/Fields/Lexer.hs b/Distribution/Fields/Lexer.hs
index 9116ce3..169c676 100644
--- a/Distribution/Fields/Lexer.hs
+++ b/Distribution/Fields/Lexer.hs
@@ -317,35 +317,35 @@ alex_action_0 = \_ len _ -> do
when (len /= 0) $ addWarning LexWarningBOM
setStartCode bol_section
lexToken
-
-alex_action_1 = \_pos len inp -> checkWhitespace len inp >> adjustPos retPos >> lexToken
+
+alex_action_1 = \_pos len inp -> checkWhitespace len inp >> adjustPos retPos >> lexToken
alex_action_3 = \pos len inp -> checkLeadingWhitespace len inp >>
if B.length inp == len
then return (L pos EOF)
else setStartCode in_section
- >> return (L pos (Indent len))
-alex_action_4 = tok OpenBrace
-alex_action_5 = tok CloseBrace
-alex_action_8 = toki TokSym
-alex_action_9 = \pos len inp -> return $! L pos (TokStr (B.take (len - 2) (B.tail inp)))
-alex_action_10 = toki TokOther
-alex_action_11 = toki TokOther
-alex_action_12 = tok Colon
-alex_action_13 = tok OpenBrace
-alex_action_14 = tok CloseBrace
-alex_action_15 = \_ _ _ -> adjustPos retPos >> setStartCode bol_section >> lexToken
+ >> return (L pos (Indent len))
+alex_action_4 = tok OpenBrace
+alex_action_5 = tok CloseBrace
+alex_action_8 = toki TokSym
+alex_action_9 = \pos len inp -> return $! L pos (TokStr (B.take (len - 2) (B.tail inp)))
+alex_action_10 = toki TokOther
+alex_action_11 = toki TokOther
+alex_action_12 = tok Colon
+alex_action_13 = tok OpenBrace
+alex_action_14 = tok CloseBrace
+alex_action_15 = \_ _ _ -> adjustPos retPos >> setStartCode bol_section >> lexToken
alex_action_16 = \pos len inp -> checkLeadingWhitespace len inp >>= \len' ->
if B.length inp == len
then return (L pos EOF)
else setStartCode in_field_layout
- >> return (L pos (Indent len'))
-alex_action_18 = toki TokFieldLine
-alex_action_19 = \_ _ _ -> adjustPos retPos >> setStartCode bol_field_layout >> lexToken
-alex_action_20 = \_ _ _ -> setStartCode in_field_braces >> lexToken
-alex_action_22 = toki TokFieldLine
-alex_action_23 = tok OpenBrace
-alex_action_24 = tok CloseBrace
-alex_action_25 = \_ _ _ -> adjustPos retPos >> setStartCode bol_field_braces >> lexToken
+ >> return (L pos (Indent len'))
+alex_action_18 = toki TokFieldLine
+alex_action_19 = \_ _ _ -> adjustPos retPos >> setStartCode bol_field_layout >> lexToken
+alex_action_20 = \_ _ _ -> setStartCode in_field_braces >> lexToken
+alex_action_22 = toki TokFieldLine
+alex_action_23 = tok OpenBrace
+alex_action_24 = tok CloseBrace
+alex_action_25 = \_ _ _ -> adjustPos retPos >> setStartCode bol_field_braces >> lexToken
{-# LINE 1 "templates/GenericTemplate.hs" #-}
-- -----------------------------------------------------------------------------
-- ALEX TEMPLATE
@@ -381,7 +381,10 @@ alexIndexInt16OffAddr (AlexA# arr) off =
low = int2Word# (ord# (indexCharOffAddr# arr off'))
off' = off *# 2#
#else
- indexInt16OffAddr# arr off
+#if __GLASGOW_HASKELL__ >= 901
+ int16ToInt#
+#endif
+ (indexInt16OffAddr# arr off)
#endif
{-# INLINE alexIndexInt32OffAddr #-}
@@ -398,7 +401,10 @@ alexIndexInt32OffAddr (AlexA# arr) off =
b0 = int2Word# (ord# (indexCharOffAddr# arr off'))
off' = off *# 4#
#else
- indexInt32OffAddr# arr off
+#if __GLASGOW_HASKELL__ >= 901
+ int32ToInt#
+#endif
+ (indexInt32OffAddr# arr off)
#endif
#if __GLASGOW_HASKELL__ < 503
diff --git a/Distribution/Simple/Utils.hs b/Distribution/Simple/Utils.hs
index 12eb4ad..8efd8a7 100644
--- a/Distribution/Simple/Utils.hs
+++ b/Distribution/Simple/Utils.hs
@@ -1338,7 +1338,7 @@ withTempFileEx opts tmpDir template action =
(\(name, handle) -> do hClose handle
unless (optKeepTempFiles opts) $
handleDoesNotExist () . removeFile $ name)
- (withLexicalCallStack (uncurry action))
+ (withLexicalCallStack (\x -> uncurry action x))
-- | Create and use a temporary directory.
--
@@ -1353,7 +1353,7 @@ withTempFileEx opts tmpDir template action =
withTempDirectory :: Verbosity -> FilePath -> String -> (FilePath -> IO a) -> IO a
withTempDirectory verbosity targetDir template f = withFrozenCallStack $
withTempDirectoryEx verbosity defaultTempFileOptions targetDir template
- (withLexicalCallStack f)
+ (withLexicalCallStack (\x -> f x))
-- | A version of 'withTempDirectory' that additionally takes a
-- 'TempFileOptions' argument.
@@ -1364,7 +1364,7 @@ withTempDirectoryEx _verbosity opts targetDir template f = withFrozenCallStack $
(createTempDirectory targetDir template)
(unless (optKeepTempFiles opts)
. handleDoesNotExist () . removeDirectoryRecursive)
- (withLexicalCallStack f)
+ (withLexicalCallStack (\x -> f x))
-----------------------------------
-- Safely reading and writing files
diff --git a/Distribution/Compat/Prelude.hs b/Distribution/Compat/Prelude.hs
index 0cca7db..ffa7e84 100644
--- a/Distribution/Compat/Prelude.hs
+++ b/Distribution/Compat/Prelude.hs
@@ -141,7 +141,7 @@ import Data.Data (Data)
import Distribution.Compat.Typeable (Typeable, TypeRep, typeRep)
import Distribution.Compat.Binary (Binary (..))
import Distribution.Compat.Semigroup (Semigroup (..), gmappend, gmempty)
-import GHC.Generics (Generic, Rep(..),
+import GHC.Generics (Generic(..), Rep,
V1, U1(U1), K1(unK1), M1(unM1),
(:*:)((:*:)), (:+:)(L1,R1))
@@ -170,7 +170,7 @@ import Distribution.Compat.Stack
import Distribution.Utils.Structured (Structured)
-type IO a = WithCallStack (OrigPrelude.IO a)
+type IO a = OrigPrelude.IO a
type NoCallStackIO a = OrigPrelude.IO a
-- | New name for 'Text.PrettyPrint.<>'
diff --git a/Distribution/FieldGrammar/FieldDescrs.hs b/Distribution/FieldGrammar/FieldDescrs.hs
index 803ce60..f58a918 100644
--- a/Distribution/FieldGrammar/FieldDescrs.hs
+++ b/Distribution/FieldGrammar/FieldDescrs.hs
@@ -45,7 +45,7 @@ fieldDescrPretty (F m) fn = pPretty <$> Map.lookup fn m
-- | Lookup a field value parser.
fieldDescrParse :: P.CabalParsing m => FieldDescrs s a -> P.FieldName -> Maybe (s -> m s)
-fieldDescrParse (F m) fn = pParse <$> Map.lookup fn m
+fieldDescrParse (F m) fn = (\f -> pParse f) <$> Map.lookup fn m
fieldDescrsToList
:: P.CabalParsing m
diff --git a/Distribution/Fields/Lexer.hs b/Distribution/Fields/Lexer.hs
index 9116ce3..169c676 100644
--- a/Distribution/Fields/Lexer.hs
+++ b/Distribution/Fields/Lexer.hs
@@ -317,35 +317,35 @@ alex_action_0 = \_ len _ -> do
when (len /= 0) $ addWarning LexWarningBOM
setStartCode bol_section
lexToken
-
-alex_action_1 = \_pos len inp -> checkWhitespace len inp >> adjustPos retPos >> lexToken
+
+alex_action_1 = \_pos len inp -> checkWhitespace len inp >> adjustPos retPos >> lexToken
alex_action_3 = \pos len inp -> checkLeadingWhitespace len inp >>
if B.length inp == len
then return (L pos EOF)
else setStartCode in_section
- >> return (L pos (Indent len))
-alex_action_4 = tok OpenBrace
-alex_action_5 = tok CloseBrace
-alex_action_8 = toki TokSym
-alex_action_9 = \pos len inp -> return $! L pos (TokStr (B.take (len - 2) (B.tail inp)))
-alex_action_10 = toki TokOther
-alex_action_11 = toki TokOther
-alex_action_12 = tok Colon
-alex_action_13 = tok OpenBrace
-alex_action_14 = tok CloseBrace
-alex_action_15 = \_ _ _ -> adjustPos retPos >> setStartCode bol_section >> lexToken
+ >> return (L pos (Indent len))
+alex_action_4 = tok OpenBrace
+alex_action_5 = tok CloseBrace
+alex_action_8 = toki TokSym
+alex_action_9 = \pos len inp -> return $! L pos (TokStr (B.take (len - 2) (B.tail inp)))
+alex_action_10 = toki TokOther
+alex_action_11 = toki TokOther
+alex_action_12 = tok Colon
+alex_action_13 = tok OpenBrace
+alex_action_14 = tok CloseBrace
+alex_action_15 = \_ _ _ -> adjustPos retPos >> setStartCode bol_section >> lexToken
alex_action_16 = \pos len inp -> checkLeadingWhitespace len inp >>= \len' ->
if B.length inp == len
then return (L pos EOF)
else setStartCode in_field_layout
- >> return (L pos (Indent len'))
-alex_action_18 = toki TokFieldLine
-alex_action_19 = \_ _ _ -> adjustPos retPos >> setStartCode bol_field_layout >> lexToken
-alex_action_20 = \_ _ _ -> setStartCode in_field_braces >> lexToken
-alex_action_22 = toki TokFieldLine
-alex_action_23 = tok OpenBrace
-alex_action_24 = tok CloseBrace
-alex_action_25 = \_ _ _ -> adjustPos retPos >> setStartCode bol_field_braces >> lexToken
+ >> return (L pos (Indent len'))
+alex_action_18 = toki TokFieldLine
+alex_action_19 = \_ _ _ -> adjustPos retPos >> setStartCode bol_field_layout >> lexToken
+alex_action_20 = \_ _ _ -> setStartCode in_field_braces >> lexToken
+alex_action_22 = toki TokFieldLine
+alex_action_23 = tok OpenBrace
+alex_action_24 = tok CloseBrace
+alex_action_25 = \_ _ _ -> adjustPos retPos >> setStartCode bol_field_braces >> lexToken
{-# LINE 1 "templates/GenericTemplate.hs" #-}
-- -----------------------------------------------------------------------------
-- ALEX TEMPLATE
@@ -381,7 +381,10 @@ alexIndexInt16OffAddr (AlexA# arr) off =
low = int2Word# (ord# (indexCharOffAddr# arr off'))
off' = off *# 2#
#else
- indexInt16OffAddr# arr off
+#if __GLASGOW_HASKELL__ >= 901
+ int16ToInt#
+#endif
+ (indexInt16OffAddr# arr off)
#endif
{-# INLINE alexIndexInt32OffAddr #-}
@@ -398,7 +401,10 @@ alexIndexInt32OffAddr (AlexA# arr) off =
b0 = int2Word# (ord# (indexCharOffAddr# arr off'))
off' = off *# 4#
#else
- indexInt32OffAddr# arr off
+#if __GLASGOW_HASKELL__ >= 901
+ int32ToInt#
+#endif
+ (indexInt32OffAddr# arr off)
#endif
#if __GLASGOW_HASKELL__ < 503
diff --git a/Distribution/Simple/Utils.hs b/Distribution/Simple/Utils.hs
index ccc35f5..aea1c5a 100644
--- a/Distribution/Simple/Utils.hs
+++ b/Distribution/Simple/Utils.hs
@@ -799,7 +799,7 @@ createProcessWithEnv verbosity path args mcwd menv inp out err = withFrozenCallS
--
-- The output is assumed to be text in the locale encoding.
--
-rawSystemStdout :: forall mode. KnownIODataMode mode => Verbosity -> FilePath -> [String] -> IO mode
+rawSystemStdout :: forall mode. KnownIODataMode mode => Verbosity -> FilePath -> [String] -> IO mode
rawSystemStdout verbosity path args = withFrozenCallStack $ do
(output, errors, exitCode) <- rawSystemStdInOut verbosity path args
Nothing Nothing Nothing (IOData.iodataMode :: IODataMode mode)
@@ -1341,7 +1341,7 @@ withTempFileEx opts tmpDir template action =
(\(name, handle) -> do hClose handle
unless (optKeepTempFiles opts) $
handleDoesNotExist () . removeFile $ name)
- (withLexicalCallStack (uncurry action))
+ (withLexicalCallStack (\x -> uncurry action x))
-- | Create and use a temporary directory.
--
@@ -1356,7 +1356,7 @@ withTempFileEx opts tmpDir template action =
withTempDirectory :: Verbosity -> FilePath -> String -> (FilePath -> IO a) -> IO a
withTempDirectory verbosity targetDir template f = withFrozenCallStack $
withTempDirectoryEx verbosity defaultTempFileOptions targetDir template
- (withLexicalCallStack f)
+ (withLexicalCallStack (\x -> f x))
-- | A version of 'withTempDirectory' that additionally takes a
-- 'TempFileOptions' argument.
@@ -1367,7 +1367,7 @@ withTempDirectoryEx _verbosity opts targetDir template f = withFrozenCallStack $
(createTempDirectory targetDir template)
(unless (optKeepTempFiles opts)
. handleDoesNotExist () . removeDirectoryRecursive)
- (withLexicalCallStack f)
+ (withLexicalCallStack (\x -> f x))
-----------------------------------
-- Safely reading and writing files
diff --git a/Distribution/Utils/Structured.hs b/Distribution/Utils/Structured.hs
index 37f7d2e..480b8e4 100644
--- a/Distribution/Utils/Structured.hs
+++ b/Distribution/Utils/Structured.hs
@@ -87,7 +87,7 @@ import GHC.Generics
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as LBS
-import qualified Data.ByteString.Lazy.Builder as Builder
+import qualified Data.ByteString.Builder as Builder
import qualified Data.IntMap as IM
import qualified Data.IntSet as IS
import qualified Data.Map as Map
diff --git a/src/Distribution/Compat/Prelude.hs b/src/Distribution/Compat/Prelude.hs
index 954714d..f148471 100644
--- a/src/Distribution/Compat/Prelude.hs
+++ b/src/Distribution/Compat/Prelude.hs
@@ -186,7 +186,7 @@ import Data.Word (Word, Word16, Word32, Word64, Word8)
import Distribution.Compat.Binary (Binary (..))
import Distribution.Compat.Semigroup (Semigroup (..), gmappend, gmempty)
import Distribution.Compat.Typeable (TypeRep, Typeable, typeRep)
-import GHC.Generics ((:*:) ((:*:)), (:+:) (L1, R1), Generic, K1 (unK1), M1 (unM1), Rep (..), U1 (U1), V1)
+import GHC.Generics ((:*:) ((:*:)), (:+:) (L1, R1), Generic (..), K1 (unK1), M1 (unM1), Rep, U1 (U1), V1)
import System.Exit (ExitCode (..), exitFailure, exitSuccess, exitWith)
import Text.Read (readMaybe)
diff -ru EdisonAPI-1.3.1.orig/src/Data/Edison/Seq/ListSeq.hs EdisonAPI-1.3.1/src/Data/Edison/Seq/ListSeq.hs
--- EdisonAPI-1.3.1.orig/src/Data/Edison/Seq/ListSeq.hs 2016-06-03 00:49:51.000000000 -0400
+++ EdisonAPI-1.3.1/src/Data/Edison/Seq/ListSeq.hs 2019-04-19 13:54:07.461113622 -0400
@@ -131,25 +131,25 @@
rcons x s = s ++ [x]
append = (++)
-lview [] = fail "ListSeq.lview: empty sequence"
+lview [] = error "ListSeq.lview: empty sequence"
lview (x:xs) = return (x, xs)
-lheadM [] = fail "ListSeq.lheadM: empty sequence"
+lheadM [] = error "ListSeq.lheadM: empty sequence"
lheadM (x:xs) = return x
lhead [] = error "ListSeq.lhead: empty sequence"
lhead (x:xs) = x
-ltailM [] = fail "ListSeq.ltailM: empty sequence"
+ltailM [] = error "ListSeq.ltailM: empty sequence"
ltailM (x:xs) = return xs
ltail [] = error "ListSeq.ltail: empty sequence"
ltail (x:xs) = xs
-rview [] = fail "ListSeq.rview: empty sequence"
+rview [] = error "ListSeq.rview: empty sequence"
rview xs = return (rhead xs, rtail xs)
-rheadM [] = fail "ListSeq.rheadM: empty sequence"
+rheadM [] = error "ListSeq.rheadM: empty sequence"
rheadM (x:xs) = rh x xs
where rh y [] = return y
rh y (x:xs) = rh x xs
@@ -159,7 +159,7 @@
where rh y [] = y
rh y (x:xs) = rh x xs
-rtailM [] = fail "ListSeq.rtailM: empty sequence"
+rtailM [] = error "ListSeq.rtailM: empty sequence"
rtailM (x:xs) = return (rt x xs)
where rt y [] = []
rt y (x:xs) = y : rt x xs
@@ -255,9 +255,9 @@
lookup i xs = ID.runIdentity (lookupM i xs)
lookupM i xs
- | i < 0 = fail "ListSeq.lookup: not found"
+ | i < 0 = error "ListSeq.lookup: not found"
| otherwise = case drop i xs of
- [] -> fail "ListSeq.lookup: not found"
+ [] -> error "ListSeq.lookup: not found"
(x:_) -> return x
lookupWithDefault d i xs
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Assoc/AssocList.hs EdisonCore-1.3.2.1/src/Data/Edison/Assoc/AssocList.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Assoc/AssocList.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Assoc/AssocList.hs 2019-04-19 14:27:30.278406081 -0400
@@ -311,7 +311,7 @@
lookup key m = runIdentity (lookupM key m)
-lookupM _ E = fail "AssocList.lookup: lookup failed"
+lookupM _ E = error "AssocList.lookup: lookup failed"
lookupM key (I k x m) | key == k = return x
| otherwise = lookupM key m
@@ -321,7 +321,7 @@
lookupAndDelete key m = runIdentity (lookupAndDeleteM key m)
-lookupAndDeleteM _ E = fail "AssocList.lookupAndDeleteM: lookup failed"
+lookupAndDeleteM _ E = error "AssocList.lookupAndDeleteM: lookup failed"
lookupAndDeleteM key (I k x m)
| key == k = return (x,delete k m)
| otherwise = lookupAndDeleteM key m >>=
@@ -424,7 +424,7 @@
| k > k0 = findMax k a (delete k m)
| otherwise = findMax k0 a0 (delete k m)
-minView E = fail (moduleName++".minView: empty map")
+minView E = error (moduleName++".minView: empty map")
minView n@(I k a m) = let (k',x) = findMin k a m in return (x,delete k' n)
minElem E = error (moduleName++".minElem: empty map")
@@ -435,7 +435,7 @@
unsafeInsertMin = insert
-maxView E = fail (moduleName++".maxView: empty map")
+maxView E = error (moduleName++".maxView: empty map")
maxView n@(I k a m) = let (k',x) = findMax k a m in return (x,delete k' n)
maxElem E = error (moduleName++".maxElem: empty map")
@@ -482,13 +482,13 @@
partitionLE_GT k = spanFM (<=k) . mergeSortFM
partitionLT_GT k = (\(x,y) -> (x,delete k y)) . spanFM (<k) . mergeSortFM
-minViewWithKey E = fail $ moduleName++".minViewWithKey: empty map"
+minViewWithKey E = error $ moduleName++".minViewWithKey: empty map"
minViewWithKey n@(I k a m) = let (k',x) = findMin k a m in return ((k',x),delete k' n)
minElemWithKey E = error $ moduleName++".minElemWithKey: empty map"
minElemWithKey (I k a m) = findMin k a m
-maxViewWithKey E = fail $ moduleName++".maxViewWithKey: empty map"
+maxViewWithKey E = error $ moduleName++".maxViewWithKey: empty map"
maxViewWithKey n@(I k a m) = let (k',x) = findMax k a m in return ((k',x),delete k' n)
maxElemWithKey E = error $ moduleName++".maxElemWithKey: empty map"
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Assoc/Defaults.hs EdisonCore-1.3.2.1/src/Data/Edison/Assoc/Defaults.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Assoc/Defaults.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Assoc/Defaults.hs 2019-04-19 14:19:15.118124131 -0400
@@ -193,7 +193,7 @@
lookupAndDeleteMDefault :: (Monad rm, AssocX m k) => k -> m a -> rm (a, m a)
lookupAndDeleteMDefault k m =
case lookupM k m of
- Nothing -> fail (instanceName m ++ ".lookupAndDelete: lookup failed")
+ Nothing -> error (instanceName m ++ ".lookupAndDelete: lookup failed")
Just x -> return (x, delete k m)
lookupAndDeleteAllDefault :: (S.Sequence seq, AssocX m k) => k -> m a -> (seq a,m a)
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Assoc/PatriciaLoMap.hs EdisonCore-1.3.2.1/src/Data/Edison/Assoc/PatriciaLoMap.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Assoc/PatriciaLoMap.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Assoc/PatriciaLoMap.hs 2019-04-19 14:26:19.237793376 -0400
@@ -213,10 +213,10 @@
lookup k m = runIdentity (lookupM k m)
lookupM :: (Monad rm) => Int -> FM a -> rm a
-lookupM _ E = fail "PatriciaLoMap.lookup: lookup failed"
+lookupM _ E = error "PatriciaLoMap.lookup: lookup failed"
lookupM k (L j x)
| j == k = return x
- | otherwise = fail "PatriciaLoMap.lookup: lookup failed"
+ | otherwise = error "PatriciaLoMap.lookup: lookup failed"
lookupM k (B _ m t0 t1) = if zeroBit k m then lookupM k t0 else lookupM k t1
doLookupAndDelete :: z -> (a -> FM a -> z) -> Int -> FM a -> z
@@ -235,7 +235,7 @@
lookupAndDeleteM :: Monad m => Int -> FM a -> m (a, FM a)
lookupAndDeleteM = doLookupAndDelete
- (fail "PatriciaLoMap.lookupAndDelete: lookup failed")
+ (error "PatriciaLoMap.lookupAndDelete: lookup failed")
(\x m -> return (x,m))
lookupAndDeleteAll :: S.Sequence seq => Int -> FM a -> (seq a,FM a)
@@ -586,25 +586,25 @@
minView :: Monad m => FM a -> m (a, FM a)
minView fm =
case ordListFM fm of
- [] -> fail $ moduleName++".minView: empty map"
+ [] -> error $ moduleName++".minView: empty map"
((k,x):_) -> return (x,delete k fm)
minViewWithKey :: Monad m => FM a -> m ((Int, a), FM a)
minViewWithKey fm =
case ordListFM fm of
- [] -> fail $ moduleName++".minViewWithKey: empty map"
+ [] -> error $ moduleName++".minViewWithKey: empty map"
((k,x):_) -> return ((k,x),delete k fm)
maxView :: Monad m => FM a -> m (a, FM a)
maxView fm =
case ordListFM_rev fm of
- [] -> fail $ moduleName++".maxView: empty map"
+ [] -> error $ moduleName++".maxView: empty map"
((k,x):_) -> return (x,delete k fm)
maxViewWithKey :: Monad m => FM a -> m ((Int, a), FM a)
maxViewWithKey fm =
case ordListFM_rev fm of
- [] -> fail $ moduleName++".maxViewWithKey: empty map"
+ [] -> error $ moduleName++".maxViewWithKey: empty map"
((k,x):_) -> return ((k,x),delete k fm)
minElem :: FM a -> a
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Assoc/StandardMap.hs EdisonCore-1.3.2.1/src/Data/Edison/Assoc/StandardMap.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Assoc/StandardMap.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Assoc/StandardMap.hs 2019-04-19 14:25:37.089429664 -0400
@@ -199,7 +199,7 @@
member = DM.member
count = countUsingMember
lookup k m = maybe (error (moduleName ++ ".lookup: failed")) id (DM.lookup k m)
-lookupM k m = maybe (fail (moduleName ++ ".lookupM: failed")) return (DM.lookup k m)
+lookupM k m = maybe (error (moduleName ++ ".lookupM: failed")) return (DM.lookup k m)
lookupAll = lookupAllUsingLookupM
lookupWithDefault = DM.findWithDefault
lookupAndDelete = lookupAndDeleteDefault
@@ -223,14 +223,14 @@
elements = elementsUsingFold
minView m = if DM.null m
- then fail (moduleName ++ ".minView: failed")
+ then error (moduleName ++ ".minView: failed")
else let ((_,x),m') = DM.deleteFindMin m
in return (x,m')
minElem = snd . DM.findMin
deleteMin = DM.deleteMin
unsafeInsertMin = DM.insert
maxView m = if DM.null m
- then fail (moduleName ++ ".maxView: failed")
+ then error (moduleName ++ ".maxView: failed")
else let ((_,x),m') = DM.deleteFindMax m
in return (x,m')
maxElem = snd . DM.findMax
@@ -283,11 +283,11 @@
partitionWithKey = DM.partitionWithKey
minViewWithKey m = if DM.null m
- then fail (moduleName ++ ".minViewWithKey: failed")
+ then error (moduleName ++ ".minViewWithKey: failed")
else return (DM.deleteFindMin m)
minElemWithKey = DM.findMin
maxViewWithKey m = if DM.null m
- then fail (moduleName ++ ".maxViewWithKey: failed")
+ then error (moduleName ++ ".maxViewWithKey: failed")
else return (DM.deleteFindMax m)
maxElemWithKey = DM.findMax
foldrWithKey = DM.foldrWithKey
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Assoc/TernaryTrie.hs EdisonCore-1.3.2.1/src/Data/Edison/Assoc/TernaryTrie.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Assoc/TernaryTrie.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Assoc/TernaryTrie.hs 2019-04-19 14:20:46.006912560 -0400
@@ -530,12 +530,12 @@
lookup m k = runIdentity (lookupM m k)
lookupM [] (FM Nothing _)
- = fail "TernaryTrie.lookup: lookup failed"
+ = error "TernaryTrie.lookup: lookup failed"
lookupM [] (FM (Just v) _)
= return v
lookupM xs (FM _ fmb)
= case lookupFMB xs fmb of
- Nothing -> fail "TernaryTrie.lookup: lookup failed"
+ Nothing -> error "TernaryTrie.lookup: lookup failed"
Just v -> return v
lookupAll = lookupAllUsingLookupM
@@ -547,7 +547,7 @@
lookupAndDeleteM =
lookupAndDelFromFM
- (fail "TernaryTrie.lookupAndDeleteM: lookup failed")
+ (error "TernaryTrie.lookupAndDeleteM: lookup failed")
(\w m -> return (w,m))
lookupAndDeleteAll k m =
@@ -855,7 +855,7 @@
-- OrdAssocX
minViewFMB :: Monad m => FMB k a -> (FMB k a -> FM k a) -> m (a, FM k a)
-minViewFMB E _ = fail $ moduleName++".minView: empty map"
+minViewFMB E _ = error $ moduleName++".minView: empty map"
minViewFMB (I i k (Just v) E m r) f = return (v, f (I i k Nothing E m r))
minViewFMB (I _ _ Nothing E (FMB' E) _) _ = error $ moduleName++".minView: bug!"
minViewFMB (I _ k Nothing E (FMB' m) r) f = minViewFMB m (\m' -> f (mkVBalancedFMB k Nothing E (FMB' m') r))
@@ -866,7 +866,7 @@
minView (FM Nothing fmb) = minViewFMB fmb (FM Nothing)
minViewWithKeyFMB :: Monad m => FMB k a -> ([k] -> [k]) -> (FMB k a -> FM k a) -> m (([k],a),FM k a)
-minViewWithKeyFMB E _ _ = fail $ moduleName++".minView: empty map"
+minViewWithKeyFMB E _ _ = error $ moduleName++".minView: empty map"
minViewWithKeyFMB (I i k (Just v) E m r) kf f = return ((kf [k],v),f (I i k Nothing E m r))
minViewWithKeyFMB (I _ _ Nothing E (FMB' E) _) _ _ = error $ moduleName++".minViewWithKey: bug!"
minViewWithKeyFMB (I _ k Nothing E (FMB' m) r) kf f = minViewWithKeyFMB m (kf . (k:))
@@ -915,7 +915,7 @@
maxViewFMB E _ = error $ moduleName++".maxView: bug!"
maxView :: Monad m => FM k a -> m (a, FM k a)
-maxView (FM Nothing E) = fail $ moduleName++".maxView: empty map"
+maxView (FM Nothing E) = error $ moduleName++".maxView: empty map"
maxView (FM (Just v) E) = return (v,FM Nothing E)
maxView (FM mv fmb) = maxViewFMB fmb (FM mv)
@@ -931,7 +931,7 @@
maxViewWithKey :: Monad m => FM k a -> m (([k],a), FM k a)
-maxViewWithKey (FM Nothing E) = fail $ moduleName++".maxViewWithKey: empty map"
+maxViewWithKey (FM Nothing E) = error $ moduleName++".maxViewWithKey: empty map"
maxViewWithKey (FM (Just v) E) = return (([],v),FM Nothing E)
maxViewWithKey (FM mv fmb) = maxViewWithKeyFMB fmb id (FM mv)
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Coll/Defaults.hs EdisonCore-1.3.2.1/src/Data/Edison/Coll/Defaults.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Coll/Defaults.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Coll/Defaults.hs 2019-04-19 14:12:05.390426953 -0400
@@ -89,7 +89,7 @@
EQ -> return (x, y)
GT -> witness a ys
-- XXX
- witness _ _ = fail $ instanceName as ++ ".intersect: failed"
+ witness _ _ = error $ instanceName as ++ ".intersect: failed"
lookupUsingLookupM :: Coll c a => a -> c -> a
lookupUsingLookupM x ys = runIdentity (lookupM x ys)
@@ -104,7 +104,7 @@
lookupMUsingLookupAll x ys =
case lookupAll x ys of
(y:_) -> return y
- [] -> fail $ instanceName ys ++ ".lookupM: lookup failed"
+ [] -> error $ instanceName ys ++ ".lookupM: lookup failed"
lookupWithDefaultUsingLookupAll :: Coll c a => a -> a -> c -> a
lookupWithDefaultUsingLookupAll dflt x ys =
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Coll/EnumSet.hs EdisonCore-1.3.2.1/src/Data/Edison/Coll/EnumSet.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Coll/EnumSet.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Coll/EnumSet.hs 2019-04-19 14:18:03.381500731 -0400
@@ -254,7 +254,7 @@
lookupM :: (Eq a, Enum a, Monad m) => a -> Set a -> m a
lookupM x s
| member x s = return x
- | otherwise = fail (moduleName++".lookupM: lookup failed")
+ | otherwise = error (moduleName++".lookupM: lookup failed")
lookupAll :: (Eq a, Enum a, S.Sequence s) => a -> Set a -> s a
lookupAll = lookupAllUsingLookupM
@@ -342,12 +342,12 @@
minView :: (Enum a, Monad m) => Set a -> m (a, Set a)
minView (Set w)
- | w == 0 = fail (moduleName++".minView: empty set")
+ | w == 0 = error (moduleName++".minView: empty set")
| otherwise = let i = lsb w in return (toEnum i,Set $ clearBit w i)
maxView :: (Enum a, Monad m) => Set a -> m (a, Set a)
maxView (Set w)
- | w == 0 = fail (moduleName++".maxView: empty set")
+ | w == 0 = error (moduleName++".maxView: empty set")
| otherwise = let i = msb w in return (toEnum i, Set $ clearBit w i)
unsafeInsertMin :: (Ord a, Enum a) => a -> Set a -> Set a
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Coll/LazyPairingHeap.hs EdisonCore-1.3.2.1/src/Data/Edison/Coll/LazyPairingHeap.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Coll/LazyPairingHeap.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Coll/LazyPairingHeap.hs 2019-04-19 14:16:29.236692426 -0400
@@ -360,7 +360,7 @@
GT -> rest
minView :: (Ord a, Monad m) => Heap a -> m (a, Heap a)
-minView E = fail "LazyPairingHeap.minView: empty heap"
+minView E = error "LazyPairingHeap.minView: empty heap"
minView (H1 x xs) = return (x,xs)
minView (H2 x h xs) = return (x,union h xs)
@@ -370,7 +370,7 @@
minElem (H2 x _ _) = x
maxView :: (Ord a, Monad m) => Heap a -> m (a, Heap a)
-maxView E = fail "LazyPairingHeap.maxView: empty heap"
+maxView E = error "LazyPairingHeap.maxView: empty heap"
maxView xs = return (y,xs')
where (xs', y) = maxView' xs
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Coll/LeftistHeap.hs EdisonCore-1.3.2.1/src/Data/Edison/Coll/LeftistHeap.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Coll/LeftistHeap.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Coll/LeftistHeap.hs 2019-04-19 14:16:11.996544459 -0400
@@ -174,13 +174,13 @@
tol (L _ x a b) rest = S.lcons x (tol b (tol a rest))
lookupM :: (Ord a, Monad m) => a -> Heap a -> m a
-lookupM _ E = fail "LeftistHeap.lookupM: XXX"
+lookupM _ E = error "LeftistHeap.lookupM: XXX"
lookupM x (L _ y a b) =
case compare x y of
- LT -> fail "LeftistHeap.lookupM: XXX"
+ LT -> error "LeftistHeap.lookupM: XXX"
EQ -> return y
GT -> case lookupM x b `mplus` lookupM x a of
- Nothing -> fail "LeftistHeap.lookupM: XXX"
+ Nothing -> error "LeftistHeap.lookupM: XXX"
Just q -> return q
lookupAll :: (Ord a,S.Sequence seq) => a -> Heap a -> seq a
@@ -300,7 +300,7 @@
in (node x a' b', hs'')
minView :: (Ord a, Monad m) => Heap a -> m (a, Heap a)
-minView E = fail "LeftistHeap.minView: empty collection"
+minView E = error "LeftistHeap.minView: empty collection"
minView (L _ x a b) = return (x, union a b)
minElem :: Ord a => Heap a -> a
@@ -308,7 +308,7 @@
minElem (L _ x _ _) = x
maxView :: (Ord a, Monad m) => Heap a -> m (a, Heap a)
-maxView E = fail "LeftistHeap.maxView: empty collection"
+maxView E = error "LeftistHeap.maxView: empty collection"
maxView (L _ x E _) = return (x, E)
maxView (L _ x a E) = return (y, L 1 x a' E)
where Just (y,a') = maxView a
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Coll/MinHeap.hs EdisonCore-1.3.2.1/src/Data/Edison/Coll/MinHeap.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Coll/MinHeap.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Coll/MinHeap.hs 2019-04-19 14:14:14.447535351 -0400
@@ -201,7 +201,7 @@
lookupM x (M y ys)
| x > y = C.lookupM x ys
| x == y = return y
-lookupM _ _ = fail "lookupM.lookup: XXX"
+lookupM _ _ = error "lookupM.lookup: XXX"
lookupAll x (M y ys)
| x > y = C.lookupAll x ys
@@ -286,13 +286,13 @@
partitionLT_GT _ h = (E, h)
-minView E = fail "MinHeap.minView: empty heap"
+minView E = error "MinHeap.minView: empty heap"
minView (M x xs) = return (x, fromPrim xs)
minElem E = error "MinHeap.minElem: empty heap"
minElem (M x _) = x
-maxView E = fail "MinHeap.maxView: empty heap"
+maxView E = error "MinHeap.maxView: empty heap"
maxView (M x xs) = case C.maxView xs of
Nothing -> return (x, E)
Just (y,ys) -> return (y, M x ys)
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Coll/SkewHeap.hs EdisonCore-1.3.2.1/src/Data/Edison/Coll/SkewHeap.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Coll/SkewHeap.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Coll/SkewHeap.hs 2019-04-19 14:13:55.407371862 -0400
@@ -143,13 +143,13 @@
tol (T x a b) rest = S.lcons x (tol b (tol a rest))
lookupM :: (Ord a, Monad m) => a -> Heap a -> m a
-lookupM _ E = fail "SkewHeap.lookupM: XXX"
+lookupM _ E = error "SkewHeap.lookupM: XXX"
lookupM x (T y a b) =
case compare x y of
- LT -> fail "SkewHeap.lookupM: XXX"
+ LT -> error "SkewHeap.lookupM: XXX"
EQ -> return y
GT -> case lookupM x b `mplus` lookupM x a of
- Nothing -> fail "SkewHeap.lookupM: XXX"
+ Nothing -> error "SkewHeap.lookupM: XXX"
Just x -> return x
lookupAll :: (Ord a,S.Sequence seq) => a -> Heap a -> seq a
@@ -268,7 +268,7 @@
in (T x a' b', hs'')
minView :: (Ord a, Monad m) => Heap a -> m (a, Heap a)
-minView E = fail "SkewHeap.minView: empty heap"
+minView E = error "SkewHeap.minView: empty heap"
minView (T x a b) = return (x, union a b)
minElem :: Ord a => Heap a -> a
@@ -276,7 +276,7 @@
minElem (T x _ _) = x
maxView :: (Ord a, Monad m) => Heap a -> m (a, Heap a)
-maxView E = fail "SkewHeap.maxView: empty heap"
+maxView E = error "SkewHeap.maxView: empty heap"
maxView (T x E E) = return (x, E)
maxView (T x a E) = return (y, T x a' E)
where Just (y, a') = maxView a
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Coll/SplayHeap.hs EdisonCore-1.3.2.1/src/Data/Edison/Coll/SplayHeap.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Coll/SplayHeap.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Coll/SplayHeap.hs 2019-04-19 14:13:12.815006098 -0400
@@ -182,7 +182,7 @@
| x > y = lookup x b
| otherwise = y
-lookupM _ E = fail "SplayHeap.lookup: empty heap"
+lookupM _ E = error "SplayHeap.lookup: empty heap"
lookupM x (T a y b)
| x < y = lookupM x a
| x > y = lookupM x b
@@ -354,7 +354,7 @@
else (T a x (filterLT k ba), filterGT k bb)
else (filterLT k a, filterGT k b)
-minView E = fail "SplayHeap.minView: empty heap"
+minView E = error "SplayHeap.minView: empty heap"
minView (T a x b) = return (y, ys)
where (y,ys) = minv a x b
minv E x b = (x,b)
@@ -368,7 +368,7 @@
minel (T a x _) _ = minel a x
-maxView E = fail "SplayHeap.maxView: empty heap"
+maxView E = error "SplayHeap.maxView: empty heap"
maxView (T a x b) = return (y,ys)
where (ys,y) = maxv a x b
maxv a x E = (a,x)
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Coll/StandardSet.hs EdisonCore-1.3.2.1/src/Data/Edison/Coll/StandardSet.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Coll/StandardSet.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Coll/StandardSet.hs 2019-04-19 14:12:47.094785195 -0400
@@ -179,12 +179,12 @@
partitionLT_GT = DS.split
minView set = if DS.null set
- then fail (moduleName ++ ".minView: failed")
+ then error (moduleName ++ ".minView: failed")
else return (DS.deleteFindMin set)
minElem = DS.findMin
maxView set = if DS.null set
- then fail (moduleName ++ ".maxView: failed")
+ then error (moduleName ++ ".maxView: failed")
else return (DS.deleteFindMax set)
maxElem = DS.findMax
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Coll/UnbalancedSet.hs EdisonCore-1.3.2.1/src/Data/Edison/Coll/UnbalancedSet.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Coll/UnbalancedSet.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Coll/UnbalancedSet.hs 2019-04-19 14:12:31.738653293 -0400
@@ -179,7 +179,7 @@
EQ -> True
GT -> member x b
-lookupM _ E = fail "UnbalancedSet.lookupM: XXX"
+lookupM _ E = error "UnbalancedSet.lookupM: XXX"
lookupM x (T a y b) =
case compare x y of
LT -> lookupM x a
@@ -276,7 +276,7 @@
GT -> (a0,T a1 x b)
where (a0,a1) = partitionLT_GT y a
-minView E = fail "UnbalancedSet.minView: empty collection"
+minView E = error "UnbalancedSet.minView: empty collection"
minView (T E x b) = return (x, b)
minView (T a x b) = return (y, T a' x b)
where Just (y,a') = minView a
@@ -285,7 +285,7 @@
minElem (T E x _) = x
minElem (T a _ _) = minElem a
-maxView E = fail "UnbalancedSet.maxView: empty collection"
+maxView E = error "UnbalancedSet.maxView: empty collection"
maxView (T a x E) = return (x, a)
maxView (T a x b) = return (y, T a x b')
where Just (y, b') = maxView b
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Concrete/FingerTree.hs EdisonCore-1.3.2.1/src/Data/Edison/Concrete/FingerTree.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Concrete/FingerTree.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Concrete/FingerTree.hs 2019-04-19 14:08:25.368535687 -0400
@@ -335,7 +335,7 @@
-- | /O(1)/. Analyse the left end of a sequence.
lview :: (Measured v a, Monad m) => FingerTree v a -> m (a,FingerTree v a)
-lview Empty = fail "FingerTree.lview: empty tree"
+lview Empty = error "FingerTree.lview: empty tree"
lview (Single x) = return (x, Empty)
lview (Deep _ (One x) m sf) = return . (,) x $
case lview m of
@@ -358,7 +358,7 @@
-- | /O(1)/. Analyse the right end of a sequence.
rview :: (Measured v a, Monad m) => FingerTree v a -> m (a, FingerTree v a)
-rview Empty = fail "FingerTree.rview: empty tree"
+rview Empty = error "FingerTree.rview: empty tree"
rview (Single x) = return (x, Empty)
rview (Deep _ pr m (One x)) = return . (,) x $
case rview m of
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Seq/BankersQueue.hs EdisonCore-1.3.2.1/src/Data/Edison/Seq/BankersQueue.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Seq/BankersQueue.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Seq/BankersQueue.hs 2019-04-19 14:11:34.886164882 -0400
@@ -161,25 +161,25 @@
append (Q i1 xs1 ys1 j1) (Q i2 xs2 ys2 j2) =
Q (i1 + j1 + i2) (xs1 ++ L.reverseOnto ys1 xs2) ys2 j2
-lview (Q _ [] _ _) = fail "BankersQueue.lview: empty sequence"
+lview (Q _ [] _ _) = error "BankersQueue.lview: empty sequence"
lview (Q i (x:xs) ys j) = return (x, makeQ (i-1) xs ys j)
lhead (Q _ [] _ _) = error "BankersQueue.lhead: empty sequence"
lhead (Q _ (x:_) _ _) = x
-lheadM (Q _ [] _ _) = fail "BankersQueue.lheadM: empty sequence"
+lheadM (Q _ [] _ _) = error "BankersQueue.lheadM: empty sequence"
lheadM (Q _ (x:_) _ _) = return x
ltail (Q i (_:xs) ys j) = makeQ (i-1) xs ys j
ltail _ = error "BankersQueue.ltail: empty sequence"
ltailM (Q i (_:xs) ys j) = return (makeQ (i-1) xs ys j)
-ltailM _ = fail "BankersQueue.ltail: empty sequence"
+ltailM _ = error "BankersQueue.ltail: empty sequence"
rview (Q i xs (y:ys) j) = return (y, Q i xs ys (j-1))
rview (Q i xs [] _) =
case L.rview xs of
- Nothing -> fail "BankersQueue.rview: empty sequence"
+ Nothing -> error "BankersQueue.rview: empty sequence"
Just (x,xs') -> return (x, Q (i-1) xs' [] 0)
rhead (Q _ _ (y:_) _) = y
@@ -187,7 +187,7 @@
rhead (Q _ xs [] _) = L.rhead xs
rheadM (Q _ _ (y:_) _) = return y
-rheadM (Q _ [] [] _) = fail "BankersQueue.rheadM: empty sequence"
+rheadM (Q _ [] [] _) = error "BankersQueue.rheadM: empty sequence"
rheadM (Q _ xs [] _) = return (L.rhead xs)
rtail (Q i xs (_:ys) j) = Q i xs ys (j-1)
@@ -195,7 +195,7 @@
rtail (Q i xs [] _) = Q (i-1) (L.rtail xs) [] 0
rtailM (Q i xs (_:ys) j) = return (Q i xs ys (j-1))
-rtailM (Q _ [] [] _) = fail "BankersQueue.rtailM: empty sequence"
+rtailM (Q _ [] [] _) = error "BankersQueue.rtailM: empty sequence"
rtailM (Q i xs [] _) = return (Q (i-1) (L.rtail xs) [] 0)
null (Q i _ _ _) = (i == 0)
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Seq/BinaryRandList.hs EdisonCore-1.3.2.1/src/Data/Edison/Seq/BinaryRandList.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Seq/BinaryRandList.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Seq/BinaryRandList.hs 2019-04-19 14:10:54.933821577 -0400
@@ -181,7 +181,7 @@
| n == 0 = E
| otherwise = Even (cp (half n) (x,x))
-lview E = fail "BinaryRandList.lview: empty sequence"
+lview E = error "BinaryRandList.lview: empty sequence"
lview (Even ps) = case lview ps of
Just ((x,y), ps') -> return (x, Odd y ps')
Nothing -> error "BinaryRandList.lview: bug!"
@@ -191,7 +191,7 @@
lhead (Even ps) = fst (lhead ps)
lhead (Odd x _) = x
-lheadM E = fail "BinaryRandList.lheadM: empty sequence"
+lheadM E = error "BinaryRandList.lheadM: empty sequence"
lheadM (Even ps) = return (fst (lhead ps))
lheadM (Odd x _) = return (x)
@@ -201,7 +201,7 @@
Nothing -> error "BinaryRandList.ltail: bug!"
ltail (Odd _ ps) = mkEven ps
-ltailM E = fail "BinaryRandList.ltailM: empty sequence"
+ltailM E = error "BinaryRandList.ltailM: empty sequence"
ltailM (Even ps) = case lview ps of
Just ((_,y), ps') -> return (Odd y ps')
Nothing -> error "BinaryRandList.ltailM: bug!"
@@ -212,7 +212,7 @@
rhead (Odd x E) = x
rhead (Odd _ ps) = snd (rhead ps)
-rheadM E = fail "BinaryRandList.rheadM: empty sequence"
+rheadM E = error "BinaryRandList.rheadM: empty sequence"
rheadM (Even ps) = return (snd (rhead ps))
rheadM (Odd x E) = return x
rheadM (Odd _ ps) = return (snd (rhead ps))
@@ -270,10 +270,10 @@
lookup i xs = runIdentity (lookupM i xs)
lookupM i xs
- | i < 0 = fail "BinaryRandList.lookup: bad subscript"
+ | i < 0 = error "BinaryRandList.lookup: bad subscript"
| otherwise = lookFun nothing xs i return
where
- nothing = fail "BinaryRandList.lookup: not found"
+ nothing = error "BinaryRandList.lookup: not found"
lookupWithDefault d i xs
| i < 0 = d
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Seq/BraunSeq.hs EdisonCore-1.3.2.1/src/Data/Edison/Seq/BraunSeq.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Seq/BraunSeq.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Seq/BraunSeq.hs 2019-04-19 14:10:16.849494254 -0400
@@ -193,7 +193,7 @@
app _ _ _ = error "BraunSeq.append: bug!"
-- how does it compare to converting to/from lists?
-lview E = fail "BraunSeq.lview: empty sequence"
+lview E = error "BraunSeq.lview: empty sequence"
lview (B x a b) = return (x, combine a b)
-- not exported
@@ -204,13 +204,13 @@
lhead E = error "BraunSeq.lhead: empty sequence"
lhead (B x _ _) = x
-lheadM E = fail "BraunSeq.lheadM: empty sequence"
+lheadM E = error "BraunSeq.lheadM: empty sequence"
lheadM (B x _ _) = return x
ltail E = error "BraunSeq.ltail: empty sequence"
ltail (B _ a b) = combine a b
-ltailM E = fail "BraunSeq.ltailM: empty sequence"
+ltailM E = error "BraunSeq.ltailM: empty sequence"
ltailM (B _ a b) = return (combine a b)
-- not exported
@@ -222,20 +222,20 @@
| otherwise = B x a (delAt (half i - 1) b)
delAt _ _ = error "BraunSeq.delAt: bug. Impossible case!"
-rview E = fail "BraunSeq.rview: empty sequence"
+rview E = error "BraunSeq.rview: empty sequence"
rview xs = return (lookup m xs, delAt m xs)
where m = size xs - 1
rhead E = error "BraunSeq.rhead: empty sequence"
rhead xs = lookup (size xs - 1) xs
-rheadM E = fail "BraunSeq.rheadM: empty sequence"
+rheadM E = error "BraunSeq.rheadM: empty sequence"
rheadM xs = return (lookup (size xs - 1) xs)
rtail E = error "BraunSeq.rtail: empty sequence"
rtail xs = delAt (size xs - 1) xs
-rtailM E = fail "BraunSeq.rtailM: empty sequence"
+rtailM E = error "BraunSeq.rtailM: empty sequence"
rtailM xs = return (delAt (size xs - 1) xs)
null E = True
@@ -347,14 +347,14 @@
lookup i xs = runIdentity (lookupM i xs)
lookupM i xs
- | i < 0 = fail "BraunSeq.lookupM: bad subscript"
+ | i < 0 = error "BraunSeq.lookupM: bad subscript"
| otherwise = look xs i
where look E _ = nothing
look (B x a b) i
| odd i = look a (half i)
| i == 0 = return x
| otherwise = look b (half i - 1)
- nothing = fail "BraunSeq.lookupM: not found"
+ nothing = error "BraunSeq.lookupM: not found"
lookupWithDefault d i xs = if i < 0 then d
else look xs i
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Seq/Defaults.hs EdisonCore-1.3.2.1/src/Data/Edison/Seq/Defaults.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Seq/Defaults.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Seq/Defaults.hs 2019-04-19 14:09:11.124929205 -0400
@@ -35,7 +35,7 @@
rviewDefault :: (Monad m, Sequence s) => s a -> m (a, s a)
rviewDefault xs
- | null xs = fail $ instanceName xs ++ ".rview: empty sequence"
+ | null xs = error $ instanceName xs ++ ".rview: empty sequence"
| otherwise = return (rhead xs, rtail xs)
@@ -52,7 +52,7 @@
rtailMUsingLview :: (Monad m,Sequence s) => s a -> m (s a)
rtailMUsingLview xs =
case lview xs of
- Nothing -> fail $ instanceName xs ++ ".rtailM: empty sequence"
+ Nothing -> error $ instanceName xs ++ ".rtailM: empty sequence"
Just (x, xs) -> return (rt x xs)
where rt x xs =
case lview xs of
@@ -223,7 +223,7 @@
lookupMUsingDrop :: (Monad m, Sequence s) => Int -> s a -> m a
lookupMUsingDrop i s
-- XXX better error message!
- | i < 0 || null s' = fail $ instanceName s
+ | i < 0 || null s' = error $ instanceName s
++ ".lookupMUsingDrop: empty sequence"
| otherwise = return (lhead s')
where s' = drop i s
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Seq/FingerSeq.hs EdisonCore-1.3.2.1/src/Data/Edison/Seq/FingerSeq.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Seq/FingerSeq.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Seq/FingerSeq.hs 2019-04-19 14:27:49.618572817 -0400
@@ -243,7 +243,7 @@
case FT.splitTree (> (SizeM i)) (SizeM 0) xs of
FT.Split _ (Elem x) _ -> return x
- | otherwise = fail "FingerSeq.lookupM: index out of bounds"
+ | otherwise = error "FingerSeq.lookupM: index out of bounds"
lookupWithDefault d i (Seq xs)
| inBounds i (Seq xs) =
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Seq/JoinList.hs EdisonCore-1.3.2.1/src/Data/Edison/Seq/JoinList.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Seq/JoinList.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Seq/JoinList.hs 2019-04-19 14:28:45.083050856 -0400
@@ -162,7 +162,7 @@
-- path reversal on lview/ltail
-lview E = fail "JoinList.lview: empty sequence"
+lview E = error "JoinList.lview: empty sequence"
lview (L x) = return (x, E)
lview (A xs ys) = lvw xs ys
where lvw E _ = error "JoinList.lvw: bug"
@@ -173,7 +173,7 @@
lhead (L x) = x
lhead (A xs _) = lhead xs
-lheadM E = fail "JoinList.lheadM: empty sequence"
+lheadM E = error "JoinList.lheadM: empty sequence"
lheadM (L x) = return x
lheadM (A xs _) = lheadM xs
@@ -184,7 +184,7 @@
ltl (L _) zs = zs
ltl (A xs ys) zs = ltl xs (A ys zs)
-ltailM E = fail "JoinList.ltailM: empty sequence"
+ltailM E = error "JoinList.ltailM: empty sequence"
ltailM (L _) = return E
ltailM (A xs ys) = return (ltl xs ys)
where ltl E _ = error "JoinList.ltl: bug"
@@ -196,7 +196,7 @@
-- that left accesses are more common, so we would prefer to keep the left
-- spine short.
-rview E = fail "JoinLis.rview: empty sequence"
+rview E = error "JoinLis.rview: empty sequence"
rview (L x) = return (x, E)
rview (A xs ys) = rvw xs ys
where rvw xs (A ys (A zs s)) = rvw (A xs (A ys zs)) s
@@ -208,7 +208,7 @@
rhead (L x) = x
rhead (A _ ys) = rhead ys
-rheadM E = fail "JoinList.rheadM: empty sequence"
+rheadM E = error "JoinList.rheadM: empty sequence"
rheadM (L x) = return x
rheadM (A _ ys) = rheadM ys
@@ -220,7 +220,7 @@
rtl xs (L _) = xs
rtl _ _ = error "JoinList.rtl: bug"
-rtailM E = fail "JoinList.rtailM: empty sequence"
+rtailM E = error "JoinList.rtailM: empty sequence"
rtailM (L _) = return E
rtailM (A xs ys) = return (rtl xs ys)
where rtl xs (A ys (A zs s)) = A (A xs ys) (rtl zs s)
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Seq/MyersStack.hs EdisonCore-1.3.2.1/src/Data/Edison/Seq/MyersStack.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Seq/MyersStack.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Seq/MyersStack.hs 2019-04-19 14:29:37.987506639 -0400
@@ -151,22 +151,22 @@
| i == j = C (1 + i + j) x xs xs'
lcons x xs = C 1 x xs xs
-lview E = fail "MyersStack.lview: empty sequence"
+lview E = error "MyersStack.lview: empty sequence"
lview (C _ x xs _) = return (x, xs)
lhead E = error "MyersStack.lhead: empty sequence"
lhead (C _ x _ _) = x
-lheadM E = fail "MyersStack.lheadM: empty sequence"
+lheadM E = error "MyersStack.lheadM: empty sequence"
lheadM (C _ x _ _) = return x
ltail E = error "MyersStack.ltail: empty sequence"
ltail (C _ _ xs _) = xs
-ltailM E = fail "MyersStack.ltailM: empty sequence"
+ltailM E = error "MyersStack.ltailM: empty sequence"
ltailM (C _ _ xs _) = return xs
-rview E = fail "MyersStack.rview: empty sequence"
+rview E = error "MyersStack.rview: empty sequence"
rview xs = return (rhead xs, rtail xs)
rhead E = error "MyersStack.rhead: empty sequence"
@@ -175,7 +175,7 @@
rh _ (C _ y ys ys') E = rh y ys ys'
rh x E E = x
-rheadM E = fail "MyersStack.rheadM: empty sequence"
+rheadM E = error "MyersStack.rheadM: empty sequence"
rheadM (C _ x xs xs') = return (rh x xs xs')
where rh _ _ (C _ y ys ys') = rh y ys ys'
rh _ (C _ y ys ys') E = rh y ys ys'
@@ -186,7 +186,7 @@
where rt _ E = E
rt y (C _ x xs _) = lcons y (rt x xs)
-rtailM E = fail "MyersStack.rtailM: empty sequence"
+rtailM E = error "MyersStack.rtailM: empty sequence"
rtailM (C _ x xs _) = return (rt x xs)
where rt _ E = E
rt y (C _ x xs _) = lcons y (rt x xs)
@@ -249,13 +249,13 @@
lookup i xs = runIdentity (lookupM i xs)
lookupM i xs = look xs i
- where look E _ = fail "MyersStack.lookup: bad subscript"
+ where look E _ = error "MyersStack.lookup: bad subscript"
look (C j x xs xs') i
| i >= j = look xs' (i - j)
| i > 0 = look xs (i - 1)
| i == 0 = return x
| otherwise = nothing
- nothing = fail "MyersStack.lookup: not found"
+ nothing = error "MyersStack.lookup: not found"
lookupWithDefault d i xs = look xs i
where look E _ = d
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Seq/RandList.hs EdisonCore-1.3.2.1/src/Data/Edison/Seq/RandList.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Seq/RandList.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Seq/RandList.hs 2019-04-19 14:33:51.057684970 -0400
@@ -166,7 +166,7 @@
child (T _ _ t) = t
child _ = error "RandList.copy: bug!"
-lview E = fail "RandList.lview: empty sequence"
+lview E = error "RandList.lview: empty sequence"
lview (C _ (L x) xs) = return (x, xs)
lview (C i (T x s t) xs) = return (x, C j s (C j t xs))
where j = half i
@@ -175,7 +175,7 @@
lhead (C _ (L x) _) = x
lhead (C _ (T x _ _) _) = x
-lheadM E = fail "RandList.lheadM: empty sequence"
+lheadM E = error "RandList.lheadM: empty sequence"
lheadM (C _ (L x) _) = return x
lheadM (C _ (T x _ _) _) = return x
@@ -184,7 +184,7 @@
ltail (C i (T _ s t) xs) = C j s (C j t xs)
where j = half i
-ltailM E = fail "RandList.ltailM: empty sequence"
+ltailM E = error "RandList.ltailM: empty sequence"
ltailM (C _ (L _) xs) = return xs
ltailM (C i (T _ s t) xs) = return (C j s (C j t xs))
where j = half i
@@ -195,7 +195,7 @@
treeLast (T _ _ t) = treeLast t
rhead (C _ _ xs) = rhead xs
-rheadM E = fail "RandList.rhead: empty sequence"
+rheadM E = error "RandList.rhead: empty sequence"
rheadM (C _ t E) = return(treeLast t)
where treeLast (L x) = x
treeLast (T _ _ t) = treeLast t
@@ -272,7 +272,7 @@
lookup i xs = runIdentity (lookupM i xs)
lookupM i xs = look xs i
- where look E _ = fail "RandList.lookup bad subscript"
+ where look E _ = error "RandList.lookup bad subscript"
look (C j t xs) i
| i < j = lookTree j t i
| otherwise = look xs (i - j)
@@ -285,7 +285,7 @@
| i /= 0 = lookTree k s (i - 1)
| otherwise = return x
where k = half j
- nothing = fail "RandList.lookup: not found"
+ nothing = error "RandList.lookup: not found"
lookupWithDefault d i xs = look xs i
where look E _ = d
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Seq/RevSeq.hs EdisonCore-1.3.2.1/src/Data/Edison/Seq/RevSeq.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Seq/RevSeq.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Seq/RevSeq.hs 2019-04-19 14:35:45.666670672 -0400
@@ -167,7 +167,7 @@
append (N m xs) (N n ys) = N (m+n+1) (S.append ys xs)
lview (N m xs) = case S.rview xs of
- Nothing -> fail "RevSeq.lview: empty sequence"
+ Nothing -> error "RevSeq.lview: empty sequence"
Just (x,xs) -> return (x, N (m-1) xs)
lhead (N _ xs) = S.rhead xs
@@ -177,11 +177,11 @@
ltail (N (-1) _) = error "RevSeq.ltail: empty sequence"
ltail (N m xs) = N (m-1) (S.rtail xs)
-ltailM (N (-1) _) = fail "RevSeq.ltailM: empty sequence"
+ltailM (N (-1) _) = error "RevSeq.ltailM: empty sequence"
ltailM (N m xs) = return (N (m-1) (S.rtail xs))
rview (N m xs) = case S.lview xs of
- Nothing -> fail "RevSeq.rview: empty sequence"
+ Nothing -> error "RevSeq.rview: empty sequence"
Just (x,xs) -> return (x, N (m-1) xs)
rhead (N _ xs) = S.lhead xs
@@ -191,7 +191,7 @@
rtail (N (-1) _) = error "RevSeq.rtail: empty sequence"
rtail (N m xs) = N (m-1) (S.ltail xs)
-rtailM (N (-1) _) = fail "RevSeq.rtailM: empty sequence"
+rtailM (N (-1) _) = error "RevSeq.rtailM: empty sequence"
rtailM (N m xs) = return (N (m-1) (S.ltail xs))
null (N m _) = m == -1
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Seq/SimpleQueue.hs EdisonCore-1.3.2.1/src/Data/Edison/Seq/SimpleQueue.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Seq/SimpleQueue.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Seq/SimpleQueue.hs 2019-04-19 14:36:21.446978325 -0400
@@ -159,14 +159,14 @@
append (Q xs1 ys1) (Q xs2 ys2) =
Q (xs1 ++ L.reverseOnto ys1 xs2) ys2
-lview (Q [] _) = fail "SimpleQueue.lview: empty sequence"
+lview (Q [] _) = error "SimpleQueue.lview: empty sequence"
lview (Q [x] ys) = return (x, Q (L.reverse ys) [])
lview (Q (x:xs) ys) = return (x, Q xs ys)
lhead (Q [] _) = error "SimpleQueue.lhead: empty sequence"
lhead (Q (x:_) _) = x
-lheadM (Q [] _) = fail "SimpleQueue.lheadM: empty sequence"
+lheadM (Q [] _) = error "SimpleQueue.lheadM: empty sequence"
lheadM (Q (x:_) _) = return x
ltail (Q [_] ys) = Q (L.reverse ys) []
@@ -175,12 +175,12 @@
ltailM (Q [_] ys) = return (Q (L.reverse ys) [])
ltailM (Q (_:xs) ys) = return (Q xs ys)
-ltailM (Q [] _) = fail "SimpleQueue.ltailM: empty sequence"
+ltailM (Q [] _) = error "SimpleQueue.ltailM: empty sequence"
rview (Q xs (y:ys)) = return (y, Q xs ys)
rview (Q xs []) =
case L.rview xs of
- Nothing -> fail "SimpleQueue.rview: empty sequence"
+ Nothing -> error "SimpleQueue.rview: empty sequence"
Just (x,xs') -> return (x, Q xs' [])
rhead (Q _ (y:_)) = y
@@ -188,7 +188,7 @@
rhead (Q xs []) = L.rhead xs
rheadM (Q _ (y:_)) = return y
-rheadM (Q [] []) = fail "SimpleQueue.rheadM: empty sequence"
+rheadM (Q [] []) = error "SimpleQueue.rheadM: empty sequence"
rheadM (Q xs []) = return (L.rhead xs)
rtail (Q xs (_:ys)) = Q xs ys
@@ -196,7 +196,7 @@
rtail (Q xs []) = Q (L.rtail xs) []
rtailM (Q xs (_:ys)) = return (Q xs ys)
-rtailM (Q [] []) = fail "SimpleQueue.rtailM: empty sequence"
+rtailM (Q [] []) = error "SimpleQueue.rtailM: empty sequence"
rtailM (Q xs []) = return (Q (L.rtail xs) [])
null (Q [] _) = True
diff -ru EdisonCore-1.3.2.1.orig/src/Data/Edison/Seq/SizedSeq.hs EdisonCore-1.3.2.1/src/Data/Edison/Seq/SizedSeq.hs
--- EdisonCore-1.3.2.1.orig/src/Data/Edison/Seq/SizedSeq.hs 2018-01-05 02:46:48.000000000 -0500
+++ EdisonCore-1.3.2.1/src/Data/Edison/Seq/SizedSeq.hs 2019-04-19 14:36:46.459193369 -0400
@@ -156,7 +156,7 @@
append (N m xs) (N n ys) = N (m+n) (S.append xs ys)
lview (N n xs) = case S.lview xs of
- Nothing -> fail "SizedSeq.lview: empty sequence"
+ Nothing -> error "SizedSeq.lview: empty sequence"
Just (x,xs) -> return (x, N (n-1) xs)
lhead (N _ xs) = S.lhead xs
@@ -166,11 +166,11 @@
ltail (N 0 _) = error "SizedSeq.ltail: empty sequence"
ltail (N n xs) = N (n-1) (S.ltail xs)
-ltailM (N 0 _) = fail "SizedSeq.ltailM: empty sequence"
+ltailM (N 0 _) = error "SizedSeq.ltailM: empty sequence"
ltailM (N n xs) = return (N (n-1) (S.ltail xs))
rview (N n xs) = case S.rview xs of
- Nothing -> fail "SizedSeq.rview: empty sequence"
+ Nothing -> error "SizedSeq.rview: empty sequence"
Just (x,xs) -> return (x, N (n-1) xs)
rhead (N _ xs) = S.rhead xs
@@ -180,7 +180,7 @@
rtail (N 0 _) = error "SizedSeq.rtail: empty sequence"
rtail (N n xs) = N (n-1) (S.rtail xs)
-rtailM (N 0 _) = fail "SizedSeq.rtailM: empty sequence"
+rtailM (N 0 _) = error "SizedSeq.rtailM: empty sequence"
rtailM (N n xs) = return (N (n-1) (S.rtail xs))
null (N n _) = n == 0
diff -ru FPretty-1.1.orig/Text/PrettyPrint/FPretty.hs FPretty-1.1/Text/PrettyPrint/FPretty.hs diff --git a/Text/PrettyPrint/FPretty.hs b/Text/PrettyPrint/FPretty.hs
--- FPretty-1.1.orig/Text/PrettyPrint/FPretty.hs 2015-11-16 08:34:29.000000000 -0500 index f2c0001..6138d3f 100644
+++ FPretty-1.1/Text/PrettyPrint/FPretty.hs 2018-01-16 18:12:17.694618006 -0500 --- a/Text/PrettyPrint/FPretty.hs
@@ -112,7 +112,11 @@ +++ b/Text/PrettyPrint/FPretty.hs
@@ -112,7 +112,11 @@ module Text.PrettyPrint.FPretty
#if __GLASGOW_HASKELL__ >= 710 #if __GLASGOW_HASKELL__ >= 710
-- The base libraries from GHC 7.10 onwards export <$> as synonym for fmap. -- The base libraries from GHC 7.10 onwards export <$> as synonym for fmap.
......
diff -ru FontyFruity-0.5.3.4.orig/src/Graphics/Text/TrueType/CharacterMap.hs FontyFruity-0.5.3.4/src/Graphics/Text/TrueType/CharacterMap.hs
--- FontyFruity-0.5.3.4.orig/src/Graphics/Text/TrueType/CharacterMap.hs 2015-04-25 05:01:06.000000000 -0400
+++ FontyFruity-0.5.3.4/src/Graphics/Text/TrueType/CharacterMap.hs 2019-03-16 06:48:06.693682922 -0400
@@ -102,7 +102,7 @@
rnf (CharacterMaps maps) = rnf maps `seq` ()
instance Binary CharacterMaps where
- put _ = fail "Unimplemented"
+ put _ = error "Unimplemented"
get = do
startIndex <- bytesRead
versionNumber <- getWord16be
@@ -192,7 +192,7 @@
compare _ _ = GT
instance Binary CharacterTable where
- put _ = fail "Binary.put CharacterTable - Unimplemented"
+ put _ = error "Binary.put CharacterTable - Unimplemented"
get = do
format <- getWord16be
case format of
@@ -305,7 +305,7 @@
langIdOfCharMap = _format0Language
instance Binary Format0 where
- put _ = fail "Binary.Format0.put - unimplemented"
+ put _ = error "Binary.Format0.put - unimplemented"
get = do
tableSize <- getWord16be
when (tableSize /= 262) $
@@ -347,7 +347,7 @@
instance Binary Format2 where
- put _ = fail "Format2.put - unimplemented"
+ put _ = error "Format2.put - unimplemented"
get = do
_tableSize <- getWord16be
lang <- getWord16be
@@ -376,7 +376,7 @@
langIdOfCharMap = _format6Language
instance Binary Format6 where
- put _ = fail "Format6.put - unimplemented"
+ put _ = error "Format6.put - unimplemented"
get = do
_length <- getWord16be
language <- getWord16be
diff -ru FontyFruity-0.5.3.4.orig/src/Graphics/Text/TrueType/Glyph.hs FontyFruity-0.5.3.4/src/Graphics/Text/TrueType/Glyph.hs
--- FontyFruity-0.5.3.4.orig/src/Graphics/Text/TrueType/Glyph.hs 2017-06-29 17:15:33.000000000 -0400
+++ FontyFruity-0.5.3.4/src/Graphics/Text/TrueType/Glyph.hs 2019-03-16 06:47:22.845370697 -0400
@@ -313,7 +313,7 @@
where breaker array ix = VU.splitAt (fromIntegral ix + 1) array
instance Binary Glyph where
- put _ = fail "Glyph.put - unimplemented"
+ put _ = error "Glyph.put - unimplemented"
get = do
hdr <- get
case _glfNumberOfContours hdr of
diff -ru FontyFruity-0.5.3.4.orig/src/Graphics/Text/TrueType/Header.hs FontyFruity-0.5.3.4/src/Graphics/Text/TrueType/Header.hs
--- FontyFruity-0.5.3.4.orig/src/Graphics/Text/TrueType/Header.hs 2016-01-05 16:09:02.000000000 -0500
+++ FontyFruity-0.5.3.4/src/Graphics/Text/TrueType/Header.hs 2019-03-16 06:48:33.605875180 -0400
@@ -100,7 +100,7 @@
rnf (FontHeader {}) = ()
instance Binary FontHeader where
- put _ = fail "Unimplemented"
+ put _ = error "Unimplemented"
get =
FontHeader <$> get <*> get <*> g32 <*> g32 <*> get
<*> g16 <*> g64 <*> g64 <*> get <*> get
diff -ru FontyFruity-0.5.3.4.orig/src/Graphics/Text/TrueType/MaxpTable.hs FontyFruity-0.5.3.4/src/Graphics/Text/TrueType/MaxpTable.hs
--- FontyFruity-0.5.3.4.orig/src/Graphics/Text/TrueType/MaxpTable.hs 2015-04-25 05:01:06.000000000 -0400
+++ FontyFruity-0.5.3.4/src/Graphics/Text/TrueType/MaxpTable.hs 2019-03-16 06:48:26.633825328 -0400
@@ -50,7 +50,7 @@
rnf (MaxpTable {}) = ()
instance Binary MaxpTable where
- put _ = fail "Unimplemented"
+ put _ = error "Unimplemented"
get = MaxpTable
<$> get <*> g16 <*> g16 <*> g16 <*> g16 <*> g16
<*> g16 <*> g16 <*> g16 <*> g16 <*> g16 <*> g16
diff -ru FontyFruity-0.5.3.4.orig/src/Graphics/Text/TrueType/Name.hs FontyFruity-0.5.3.4/src/Graphics/Text/TrueType/Name.hs
--- FontyFruity-0.5.3.4.orig/src/Graphics/Text/TrueType/Name.hs 2015-04-25 05:01:06.000000000 -0400
+++ FontyFruity-0.5.3.4/src/Graphics/Text/TrueType/Name.hs 2019-03-16 06:48:14.853741168 -0400
@@ -35,7 +35,7 @@
rnf (NameTable {}) = ()
instance Binary NameTable where
- put _ = fail "Binary.put NameTable - unimplemented"
+ put _ = error "Binary.put NameTable - unimplemented"
get = do
nameFormatId <- getWord16be
when (nameFormatId /= 0) $
diff --git a/src/Codec/Picture/Metadata.hs b/src/Codec/Picture/Metadata.hs
index a7b5014..bfbd553 100644
--- a/src/Codec/Picture/Metadata.hs
+++ b/src/Codec/Picture/Metadata.hs
@@ -43,6 +43,7 @@ module Codec.Picture.Metadata( -- * Types
, dotsPerCentiMeterToDotPerInch
) where
+import Prelude hiding (foldl')
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid( Monoid, mempty, mappend )
import Data.Word( Word )
diff -ru Unixutils-1.54.1.orig/System/Unix/Chroot.hs Unixutils-1.54.1/System/Unix/Chroot.hs
--- Unixutils-1.54.1.orig/System/Unix/Chroot.hs 2015-08-11 16:02:44.000000000 -0400
+++ Unixutils-1.54.1/System/Unix/Chroot.hs 2018-07-04 21:18:53.544302297 -0400
@@ -1,4 +1,4 @@
-{-# LANGUAGE ForeignFunctionInterface #-}
+{-# LANGUAGE CPP, ForeignFunctionInterface #-}
-- | This module, except for useEnv, is copied from the build-env package.
module System.Unix.Chroot
( fchroot
@@ -45,7 +45,11 @@
fchroot :: (MonadIO m, MonadMask m) => FilePath -> m a -> m a
fchroot path action =
do origWd <- liftIO $ getWorkingDirectory
- rootFd <- liftIO $ openFd "/" ReadOnly Nothing defaultFileFlags
+ rootFd <- liftIO $ openFd "/" ReadOnly
+#if !(MIN_VERSION_unix(2,8,0))
+ Nothing
+#endif
+ defaultFileFlags
liftIO $ chroot path
liftIO $ changeWorkingDirectory "/"
action `finally` (liftIO $ breakFree origWd rootFd)
commit e1fd4b583d8a09d54e089fe2b89e921d3b854182
Author: Ryan Scott <ryan.gl.scott@gmail.com>
Date: Fri Mar 15 18:49:39 2019 -0400
Adapt to base-4.13.0.0
diff --git a/src/FRP/Yampa/Event.hs b/src/FRP/Yampa/Event.hs
index 804fe46..0639f3f 100644
--- a/src/FRP/Yampa/Event.hs
+++ b/src/FRP/Yampa/Event.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}
-----------------------------------------------------------------------------------------
-- |
@@ -90,6 +91,7 @@ module FRP.Yampa.Event where
import Control.Applicative
import Control.DeepSeq (NFData(..))
+import qualified Control.Monad.Fail as Fail
import FRP.Yampa.Diagnostics
@@ -175,9 +177,14 @@ instance Monad Event where
-- | See 'pure'.
return = pure
+#if !(MIN_VERSION_base(4,13,0))
-- | Fail with 'NoEvent'.
- fail _ = NoEvent
+ fail = Fail.fail
+#endif
+instance Fail.MonadFail Event where
+ -- | Fail with 'NoEvent'.
+ fail _ = NoEvent
-- | Alternative instance
instance Alternative Event where
This diff is collapsed.
diff --git a/ansi-pretty.cabal b/ansi-pretty.cabal
index 37dffa2..b3eb075 100644
--- a/ansi-pretty.cabal
+++ b/ansi-pretty.cabal
@@ -1,10 +1,11 @@
name: ansi-pretty
version: 0.1.2.2
+x-revision: 1
synopsis: AnsiPretty for ansi-wl-pprint
description: 'AnsiPretty' type class, more colorful than 'Pretty'.
category: User Interfaces, Text
-homepage: https://github.com/futurice/haskell-ansi-pretty#readme
-bug-reports: https://github.com/futurice/haskell-ansi-pretty/issues
+homepage: https://github.com/phadej/haskell-ansi-pretty#readme
+bug-reports: https://github.com/phadej/haskell-ansi-pretty/issues
author: Oleg Grenrus <oleg.grenrus@iki.fi>
maintainer: Oleg Grenrus <oleg.grenrus@iki.fi>
license: BSD3
@@ -16,7 +17,8 @@ tested-with:
|| ==8.2.2
|| ==8.4.4
|| ==8.6.5
- || ==8.8.1
+ || ==8.8.4
+ || ==8.10.3
build-type: Simple
cabal-version: >=1.10
@@ -26,17 +28,17 @@ extra-source-files:
source-repository head
type: git
- location: https://github.com/futurice/haskell-ansi-pretty
+ location: https://github.com/phadej/haskell-ansi-pretty
library
default-language: Haskell2010
hs-source-dirs: src
ghc-options: -Wall
build-depends:
- aeson >=0.8 && <1.5
+ aeson >=0.8 && <2.3
, ansi-wl-pprint >=0.6 && <0.7
, array >=0.5 && <0.6
- , base >=4.7 && <4.14
+ , base >=4.7 && <4.15
, bytestring >=0.10 && <0.11
, containers >=0.5 && <0.7
, generics-sop >=0.1 && <0.6
@@ -47,7 +49,7 @@ library
, text >=1.2 && <1.3
, time >=1.4 && <1.10
, unordered-containers >=0.2 && <0.3
- , vector >=0.10 && <0.13
+ , vector >=0.10 && <0.14
exposed-modules:
Data.List.CommonPrefix
diff --git a/src/Text/PrettyPrint/ANSI/Leijen/AnsiPretty.hs b/src/Text/PrettyPrint/ANSI/Leijen/AnsiPretty.hs
index 2c8d89f..dcb3a14 100644
--- a/src/Text/PrettyPrint/ANSI/Leijen/AnsiPretty.hs
+++ b/src/Text/PrettyPrint/ANSI/Leijen/AnsiPretty.hs
@@ -77,6 +77,10 @@ import qualified Data.Time as Time
import qualified Data.Vector as V
import qualified Data.Vector.Storable as S
import qualified Data.Vector.Unboxed as U
+#if MIN_VERSION_aeson(2,0,0)
+import qualified Data.Aeson.Key as Key
+import qualified Data.Aeson.KeyMap as KeyMap
+#endif
#if !MIN_VERSION_generics_sop(0,2,0)
type SListI (a :: k) = SingI a
@@ -255,7 +259,12 @@ instance AnsiPretty a => AnsiPretty (CommonPrefix a)
instance AnsiPretty Aeson.Value where
ansiPretty (Aeson.Object o)
= encloseSep (dullgreen lbrace) (dullgreen rbrace) (dullgreen comma)
- $ fmap f $ HashMap.toList o
+ $ fmap f
+#if MIN_VERSION_aeson(2,0,0)
+ $ KeyMap.toList o
+#else
+ $ HashMap.toList o
+#endif
where
f (k, v) = dullwhite (ansiPretty k) L.<> blue colon <+> ansiPretty v
@@ -272,6 +281,10 @@ instance AnsiPretty Aeson.Value where
ansiPretty (Aeson.Bool False) = dullyellow $ string "false"
ansiPretty Aeson.Null = cyan (text "Null")
+#if MIN_VERSION_aeson(2,0,0)
+instance AnsiPretty Key.Key where ansiPretty = ansiPretty . Key.toText
+#endif
+
-- array
instance (AnsiPretty i, AnsiPretty e, Array.Ix i) => AnsiPretty (Array.Array i e) where ansiPretty = ansiPrettyMap "Array" . Array.assocs
instance (AnsiPretty i, AnsiPretty e, Array.Ix i, Array.IArray Array.UArray e) => AnsiPretty (Array.UArray i e) where ansiPretty = ansiPrettyMap "UArray" . Array.assocs
@@ -302,7 +315,9 @@ instance AnsiPretty Data.Semigroup.All
instance AnsiPretty Any
instance AnsiPretty a => AnsiPretty (Sum a)
instance AnsiPretty a => AnsiPretty (Product a)
+#if !(MIN_VERSION_base(4,16,0))
instance AnsiPretty a => AnsiPretty (Option a)
+#endif
instance (AnsiPretty a, AnsiPretty b) => AnsiPretty (Arg a b)
-- scientific
diff --git a/src/Data/ArithEncode/Basic.hs b/src/Data/ArithEncode/Basic.hs
index 31bc695..e6af8ff 100644
--- a/src/Data/ArithEncode/Basic.hs
+++ b/src/Data/ArithEncode/Basic.hs
@@ -130,7 +130,7 @@ import Control.Monad
import Data.Array.IArray(Array)
import Data.Bits
import Data.Hashable
-import Data.List hiding (elem, union)
+import qualified Data.List as L hiding (elem, union)
import Data.Maybe
import Data.Set(Set)
import Data.HashSet(HashSet)
@@ -354,7 +354,7 @@ wrap :: (a -> Maybe b)
-> Encoding b
-- ^ The inner encoding.
-> Encoding a
-wrap fwd rev enc @ Encoding { encEncode = encodefunc, encDecode = decodefunc,
+wrap fwd rev enc@Encoding { encEncode = encodefunc, encDecode = decodefunc,
encInDomain = indomainfunc } =
let
safefwd val =
@@ -412,7 +412,7 @@ mandatory Encoding { encEncode = encodefunc, encDecode = decodefunc,
-- @0@. It is also similar to @mandatory@, except that it does not
-- change the base type.
nonzero :: Encoding ty -> Encoding ty
-nonzero enc @ Encoding { encEncode = encodefunc, encDecode = decodefunc,
+nonzero enc@Encoding { encEncode = encodefunc, encDecode = decodefunc,
encSize = sizeval, encInDomain = indomainfunc } =
let
dec n = n - 1
@@ -483,14 +483,14 @@ exclude :: [ty]
-- ^ The base @Encoding@.
-> Encoding ty
exclude [] enc = enc
-exclude excludes enc @ Encoding { encEncode = encodefunc, encDecode = decodefunc,
+exclude excludes enc@Encoding { encEncode = encodefunc, encDecode = decodefunc,
encSize = sizeval, encInDomain = indomainfunc } =
let
forbidden = HashSet.fromList (map encodefunc excludes)
- sortedlist = sort (map encodefunc excludes)
+ sortedlist = L.sort (map encodefunc excludes)
fwdoffsets :: [(Integer, Integer)]
- (_, fwdoffsets) = mapAccumL (\offset v -> (offset + 1, (v, offset)))
+ (_, fwdoffsets) = L.mapAccumL (\offset v -> (offset + 1, (v, offset)))
1 sortedlist
fwdtree = toBinTree fwdoffsets
@@ -499,7 +499,7 @@ exclude excludes enc @ Encoding { encEncode = encodefunc, encDecode = decodefunc
let
foldfun :: [(Integer, Integer)] -> (Integer, Integer) ->
[(Integer, Integer)]
- foldfun accum @ ((v', _) : rest) elem @ (v, _)
+ foldfun accum@((v', _) : rest) elem@(v, _)
| v == v' = elem : rest
| otherwise = elem : accum
foldfun _ _ = error "Should not fold over an empty list"
@@ -641,7 +641,7 @@ union encodings =
sortpair (a, _) (b, _) = sortfunc a b
(sizes, sortedencodings) =
- unzip (sortBy sortpair (map (\enc -> (size enc, enc)) encodings))
+ unzip (L.sortBy sortpair (map (\enc -> (size enc, enc)) encodings))
-- Turn the sorted element encodings into an array for fast access
encodingarr :: Array.Array Int (Encoding ty)
encodingarr = Array.listArray (0, numelems - 1) sortedencodings
@@ -724,7 +724,7 @@ union encodings =
_ -> error "Internal error"
encodefunc val =
- case findIndex ((flip inDomain) val) sortedencodings of
+ case L.findIndex ((flip inDomain) val) sortedencodings of
Just encidx ->
let
enc = (Array.!) encodingarr encidx
@@ -813,8 +813,8 @@ mkPairCore Encoding { encEncode = encode1, encDecode = decode1,
-- | Take encodings for two datatypes A and B, and build an encoding
-- for a pair (A, B).
pair :: Encoding ty1 -> Encoding ty2 -> Encoding (ty1, ty2)
-pair enc1 @ Encoding { encInDomain = indomain1 }
- enc2 @ Encoding { encInDomain = indomain2 } =
+pair enc1@Encoding { encInDomain = indomain1 }
+ enc2@Encoding { encInDomain = indomain2 } =
let
(encodefunc, decodefunc, sizeval) = mkPairCore enc1 enc2
@@ -1237,7 +1237,7 @@ seqCore Encoding { encEncode = encodefunc, encDecode = decodefunc,
-- Note: This encoding can produce very large numbers for short
-- sequences.
seq :: Encoding ty -> Encoding [ty]
-seq enc @ Encoding { encInDomain = indomainfunc } =
+seq enc@Encoding { encInDomain = indomainfunc } =
let
(newEncode, newDecode) = seqCore enc
newInDomain = all indomainfunc
@@ -1281,7 +1281,7 @@ boundedSeqCore len Encoding { encEncode = encodefunc, encDecode = decodefunc,
in
(newencode, newdecode)
Just 0 -> (\[] -> 0, \0 -> [])
- Just 1 -> (genericLength, flip genericReplicate (decodefunc 0))
+ Just 1 -> (L.genericLength, flip L.genericReplicate (decodefunc 0))
Just finitesize ->
let
newencode [] = 0
@@ -1324,7 +1324,7 @@ boundedSeq :: Integer
-> Encoding ty
-- ^ The @Encoding@ for the sequence elements
-> Encoding [ty]
-boundedSeq len enc @ Encoding { encSize = sizeval, encInDomain = indomainfunc } =
+boundedSeq len enc@Encoding { encSize = sizeval, encInDomain = indomainfunc } =
let
(newencode, newdecode) = boundedSeqCore len enc
newsize = case len of
diff --git a/src/Data/ArithEncode/Util.hs b/src/Data/ArithEncode/Util.hs
index 85577ad..a07ef2e 100644
--- a/src/Data/ArithEncode/Util.hs
+++ b/src/Data/ArithEncode/Util.hs
@@ -61,7 +61,7 @@ module Data.ArithEncode.Util(
import Control.Exception
import Data.ArithEncode.Basic
import Data.Hashable
-import Data.List
+import qualified Data.List as L
import Data.Maybe
import Data.Set(Set)
import Data.HashMap.Lazy(HashMap)
@@ -174,7 +174,7 @@ function keyenc valenc =
(idx + 1,
Just val' : replicate (fromInteger (idx - count)) Nothing ++ accum)
- sorted = sortBy (\(a, _) (b, _) -> compare a b)
+ sorted = L.sortBy (\(a, _) (b, _) -> compare a b)
(map (\(key, val') -> (encode keyenc key, val'))
(Map.assocs val))
@@ -217,7 +217,7 @@ functionHashable keyenc valenc =
(idx + 1,
Just val' : replicate (fromInteger (idx - count)) Nothing ++ accum)
- sorted = sortBy (\(a, _) (b, _) -> compare a b)
+ sorted = L.sortBy (\(a, _) (b, _) -> compare a b)
(map (\(key, val') -> (encode keyenc key, val'))
(HashMap.toList val))
diff --git a/aur.cabal b/aur.cabal
index b7130e8..5acb75d 100644
--- a/aur.cabal
+++ b/aur.cabal
@@ -1,6 +1,7 @@
cabal-version: 2.2
name: aur
version: 7.0.7
+x-revision: 1
synopsis: Access metadata from the Arch Linux User Repository.
description:
Access package information from Arch Linux's AUR via its RPC interface. The
@@ -36,11 +37,11 @@ library
hs-source-dirs: lib
exposed-modules: Linux.Arch.Aur
build-depends:
- , aeson >=0.9 && <2.1
+ , aeson >=0.9 && <2.3
, bytestring
, hashable >= 1.2
, http-types ^>=0.12
- , text ^>=1.2
+ , text >=1.2
test-suite aur-test
import: commons
diff --git a/aura.cabal b/aura.cabal
index 937ba4e..1f51e64 100644
--- a/aura.cabal
+++ b/aura.cabal
@@ -43,14 +43,14 @@ common commons
, base >=4.12 && <5
, bytestring ^>=0.11
, containers ^>=0.6
- , megaparsec >=7 && <10
+ , megaparsec >=7
, rio ^>=0.1.17
, text >=1.2 && < 1.3 || ^>= 2.0
, versions ^>=6.0.3
common libexec
build-depends:
- , aeson >=2.1 && < 2.3
+ , aeson >=2.1
, aur ^>=7.0.5
, http-client >=0.5 && <0.8
, prettyprinter >=1.2 && <1.8
@@ -58,7 +58,7 @@ common libexec
, scheduler >=1.1 && <2.1
, transformers ^>=0.5
, typed-process ^>=0.2
- , unix ^>=2.7.2.2
+ , unix >=2.7.2.2
library
import: commons, libexec
@@ -90,14 +90,14 @@ library
Aura.Utils
build-depends:
- , algebraic-graphs >=0.1 && <0.8
- , filepath ^>=1.4
+ , algebraic-graphs >=0.1
+ , filepath >=1.4
, hashable ^>=1.4
, http-types >=0.9 && <0.13
- , language-bash >=0.8 && <0.10
+ , language-bash >=0.8
, network-uri ^>=2.6
, stm ^>=2.5
- , time >=1.8 && <1.13
+ , time >=1.8
executable aura
import: commons, libexec
commit 69d6cb742b2210f231620b90ee729a195a0f55ad
Author: Ryan Scott <ryan.gl.scott@gmail.com>
Date: Wed Aug 28 07:08:30 2019 -0400
Allow building with GHC 8.8
diff --git a/src/Data/Barbie/Internal/Constraints.hs b/src/Data/Barbie/Internal/Constraints.hs
index d1da2f2..7087ed2 100644
--- a/src/Data/Barbie/Internal/Constraints.hs
+++ b/src/Data/Barbie/Internal/Constraints.hs
@@ -179,7 +179,7 @@ gbaddDictsDefault
class GAllBC (repbf :: * -> *) where
type GAllB (c :: k -> Constraint) repbf :: Constraint
-class GAllBC repbx => GConstraintsB c (f :: k -> *) repbx repbf repbdf where
+class GAllBC repbx => GConstraintsB c f repbx repbf repbdf where
gbaddDicts :: GAllB c repbx => repbf x -> repbdf x
diff --git a/src/Data/Barbie/Internal/Product.hs b/src/Data/Barbie/Internal/Product.hs
index 31abc4b..6fef250 100644
--- a/src/Data/Barbie/Internal/Product.hs
+++ b/src/Data/Barbie/Internal/Product.hs
@@ -168,7 +168,7 @@ gbuniqDefault x
= toN (gbuniq @f @f @_ @(RepN (b f)) @(RepN (b (f `Product` f))) x)
{-# INLINE gbuniqDefault #-}
-class GProductB (f :: k -> *) (g :: k -> *) repbf repbg repbfg where
+class GProductB f g repbf repbg repbfg where
gbprod :: repbf x -> repbg x -> repbfg x
gbuniq :: (forall a . f a) -> repbf x
diff --git a/src/Barbies/TH.hs b/src/Barbies/TH.hs
index b1b4622..1199ae7 100644
--- a/src/Barbies/TH.hs
+++ b/src/Barbies/TH.hs
@@ -258,7 +258,7 @@ declareBareBWith DeclareBareBConfig{..} decsQ = do
[ (strat, pure t) | (_, DerivClause strat preds) <- classes', t <- preds ]
return $ DataD [] dataName
#if MIN_VERSION_template_haskell(2,17,0)
- (tvbs ++ [PlainTV nSwitch (), KindedTV nWrap () (AppT (AppT ArrowT StarT) StarT)])
+ (tvbs ++ [PlainTV nSwitch bndrReq, KindedTV nWrap bndrReq (AppT (AppT ArrowT StarT) StarT)])
#else
(tvbs ++ [PlainTV nSwitch, KindedTV nWrap (AppT (AppT ArrowT StarT) StarT)])
#endif
@@ -270,6 +270,12 @@ declareBareBWith DeclareBareBConfig{..} decsQ = do
++ [ TySynD (mkName name) tvbs coveredType | name <- maybeToList $ coveredName $ nameBase dataName0]
go _ d = pure [d]
+-- TODO (int-index): Use MIN_VERSION_template_haskell(2,21,0)
+#if __GLASGOW_HASKELL__ < 907
+bndrReq :: ()
+bndrReq = ()
+#endif
+
dataDecNames :: [Dec] -> [Name]
dataDecNames = nub . mapMaybe decName
where