@@ -71,7 +71,7 @@ type Task a = Task.Task Exit.Make a
73run :: [FilePath] -> Flags -> IO ()
73run :: [FilePath] -> Flags -> IO ()
74−run paths (Flags debug optimize maybeOutput report _) =
74+run paths (Flags debug optimize maybeOutput report maybeDocs) =
75 do style <- getStyle report
75 do style <- getStyle report
76 Reporting.attemptWithStyle style Exit.makeToReport $ Task.run $
76 Reporting.attemptWithStyle style Exit.makeToReport $ Task.run $
77 do root <- getRoot
77 do root <- getRoot
@@ -80,7 +80,7 @@ run paths (Flags debug optimize maybeOutput report _) =
80 case paths of
80 case paths of
82 do exposed <- getExposed details
82 do exposed <- getExposed details
83− _ <- buildExposed style root details exposed
83+ buildExposed style root details maybeDocs exposed
@@ -170,10 +170,13 @@ getExposed (Details.Details _ validOutline _ _ _) =
170-- BUILD PROJECTS
170-- BUILD PROJECTS
173−buildExposed :: Reporting.Style -> FilePath -> Details.Details -> NE.List ModuleName.Raw -> Task ()
173+buildExposed :: Reporting.Style -> FilePath -> Details.Details -> Maybe FilePath -> NE.List ModuleName.Raw -> Task ()
174−buildExposed style root details exposed =
174+buildExposed style root details maybeDocs exposed =
176+ docsGoal = maybe Build.IgnoreDocs Build.WriteDocs maybeDocs
175 Task.eio Exit.MakeCannotBuild $
178 Task.eio Exit.MakeCannotBuild $
176− Build.fromExposed style root details Build.IgnoreDocs exposed
179+ Build.fromExposed style root details docsGoal exposed
179buildPaths :: Reporting.Style -> FilePath -> Details.Details -> NE.List FilePath -> Task Build.Artifacts
182buildPaths :: Reporting.Style -> FilePath -> Details.Details -> NE.List FilePath -> Task Build.Artifacts