1{-# OPTIONS_GHC -Wall #-}
2module Reporting.Error.Docs where
4import Text.PrettyPrint.ANSI.Leijen (text)
6import qualified Reporting.Error.Helpers as Help
7import qualified Reporting.Report as Report
13 | OnlyInDocs String [String]
14 | OnlyInExports [String]
23toReport :: Error -> Report.Report
30 ( "You must have a documentation comment between the module declaration and the\n"
33 ( text "Learn more at <http://package.elm-lang.org/help/documentation-format>"
36 OnlyInDocs name suggestions ->
40 ("Your module documentation includes `" ++ name ++ "` which is not exported.")
42 "Is it misspelled? Should it be exported? "
43 ++ Help.maybeYouWant suggestions
46 OnlyInExports names ->
50 ( "The following exports do not appear in your module documentation:\n"
51 ++ concatMap ("\n " ++) names
54 "All exports must be listed in the module documentation after a @docs keyword.\n"
55 ++ "Learn more at <http://package.elm-lang.org/help/documentation-format>"
62 ("The value `" ++ name ++ "` does not have a documentation comment.")
63 ( text "Learn more at <http://package.elm-lang.org/help/documentation-format>"
70 ("The value `" ++ name ++ "` does not have a type annotation.")
72 "Adding type annotations is best practice and it gives you a chance to name\n"
73 ++ "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