1{-# OPTIONS_GHC -Wall #-}
2{-# LANGUAGE OverloadedStrings #-}
3module Reporting.Error.Docs where
7import qualified Reporting.Report as Report
8import qualified Reporting.Helpers as Help
9import Reporting.Helpers ((<>), text)
15 | OnlyInDocs Text [Text]
16 | OnlyInExports [Text]
26toReport :: Error -> Report.Report
33 ( "You must have a documentation comment between the module\
34 \ declaration and the imports."
36 ( text "Learn more at <http://package.elm-lang.org/help/documentation-format>"
39 OnlyInDocs name suggestions ->
43 ("Your module documentation includes `" <> name <> "` which is not exported."
45 ( Help.maybeYouWant (Just "Is it misspelled? Should it be exported?") suggestions
48 OnlyInExports names ->
52 ( "The following exports do not appear in your module documentation: "
53 <> Help.commaSep names
56 "All exports must be listed in the module documentation after a @docs keyword.\n"
57 <> "Learn more at <http://package.elm-lang.org/help/documentation-format>"
64 ( "There can only be one `" <> name <> "` in your module documentation."
66 ( text "Remove one of them!"
73 ("The `" <> name <> "` definition does not have a documentation comment.")
74 ( text "Learn more at <http://package.elm-lang.org/help/documentation-format>"
81 ("The `" <> name <> "` definition does not have a type annotation.")
83 "Adding type annotations is best practice and it gives you a chance to name\n"
84 <> "types and type variables so they are as easy as possible to understand!"
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list