-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Link shortcuts for use in text markup
--   
--   This package is a database of link shortcuts. A Markdown example:
--   <tt>&lt;math&gt;(@w)</tt> turns into
--   <a>http://en.wikipedia.org/wiki/Google</a>.
--   
--   See the <a>ShortcutLinks.All</a> module for a full list of shortcuts.
@package shortcut-links
@version 0.4.2.0


-- | Useful functions when writing your own link rules.
module ShortcutLinks.Utils

-- | Replace spaces in text with chosen character (useful when processing
--   queries containing spaces – they are often turned into “+” or “_”).
--   
--   <pre>
--   &gt;&gt;&gt; replaceSpaces '_' "hi   there"
--   "hi___there"
--   </pre>
replaceSpaces :: Char -> Text -> Text

-- | Convert the 1st character of a string to upper case.
--   
--   This function is dumber than it could've been; when the 1st character
--   doesn't have a single-character uppercase form (like “ß”), it is left
--   intact instead of being converted (“Ss” in the case of “ß”). This is
--   good, however; for instance, if the “proper” capitalisation rule was
--   applied to e.g. Wikipedia links, a link to the article on “ß” would've
--   been rendered as “Ss”, which is a redirect to “Schutzstaffel”.
titleFirst :: Text -> Text

-- | Strip given prefix from a string, or do nothing if the string doesn't
--   have given prefix.
--   
--   This function is case-insensitive.
--   
--   <pre>
--   &gt;&gt;&gt; tryStripPrefixCI "FOO" "FooBAR"
--   "BAR"
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; tryStripPrefixCI "foo" "quux"
--   "quux"
--   </pre>
tryStripPrefixCI :: Text -> Text -> Text

-- | Strip given prefix from a string.
--   
--   This function is case-insensitive.
--   
--   <pre>
--   &gt;&gt;&gt; stripPrefixCI "FOO" "FooBAR"
--   Just "BAR"
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; stripPrefixCI "foo" "quux"
--   Nothing
--   </pre>
stripPrefixCI :: Text -> Text -> Maybe Text

-- | Choose the 2nd value if the 1st is empty (equal to <a>mempty</a>).
orElse :: (Eq a, Monoid a) => a -> a -> a

-- | A <tt>printf</tt>-like function which fully supports <a>Text</a> as an
--   input and output format and which uses <tt>{}</tt> instead of
--   <tt>%</tt> to indicate placeholders. If you use it, don't forget to
--   enable <tt>OverloadedStrings</tt>.
--   
--   This is a lightweight alternative to something like the text-format
--   package, and it's closer to <tt>printf</tt> and simpler to use.
format :: FormatType r => Text -> r
instance ShortcutLinks.Utils.FormatType GHC.Base.String
instance ShortcutLinks.Utils.FormatType Data.Text.Internal.Text
instance (ShortcutLinks.Utils.FormatArg a, ShortcutLinks.Utils.FormatType r) => ShortcutLinks.Utils.FormatType (a -> r)
instance ShortcutLinks.Utils.FormatArg Data.Text.Internal.Text
instance ShortcutLinks.Utils.FormatArg GHC.Base.String
instance ShortcutLinks.Utils.FormatArg GHC.Types.Int
instance ShortcutLinks.Utils.FormatArg GHC.Integer.Type.Integer

module ShortcutLinks.All
data Result a
Failure :: String -> Result a
Warning :: [String] -> a -> Result a
Success :: a -> Result a
type Shortcut = Maybe Text -> Text -> Result Text

-- | A list of all functions included in this module, together with
--   suggested names for them.
allShortcuts :: [([Text], Shortcut)]

-- | <a>Wikipedia</a> (shortcut: “w” or “wikipedia”)
--   
--   Link to an article in English Wikipedia:
--   
--   <pre>
--   &lt;math&gt;(@w)
--   <a>https://en.wikipedia.org/wiki/Grey-headed_flying_fox</a>
--   </pre>
--   
--   You can link to Wikipedia-in-another-language if you give language
--   code as an option:
--   
--   <pre>
--   &lt;math&gt;(@w(ru))
--   <a>https://ru.wikipedia.org/wiki/Haskell</a>
--   </pre>
wikipedia :: Shortcut

-- | <a>TV Tropes</a> (shortcut: “tvtropes”)
--   
--   Link to a trope:
--   
--   <pre>
--   &lt;math&gt;(@tvtropes)
--   <a>http://tvtropes.org/pmwiki/pmwiki.php/Main/SoBadItsGood</a>
--   </pre>
--   
--   Link to anything else (a series, for example):
--   
--   <pre>
--   &lt;math&gt;(@tvtropes(series))
--   <a>http://tvtropes.org/pmwiki/pmwiki.php/Series/Elementary</a>
--   </pre>
--   
--   Or something on Sugar Wiki:
--   
--   <pre>
--   &lt;math&gt;(@tvtropes(sugar wiki))
--   <a>http://tvtropes.org/pmwiki/pmwiki.php/SugarWiki/AwesomeMusic</a>
--   </pre>
tvtropes :: Shortcut

-- | <a>Facebook</a> (shortcut: “fb” or “facebook”)
--   
--   Link by username:
--   
--   <pre>
--   &lt;math&gt;(@fb)
--   <a>https://facebook.com/green</a>
--   </pre>
--   
--   Or by profile ID (are there still people without usernames,
--   actually?):
--   
--   <pre>
--   &lt;math&gt;(@fb:164680686880529)
--   <a>https://facebook.com/profile.php?id=164680686880529</a>
--   </pre>
facebook :: Shortcut

-- | <a>Vkontakte</a> (Вконтакте) (shortcut: “vk” or “vkontakte”)
--   
--   Link by username:
--   
--   <pre>
--   &lt;math&gt;(@vk)
--   <a>https://vk.com/green</a>
--   </pre>
--   
--   Or by ID:
--   
--   <pre>
--   &lt;math&gt;(@vk:1)
--   <a>https://vk.com/id1</a>
--   </pre>
vk :: Shortcut

-- | <a>Google+</a> (shortcut: “gp”, “gplus”, or “googleplus”)
--   
--   Link by username:
--   
--   <pre>
--   &lt;math&gt;(@gp)
--   <a>https://plus.google.com/+SergeyBrin</a>
--   </pre>
--   
--   It's alright if the username already starts with a “+”:
--   
--   <pre>
--   &lt;math&gt;(@gp)
--   <a>https://plus.google.com/+SergeyBrin</a>
--   </pre>
--   
--   Since many usernames are just “your full name without spaces”, in many
--   cases you can give a name and it's easy to make a username from it:
--   
--   <pre>
--   &lt;math&gt;(@gp)
--   <a>https://plus.google.com/+SergeyBrin</a>
--   </pre>
--   
--   You can also link by ID:
--   
--   <pre>
--   &lt;math&gt;(@gp:109813896768294978296)
--   <a>https://plus.google.com/109813896768294978296</a>
--   </pre>
--   
--   Finally, there are different links for hashtags:
--   
--   <pre>
--   &lt;math&gt;(@gp)
--   <a>https://plus.google.com/explore/Australia</a>
--   </pre>
googleplus :: Shortcut

-- | <a>Twitter</a> (shortcut: “t” or “twitter”)
--   
--   Link by username:
--   
--   <pre>
--   &lt;math&gt;(@t:kmett)
--   <a>https://twitter.com/kmett</a>
--   </pre>
--   
--   It's alright if the username already starts with a “@”:
--   
--   <pre>
--   &lt;math&gt;(@t)
--   <a>https://twitter.com/kmett</a>
--   </pre>
--   
--   There are different links for hashtags:
--   
--   <pre>
--   &lt;math&gt;(@t)
--   <a>https://twitter.com/hashtag/haskell</a>
--   </pre>
twitter :: Shortcut

-- | <a>Juick</a> (shortcut: “juick”)
--   
--   Link by username:
--   
--   <pre>
--   &lt;math&gt;(@juick)
--   <a>https://juick.com/thefish</a>
--   </pre>
--   
--   It's alright if the username already starts with a “@”:
--   
--   <pre>
--   &lt;math&gt;(@juick)
--   <a>https://juick.com/thefish</a>
--   </pre>
--   
--   There are different links for tags (which start with “*” and not with
--   “#”, by the way):
--   
--   <pre>
--   &lt;math&gt;(@juick)
--   <a>https://juick.com/tag/Haskell</a>
--   </pre>
juick :: Shortcut

-- | <a>Google</a> (shortcut: “google”)
--   
--   Search results:
--   
--   <pre>
--   &lt;math&gt;(@google)
--   <a>https://www.google.com/search?nfpr=1&amp;q=random+query</a>
--   </pre>
google :: Shortcut

-- | <a>Duckduckgo</a> (shortcut: “ddg” or “duckduckgo”)
--   
--   Search results:
--   
--   <pre>
--   &lt;math&gt;(@ddg)
--   <a>https://duckduckgo.com/?q=random+query</a>
--   </pre>
duckduckgo :: Shortcut

-- | <a>Yandex</a> (Russian search engine) (shortcut: “yandex”)
--   
--   Search results:
--   
--   <pre>
--   &lt;math&gt;(@yandex)
--   <a>http://yandex.ru/search/?noreask=1&amp;text=random+query</a>
--   </pre>
yandex :: Shortcut

-- | <a>Baidu</a> (Chinese search engine) (shortcut: “baidu”)
--   
--   Search results:
--   
--   <pre>
--   &lt;math&gt;(@baidu)
--   <a>http://baidu.com/s?nojc=1&amp;wd=random+query</a>
--   </pre>
baidu :: Shortcut

-- | <b>Node.js</b> – <a>NPM</a> (shortcut: “npm”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@npm)
--   <a>https://www.npmjs.com/package/markdown</a>
--   </pre>
npm :: Shortcut

-- | <b>Javascript</b> – <a>Jam</a> (shortcut: “jam”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@jam)
--   <a>http://jamjs.org/packages/#/details/pagedown</a>
--   </pre>
jam :: Shortcut

-- | <b>Ruby</b> – <a>RubyGems.org</a> (shortcut: “gem”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@gem)
--   <a>https://rubygems.org/gems/github-markdown</a>
--   </pre>
rubygems :: Shortcut

-- | <b>Python</b> – <a>PyPI</a> (shortcut: “pypi”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@pypi)
--   <a>https://pypi.python.org/pypi/Markdown</a>
--   </pre>
pypi :: Shortcut

-- | <b>Perl</b> – <a>MetaCPAN</a> (modules) (shortcut: “cpan”)
--   
--   Link to a module:
--   
--   <pre>
--   &lt;math&gt;(@cpan)
--   <a>https://metacpan.org/pod/Text::Markdown</a>
--   </pre>
--   
--   To link to a release, look at <a>metacpanRelease</a>.
metacpanPod :: Shortcut

-- | <b>Perl</b> – <a>MetaCPAN</a> (releases) (shortcut: “cpan-r”)
--   
--   Link to a release:
--   
--   <pre>
--   &lt;math&gt;(@cpan-r)
--   <a>https://metacpan.org/release/Text-Markdown</a>
--   </pre>
metacpanRelease :: Shortcut

-- | <b>Haskell</b> – <a>Hackage</a> (shortcut: “hackage”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@hackage)
--   <a>https://hackage.haskell.org/package/cmark</a>
--   </pre>
hackage :: Shortcut

-- | <b>Rust</b> – <a>Cargo</a> (shortcut: “cargo”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@cargo)
--   <a>https://crates.io/crates/hoedown</a>
--   </pre>
cargo :: Shortcut

-- | <b>Dart</b> – <a>pub</a> (shortcut: “pub”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@pub)
--   <a>https://pub.dartlang.org/packages/md_proc</a>
--   </pre>
pub :: Shortcut

-- | <b>Erlang</b> – <a>Hex</a> (shortcut: “hex”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@hex)
--   <a>https://hex.pm/packages/earmark</a>
--   </pre>
hex :: Shortcut

-- | <b>R</b> – <a>CRAN</a> (shortcut: “cran”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@cran)
--   <a>http://cran.r-project.org/web/packages/markdown</a>
--   </pre>
cran :: Shortcut

-- | <b>SWI-Prolog</b> – <a>packages</a> (shortcut: “swiprolog”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@swiprolog)
--   <a>http://www.swi-prolog.org/pack/list?p=markdown</a>
--   </pre>
swiprolog :: Shortcut

-- | <b>D</b> – <a>DUB</a> (shortcut: “dub”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@dub)
--   <a>http://code.dlang.org/packages/dmarkdown</a>
--   </pre>
dub :: Shortcut

-- | <b>Bash</b> – <a>bpkg</a> (shortcut: “bpkg”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@bpkg)
--   <a>http://www.bpkg.io/pkg/markdown</a>
--   </pre>
bpkg :: Shortcut

-- | <b>PHP</b> – <a>PEAR</a> (shortcut: “pear”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@pear)
--   <a>http://pear.php.net/package/Text_Wiki_Doku</a>
--   </pre>
pear :: Shortcut

-- | <a>Github</a> (shortcut: “gh” or “github”)
--   
--   Link to a user:
--   
--   <pre>
--   &lt;math&gt;(@gh:aelve)
--   <a>https://github.com/aelve</a>
--   </pre>
--   
--   Link to a repository:
--   
--   <pre>
--   &lt;math&gt;(@gh)
--   <a>https://github.com/aelve/shortcut-links</a>
--   </pre>
--   
--   The repository owner can also be given as an option (to avoid
--   mentioning nem in the link text):
--   
--   <pre>
--   &lt;math&gt;(@gh(aelve))
--   <a>https://github.com/aelve/shortcut-links</a>
--   </pre>
github :: Shortcut

-- | <a>Gitlab</a> (shortcut: “gitlab”)
--   
--   Link to a user or a team (note that links like
--   <a>https://gitlab.com/owner</a> work but are going to be automatically
--   redirected to either <a>https://gitlab.com/u/owner</a> or
--   <a>https://gitlab.com/groups/owner</a>, depending on whether it's a
--   user or a team – so, it's a case when the “links have to look as
--   authentic as possible” principle is violated, but nothing can be done
--   with that):
--   
--   <pre>
--   &lt;math&gt;(@bitbucket)
--   <a>https://gitlab.com/CyanogenMod</a>
--   </pre>
--   
--   Link to a repository:
--   
--   <pre>
--   &lt;math&gt;(@gitlab)
--   <a>https://gitlab.com/learnyou/lysa</a>
--   </pre>
--   
--   The repository owner can also be given as an option (to avoid
--   mentioning nem in the link text):
--   
--   <pre>
--   &lt;math&gt;(@gitlab(learnyou))
--   <a>https://gitlab.com/learnyou/lysa</a>
--   </pre>
gitlab :: Shortcut

-- | <a>Bitbucket</a> (shortcut: “bitbucket”)
--   
--   Link to a user:
--   
--   <pre>
--   &lt;math&gt;(@bitbucket:bos)
--   <a>https://bitbucket.org/bos</a>
--   </pre>
--   
--   Link to a repository:
--   
--   <pre>
--   &lt;math&gt;(@bitbucket)
--   <a>https://bitbucket.org/bos/text</a>
--   </pre>
--   
--   The repository owner can also be given as an option (to avoid
--   mentioning nem in the link text):
--   
--   <pre>
--   &lt;math&gt;(@bitbucket(bos))
--   <a>https://bitbucket.org/bos/text</a>
--   </pre>
bitbucket :: Shortcut

-- | <b>Android</b> – <a>Google Play</a> (formerly Play Market) (shortcut:
--   “gplay” or “googleplay”)
--   
--   Link to an app:
--   
--   <pre>
--   &lt;math&gt;(@gplay:com.opera.mini.native)
--   <a>https://play.google.com/store/apps/details?id=com.opera.mini.native</a>
--   </pre>
googleplay :: Shortcut

-- | <a>Chocolatey</a> (shortcut: “chocolatey”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@chocolatey)
--   <a>https://chocolatey.org/packages/Opera</a>
--   </pre>
chocolatey :: Shortcut

-- | <a>Braumeister</a> (Homebrew formulas) (shortcut: “brew”)
--   
--   Link to a formula:
--   
--   <pre>
--   &lt;math&gt;(@brew)
--   <a>http://braumeister.org/formula/multimarkdown</a>
--   </pre>
--   
--   Since all Homebrew formulas are stored in a Github repo anyway, and
--   various sites are merely convenient ways to browse that repo, the
--   “brew” shortcut can point to some other site in the future, depending
--   on which site seems better. Don't use it if you need
--   <i>specifically</i> Braumeister.
brew :: Shortcut

-- | <b>Debian</b> – <a>packages</a> (shortcut: “debian”)
--   
--   Link to a package in stable distribution:
--   
--   <pre>
--   &lt;math&gt;(@debian)
--   <a>https://packages.debian.org/stable/ghc</a>
--   </pre>
--   
--   Distribution can be given as an option:
--   
--   <pre>
--   &lt;math&gt;(@debian(experimental))
--   <a>https://packages.debian.org/experimental/ghc</a>
--   </pre>
debian :: Shortcut

-- | <b>Arch Linux</b> – <a>AUR</a> (“user repository”) (shortcut: “aur”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@aur)
--   <a>https://aur.archlinux.org/packages/ghc-git</a>
--   </pre>
aur :: Shortcut

-- | <b>Linux Mint</b> – <a>packages</a> (shortcut: “mint”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@mint)
--   <a>http://community.linuxmint.com/software/view/ghc</a>
--   </pre>
mint :: Shortcut

-- | <b>Fedora</b> – <a>packages</a> (shortcut: “fedora”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@fedora)
--   <a>https://admin.fedoraproject.org/pkgdb/package/ghc</a>
--   </pre>
fedora :: Shortcut

-- | <b>Gentoo</b> – <a>packages</a> (shortcut: “gentoo”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@gentoo)
--   <a>https://packages.gentoo.org/package/dev-lang/ghc</a>
--   </pre>
--   
--   Category can be given as an option, to avoid cluttering link text:
--   
--   <pre>
--   &lt;math&gt;(@gentoo(dev-lang))
--   <a>https://packages.gentoo.org/package/dev-lang/ghc</a>
--   </pre>
--   
--   Note that if you don't specify any category, the link would still work
--   – but there are a lot of packages with overlapping names (like “ace”,
--   “csv”, “http”), and such links would lead to search pages listing
--   several packages. So, it's better to include categories.
gentoo :: Shortcut

-- | <b>openSUSE</b> – <a>packages</a> (shortcut: “opensuse”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@opensuse)
--   <a>http://software.opensuse.org/package/ghc</a>
--   </pre>
opensuse :: Shortcut

-- | <b>Emacs</b> – <a>Marmalade</a> (shortcut: “marmalade”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@marmalade)
--   <a>https://marmalade-repo.org/packages/markdown-mode</a>
--   </pre>
marmalade :: Shortcut

-- | <b>Emacs</b> – <a>MELPA</a> (shortcut: “melpa”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@melpa)
--   <a>http://melpa.org/#/markdown-mode</a>
--   </pre>
melpa :: Shortcut

-- | <b>Emacs</b> – <a>ELPA</a> (shortcut: “elpa”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@elpa)
--   <a>https://elpa.gnu.org/packages/undo-tree.html</a>
--   </pre>
elpa :: Shortcut

-- | <b>Sublime Text</b> – <a>Package Control</a> (shortcut: “sublimepc”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@sublimepc)
--   <a>https://packagecontrol.io/packages/MarkdownEditing</a>
--   </pre>
packagecontrol :: Shortcut

-- | <b>Atom</b> – <a>packages</a> (shortcut: “atom”)
--   
--   Link to a package:
--   
--   <pre>
--   &lt;math&gt;(@atom)
--   <a>https://atom.io/packages/tidy-markdown</a>
--   </pre>
atomPackage :: Shortcut

-- | <b>Atom</b> – <a>themes</a> (shortcut: “atom-theme”)
--   
--   Link to a theme:
--   
--   <pre>
--   &lt;math&gt;(@atom-theme)
--   <a>https://atom.io/themes/atom-material-ui</a>
--   </pre>
atomTheme :: Shortcut

-- | <b>jEdit</b> – <a>plugins</a> (shortcut: “jedit”)
--   
--   Link to a plugin:
--   
--   <pre>
--   &lt;math&gt;(@jedit)
--   <a>http://plugins.jedit.org/plugins/?MarkdownPlugin</a>
--   </pre>
jedit :: Shortcut

-- | <b>Vim</b> – <a>scripts</a> (shortcut: “vim”)
--   
--   Link to a script (by ID):
--   
--   <pre>
--   &lt;math&gt;(@vim:2062)
--   <a>http://www.vim.org/scripts/script.php?script_id=2062</a>
--   </pre>
vim :: Shortcut

-- | <b>Opera</b> – <a>extensions</a> (shortcut: “opera”)
--   
--   Link to an extension:
--   
--   <pre>
--   &lt;math&gt;(@opera:amazon-for-opera)
--   <a>https://addons.opera.com/extensions/details/amazon-for-opera</a>
--   </pre>
operaExt :: Shortcut

-- | <b>Opera</b> – <a>themes</a> (shortcut: “opera-theme”)
--   
--   Link to a theme:
--   
--   <pre>
--   &lt;math&gt;(@opera-theme:space-15)
--   <a>https://addons.opera.com/en/themes/details/space-15</a>
--   </pre>
operaTheme :: Shortcut

-- | <b>Firefox</b> – <a>add-ons</a> (shortcut: “firefox”)
--   
--   Link to an extension (or a theme):
--   
--   <pre>
--   [tree-style-tab](@firefox)
--   <a>https://addons.mozilla.org/firefox/addon/tree-style-tab</a>
--   </pre>
firefox :: Shortcut

-- | <b>Chrome</b> – <a>Chrome Web Store</a> (shortcut: “chrome”)
--   
--   Link to an extension, app, or theme (using that weird random-looking
--   ID):
--   
--   <pre>
--   [hdokiejnpimakedhajhdlcegeplioahd](@chrome)
--   <a>https://chrome.google.com/webstore/detail/hdokiejnpimakedhajhdlcegeplioahd</a>
--   </pre>
chrome :: Shortcut

-- | <a>GHC</a> (Glasgow Haskell Compiler) extensions (shortcut: “ghc-ext”)
--   
--   Link to an extension's description in the user manual:
--   
--   <pre>
--   &lt;math&gt;(@ghc-ext)
--   <a>https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/syntax-extns.html#view-patterns</a>
--   </pre>
ghcExt :: Shortcut

-- | <a>RFCs</a> (shortcut: “rfc”)
--   
--   Link to an RFC:
--   
--   <pre>
--   &lt;math&gt;(@rfc)
--   <a>https://tools.ietf.org/html/rfc2026</a>
--   </pre>
--   
--   Precise format of recognised text: optional “rfc” (case-insensitive),
--   then arbitrary amount of spaces and punctuation (or nothing), then the
--   number. Examples: “RFC 2026”, “RFC-2026”, “rfc2026”, “rfc 2026”.
rfc :: Shortcut

-- | <a>Ecma standards and technical reports</a> (shortcut: “ecma”)
--   
--   Link to a standard:
--   
--   <pre>
--   &lt;math&gt;(@ecma)
--   <a>http://www.ecma-international.org/publications/standards/Ecma-262.htm</a>
--   </pre>
--   
--   Link to a technical report:
--   
--   <pre>
--   &lt;math&gt;(@ecma)
--   <a>http://ecma-international.org/publications/techreports/E-TR-071.htm</a>
--   </pre>
--   
--   Precise format of recognised text for standards: optional “ECMA”
--   (case-insensitive), then arbitrary amount of spaces and punctuation
--   (or nothing), then the number. Examples: “ECMA-262”, “ECMA 262”,
--   “ecma262”, “ECMA 262”.
--   
--   Format for technical reports is the same, except that “TR” (instead of
--   “ECMA”) is not optional (so, if there's only a number given, it's
--   considered a standard and not a technical report).
ecma :: Shortcut

-- | <a>CVEs</a> (Common Vulnerabilities and Exposures) (shortcut: “cve”)
--   
--   Link to a CVE:
--   
--   <pre>
--   &lt;math&gt;(@cve)
--   <a>http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-10001</a>
--   </pre>
--   
--   Precise format of recognised text: optional “cve” (case-insensitive),
--   then arbitrary amount of spaces and punctuation (or nothing), then the
--   year, “-”, and a number. Examples: “CVE-2014-10001”, “cve 2014-10001”,
--   “2014-10001”.
cve :: Shortcut
instance GHC.Base.Functor ShortcutLinks.All.Result
instance GHC.Show.Show a => GHC.Show.Show (ShortcutLinks.All.Result a)
instance GHC.Base.Applicative ShortcutLinks.All.Result
instance GHC.Base.Monad ShortcutLinks.All.Result

module ShortcutLinks
data Result a
Failure :: String -> Result a
Warning :: [String] -> a -> Result a
Success :: a -> Result a
type Shortcut = Maybe Text -> Text -> Result Text

-- | A list of all functions included in this module, together with
--   suggested names for them.
allShortcuts :: [([Text], Shortcut)]

-- | Use a shortcut from <a>allShortcuts</a>.
--   
--   This is the main function you should use.
useShortcut :: Text -> Maybe Text -> Text -> Result Text

-- | Use a shortcut from a list.
--   
--   For instance, if you want to add <tt>hk</tt> as a synonym for
--   <tt>hackage</tt>, you'd write:
--   
--   <pre>
--   &gt;&gt;&gt; useShortcutFrom ((["hk"], hackage) : allShortcuts)
--   </pre>
useShortcutFrom :: [([Text], Shortcut)] -> Text -> Maybe Text -> Text -> Result Text
