on master help sign in
Make sure lists are recognized in --debug metadata

Fix https://github.com/elm-lang/elm-compiler/issues/1701

commit9cd628cf3a04179aa2f3cddb7e13a383cf172796 authorEvan Czaplicki <evancz@users.noreply.github.com> dateTue 22 May 2018, 11:15 (8 years ago) parentb7328e5
1 file changed+10−7
compiler/src/Elm/Compiler/Type/Extract.hs+10−7
compiler/src/Elm/Compiler/Type/Extract.hs+10−7
@@ -129,13 +129,16 @@ extractAlias interfaces (Opt.Global home name) =
129129
130130extractUnion :: I.Interfaces -> Opt.Global -> Extractor T.Union
131131extractUnion interfaces (Opt.Global home name) =
132− let
133− pname = toPublicName home name
134− unions = I._unions (interfaces ! home)
135− in
136− case I.toUnionInternals (unions ! name) of
137− Can.Union vars ctors _ _ ->
138− T.Union pname vars <$> traverse extractCtor ctors
132+ if name == N.list && home == ModuleName.list
133+ then return $ T.Union (toPublicName home name) ["a"] []
134+ else
135+ let
136+ pname = toPublicName home name
137+ unions = I._unions (interfaces ! home)
138+ in
139+ case I.toUnionInternals (unions ! name) of
140+ Can.Union vars ctors _ _ ->
141+ T.Union pname vars <$> traverse extractCtor ctors
139142
140143
141144extractCtor :: Can.Ctor -> Extractor (N.Name, [T.Type])