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]) 719dbcd8ea5c0e90b187a738'>commitdiff
path: root/tests/graph.scm
AgeCommit message (Expand)Author
2020-10-20graph: Adjust test for recent OCaml changes....Ludovic Courtès
2020-05-22packages: Introduce <content-hash> and use it in <origin>....Ludovic Courtès
2020-05-11graph: Add 'shortest-path'....Ludovic Courtès
2020-05-11graph: reference/referrer node types work with graph traversal....Ludovic Courtès
2020-02-05tests: Adjust reverse-bag graph test to recent OCaml changes....Ludovic Courtès
2019-03-23Merge branch 'staging' into core-updatesMarius Bakke
2019-03-23graph: Add the 'reverse-bag' graph....Ludovic Courtès
2018-09-22bootstrap: %bootstrap-inputs: Wrap input lists into thunks....Jan Nieuwenhuizen