on e00a3f3 help sign in
elk/src/Elm/Compiler/Objects.hs
31 lines 630 B history raw
1{-# OPTIONS_GHC -Wall #-}
2module Elm.Compiler.Objects
3 ( Graph
4 , union
5 , unions
6 , graphForPackage
7 , Roots
8 , mains
9 , value
10 )
11 where
14import qualified Data.Map as Map
16import qualified AST.Module.Name as ModuleName
17import qualified Elm.Compiler as Compiler
18import Elm.Compiler.Objects.Internal as Obj
22-- HELPER
25graphForPackage :: Map.Map ModuleName.Raw Compiler.KernelInfo -> [Compiler.Result] -> Obj.Graph
26graphForPackage kernels results =
27 let
28 kernelGraph =
29 Obj.Graph Map.empty (Map.map (\(Compiler.KernelInfo info) -> info) kernels)
30 in
31 Obj.unions (kernelGraph : map Compiler._objs results)