@@ -5,7 +5,6 @@ module Elm.Project
55 , getRootWithReplFallback
66 , compile
77 , compileForRepl
8− , generateDocs
98 )
109 where
1110
@@ -13,10 +12,8 @@ module Elm.Project
1312import qualified Data.ByteString as BS
1413import Data.Map ((!))
1514import qualified Data.Name as Name
16−import System.FilePath ((</>))
1715
1816import qualified Elm.Compiler as Compiler
19−import qualified Elm.Docs as Docs
2017import qualified Elm.Project.Json as Project
2118import qualified Elm.Project.Root as Root
2219import qualified Elm.Project.Summary as Summary
@@ -29,7 +26,6 @@ import qualified Generate.Artifacts as Artifacts
2926import qualified Generate.Output as Output
3027import qualified Reporting.Render.Type.Localizer as L
3128import qualified Reporting.Task as Task
32−import qualified Stuff.Paths as Path
3329
3430
3531
@@ -54,18 +50,17 @@ compile
5450 :: Output.Mode
5551 -> Output.Target
5652 -> Maybe Output.Output
57− -> Maybe FilePath
5853 -> Summary
5954 -> [FilePath]
6055 -> Task.Task ()
61−compile mode target maybeOutput docs summary@(Summary.Summary root project _ _ _) paths =
56+compile mode target maybeOutput summary@(Summary.Summary root project _ _ _) paths =
6257 do Project.check project
6358 args <- Args.fromPaths summary paths
6459 graph <- Crawl.crawl summary args
65− (dirty, ifaces) <- Plan.plan docs summary graph
66− answers <- Compile.compile project docs ifaces dirty
60+ (dirty, ifaces) <- Plan.plan summary graph
61+ answers <- Compile.compile project ifaces dirty
6762 results <- Artifacts.write root answers
68− _ <- traverse (Artifacts.writeDocs results) docs
63+ -- _ <- traverse (Artifacts.writeDocs results) docs
6964 Output.generate mode target maybeOutput summary graph results
7065
7166
@@ -78,24 +73,8 @@ compileForRepl noColors localizer source maybeName =
7873 do summary@(Summary.Summary root project _ _ _) <- getRoot
7974 Project.check project
8075 graph <- Crawl.crawlFromSource summary source
81− (dirty, ifaces) <- Plan.plan Nothing summary graph
82− answers <- Compile.compile project Nothing ifaces dirty
76+ (dirty, ifaces) <- Plan.plan summary graph
77+ answers <- Compile.compile project ifaces dirty
8378 results <- Artifacts.write root answers
84− let (Compiler.Artifacts elmi _ _) = results ! Name.replModule
79+ let (Compiler.Artifacts elmi _) = results ! Name.replModule
8580 traverse (Output.generateReplFile noColors localizer summary graph elmi) maybeName
86−
87−
88−
89−-- GENERATE DOCS
90−
91−
92−generateDocs :: Summary.Summary -> Task.Task Docs.Documentation
93−generateDocs summary@(Summary.Summary root project _ _ _) =
94− do let docsPath = root </> Path.docs
95− args <- Args.fromSummary summary
96− graph <- Crawl.crawl summary args
97− (dirty, ifaces) <- Plan.plan (Just docsPath) summary graph
98− answers <- Compile.compile project (Just docsPath) ifaces dirty
99− results <- Artifacts.write root answers
100− Output.noDebugUsesInPackage summary graph
101− Artifacts.writeDocs results docsPath