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]
25toReport :: Error -> Report.Report
32 ( "You must have a documentation comment between the module\
33 \ declaration and the imports."
35 ( text "Learn more at <http://package.elm-lang.org/help/documentation-format>"
38 OnlyInDocs name suggestions ->
42 ("Your module documentation includes `" <> name <> "` which is not exported."
45 "Is it misspelled? Should it be exported? "
46 <> Help.maybeYouWant suggestions
49 OnlyInExports names ->
53 ( "The following exports do not appear in your module documentation: "
54 <> Help.commaSep names
57 "All exports must be listed in the module documentation after a @docs keyword.\n"
58 <> "Learn more at <http://package.elm-lang.org/help/documentation-format>"
65 ("The value `" <> name <> "` does not have a documentation comment.")
66 ( text "Learn more at <http://package.elm-lang.org/help/documentation-format>"
73 ("The value `" <> name <> "` does not have a type annotation.")
75 "Adding type annotations is best practice and it gives you a chance to name\n"
76 <> "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