Expose Elm.Compiler.Objects.unions
commit9fd8302602df3a638270f58fd622471c75bb8a28
authorEvan Czaplicki <evancz@users.noreply.github.com>
dateTue 28 Mar 2017, 20:45 (10 years ago)
parent6eaff9e
src/Elm/Compiler/Objects.hs+1
@@ -2,6 +2,7 @@
22module Elm.Compiler.Objects
33 ( Graph
44 , union
5+ , unions
56 , Roots
67 , main
78 )
src/Elm/Compiler/Objects/Internal.hs+11
@@ -4,6 +4,7 @@ module Elm.Compiler.Objects.Internal
44 ( Graph(..)
55 , fromModule
66 , union
7+ , unions
78 , Roots
89 , main
910 , toGlobals
@@ -45,6 +46,16 @@ union (Graph objs1) (Graph objs2) =
4546 Graph (Map.union objs1 objs2)
4647
4748
49+unions :: [Graph] -> Graph
50+unions graphs =
51+ Graph (Map.unions (map destruct graphs))
52+
53+
54+destruct :: Graph -> Map.Map Var.Global Opt.Decl
55+destruct (Graph graph) =
56+ graph
57+
58+
4859
4960-- ROOTS
5061