commit e3512d887df41a8162c3e361171c04beca08415b Author: Tom Stejskal Date: Mon Nov 19 20:09:43 2018 +0100 Fix Map.!: given key is not an element in the map diff --git a/compiler/src/Elm/Compiler/Type/Extract.hs b/compiler/src/Elm/Compiler/Type/Extract.hs index 1aafe1d4..99763392 100644 --- a/compiler/src/Elm/Compiler/Type/Extract.hs +++ b/compiler/src/Elm/Compiler/Type/Extract.hs @@ -10,6 +10,7 @@ module Elm.Compiler.Type.Extract import Data.Map ((!)) +import qualified Data.Map as Map import qualified Data.Maybe as Maybe import qualified Data.Set as Set @@ -134,11 +135,15 @@ extractUnion interfaces (Opt.Global home name) = else let pname = toPublicName home name - unions = I._unions (interfaces ! home) + maybeUnions = I._unions <$> Map.lookup home interfaces in - case I.toUnionInternals (unions ! name) of - Can.Union vars ctors _ _ -> - T.Union pname vars <$> traverse extractCtor ctors + case Map.lookup name =<< maybeUnions of + Just union -> + case I.toUnionInternals union of + Can.Union vars ctors _ _ -> + T.Union pname vars <$> traverse extractCtor ctors + Nothing -> + return $ T.Union pname [] [] extractCtor :: Can.Ctor -> Extractor (N.Name, [T.Type]) ts/import-github.scm?id=3e968af4726192b042837c449e55b91fae14fa17'>commitdiff
path: root/tests/import-github.scm
AgeCommit message (Expand)Author
2022-12-26upstream-updater: Rename record field....The next commits will make the functions, which are currently importing the latest version of a package, change into importing the latest or a given version of the package (for those updaters supporting specifying a version). Thus the name ‘latest‘ is no longer appropriate. * guix/upstream.scm (upstream-updater) Rename field [latest] to [import]. (lookup-updater, package-latest-release) Adjust fieldname accordingly. * guix/gnu-maintenance.scm (%gnu-updater, %gnu-ftp-updater, %savannah-updater, %sourceforge-updater, %xorg-updater, %kernel.org-updater, %generic-html-updater), guix/import/cpan.scm (%cpan-updater), guix/import/cran.scm (%cran-updater, %bioconductor-updater), guix/import/crate.scm (%crate-updater), guix/import/egg.scm (%egg-updater), guix/import/elpa.scm (%elpa-updater), guix/import/gem.scm (%gem-updater), guix/import/git.scm (%generic-git-updater), guix/import/github.scm (%github-updater), guix/import/gnome.scm (%gnome-updater), guix/import/hackage.scm (%hackage-updater), guix/import/hexpm.scm (%hexpm-updater), guix/import/kde.scm (%kde-updater), guix/import/launchpad.scm (%launchpad-updater), guix/import/minetest.scm (%minetest-updater), guix/import/opam.scm (%opam-updater), guix/import/pypi.scm (%pypi-updater), guix/import/stackage.scm (%stackage-updater), tests/import-github.scm (found-sexp) tests/transformations.scm ("options->transformation, with-latest"): Adjust fieldname accordingly. Hartmut Goebel
2022-03-07tests: Adjust to (guix import github) changes....This is a followup to a8d3033da61958c53c44dd5db90672bfc4533ef9. * tests/import-github.scm (call-with-releases): Mock 'open-connection-for-uri'. Ludovic Courtès