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."
46 "Is it misspelled? Should it be exported? "
47 <> Help.maybeYouWant suggestions
50 OnlyInExports names ->
54 ( "The following exports do not appear in your module documentation: "
55 <> Help.commaSep names
58 "All exports must be listed in the module documentation after a @docs keyword.\n"
59 <> "Learn more at <http://package.elm-lang.org/help/documentation-format>"
66 ( "There can only be one `" <> name <> "` in your module documentation."
68 ( text "Remove one of them!"
75 ("The `" <> name <> "` definition does not have a documentation comment.")
76 ( text "Learn more at <http://package.elm-lang.org/help/documentation-format>"
83 ("The `" <> name <> "` definition does not have a type annotation.")
85 "Adding type annotations is best practice and it gives you a chance to name\n"
86 <> "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