on master help sign in
Get Elm.Compiler.Objects.Internal.destruct in a different way
commit8f102c00e8943bb76d627246542c63b1599c2e53 authorEvan Czaplicki <evancz@users.noreply.github.com> dateMon 15 May 2017, 23:56 (9 years ago) parent3db3bdf
1 file changed+2−7
src/Elm/Compiler/Objects/Internal.hs+2−7
src/Elm/Compiler/Objects/Internal.hs+2−7
@@ -35,7 +35,7 @@ import qualified AST.Variable as Var
3535
3636
3737newtype Graph =
38− Graph (Map.Map Var.Global Opt.Decl)
38+ Graph { _graph :: Map.Map Var.Global Opt.Decl }
3939
4040
4141
@@ -55,12 +55,7 @@ union (Graph objs1) (Graph objs2) =
5555
5656unions :: [Graph] -> Graph
5757unions graphs =
58− Graph (Map.unions (map destruct graphs))
59−
60−
61−destruct :: Graph -> Map.Map Var.Global Opt.Decl
62−destruct (Graph graph) =
63− graph
58+ Graph (Map.unions (map _graph graphs))
6459
6560
6661