From fb2759d1c7c19d5790c0fe1b719ccc93539a6884 Mon Sep 17 00:00:00 2001 From: Herbert Valerio Riedel Date: Thu, 20 Jul 2017 12:08:53 +0200 Subject: Import @aisamanra's Haddock cheatsheet from https://github.com/aisamanra/haddock-cheatsheet --- doc/cheatsheet/haddocks.svg | 624 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 624 insertions(+) create mode 100644 doc/cheatsheet/haddocks.svg (limited to 'doc/cheatsheet/haddocks.svg') diff --git a/doc/cheatsheet/haddocks.svg b/doc/cheatsheet/haddocks.svg new file mode 100644 index 00000000..ea08781f --- /dev/null +++ b/doc/cheatsheet/haddocks.svg @@ -0,0 +1,624 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + Code Sections -- * Section -- ** Sub-section -- *** Sub-sub-section -- et cetera + Named Documentation Chunks -- $name[...] -- $name -- Here is the documentation text -- which is embedded elsewhere + Code BlocksWith internal markup: -- @ -- fact n = product [1..n] -- @With literal text: -- > fact n = product [1..n] + REPL Examples -- >>> fact 5 -- 120 + Properties -- prop> a + b = b + a + Hyperlinked Identifiers -- The value 'x' of type 'T' -- The out-of-scope 'MyModule.x' -- The "MyModule" module + Textual Markup -- Emphasis: /forward slashes/. -- Bolding: __underscores__. -- Monospaced text: @at signs@. + Links and Images -- A raw link <http://example.com> -- [a link](http://example.com) -- ![description](imagepath.png) + Listsitemized with "*" or "-" -- * first item -- * second itemnumbered with "(n)" or "n." -- 1. first item -- 2. second itemdefinitions with "[thing]" -- [one] first item -- [two] second item + Mathematics/LaTeX -- \[ -- f(n) = \Sum_{i=1}^{n} i -- \] -- when \(n > 0\) + Headings in Documentation -- = Heading -- == Sub-heading -- === sub-sub-heading + Metadata -- @since 1.2.3 + Module Attributes{-# OPTIONS_HADDOCK hide #-} Omit this module from the docs{-# OPTIONS_HADDOCK prune #-} Omit definitions without docs{-# OPTIONS_HADDOCK ignore-exports #-} Treat this module as though all top-level items are exported{-# OPTIONS_HADDOCK not-home #-} Do not treat this module as the "home" of identifiers it exports{-# OPTIONS_HADDOCK show-extensions #-} Show all enabled LANGUAGE extensions + Haddock Markup + + + Haddock Markup Cheat-sheet, Version 1.1Getty Ritter (@aisamanra)github.com/aisamanra/haddock-cheatsheetThis work is licensed under a Creative CommonsAttribution-ShareAlike 4.0 International License + + -- cgit v1.2.3