Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- data Result a
- type Shortcut = Maybe Text -> Text -> Result Text
- allShortcuts :: [([Text], Shortcut)]
- wikipedia :: Shortcut
- tvtropes :: Shortcut
- facebook :: Shortcut
- vk :: Shortcut
- googleplus :: Shortcut
- twitter :: Shortcut
- juick :: Shortcut
- google :: Shortcut
- duckduckgo :: Shortcut
- yandex :: Shortcut
- baidu :: Shortcut
- npm :: Shortcut
- jam :: Shortcut
- rubygems :: Shortcut
- pypi :: Shortcut
- metacpanPod :: Shortcut
- metacpanRelease :: Shortcut
- hackage :: Shortcut
- cargo :: Shortcut
- pub :: Shortcut
- hex :: Shortcut
- cran :: Shortcut
- swiprolog :: Shortcut
- dub :: Shortcut
- bpkg :: Shortcut
- pear :: Shortcut
- github :: Shortcut
- gitlab :: Shortcut
- bitbucket :: Shortcut
- googleplay :: Shortcut
- chocolatey :: Shortcut
- braumeister :: Shortcut
- debian :: Shortcut
- aur :: Shortcut
- mint :: Shortcut
- fedora :: Shortcut
- gentoo :: Shortcut
- opensuse :: Shortcut
- marmalade :: Shortcut
- melpa :: Shortcut
- elpa :: Shortcut
- packagecontrol :: Shortcut
- atomPackage :: Shortcut
- atomTheme :: Shortcut
- jedit :: Shortcut
- vim :: Shortcut
- operaExt :: Shortcut
- operaTheme :: Shortcut
- firefox :: Shortcut
- chrome :: Shortcut
- ghcExt :: Shortcut
- rfc :: Shortcut
- ecma :: Shortcut
- cve :: Shortcut
Documentation
allShortcuts :: [([Text], Shortcut)] Source
A list of all functions included in this module, together with suggested names for them.
Encyclopedias
Link to an article in English Wikipedia:
[grey-headed flying fox](@w) https://en.wikipedia.org/wiki/Grey-headed_flying_fox
You can link to Wikipedia-in-another-language if you give language code as an option:
[Haskell](@w(ru)) https://ru.wikipedia.org/wiki/Haskell
Link to a trope:
[so bad, it's good](@tvtropes) http://tvtropes.org/pmwiki/pmwiki.php/Main/SoBadItsGood
Link to anything else (a series, for example):
[Elementary](@tvtropes(series)) http://tvtropes.org/pmwiki/pmwiki.php/Series/Elementary
Or something on Sugar Wiki:
[awesome music](@tvtropes(sugar wiki)) http://tvtropes.org/pmwiki/pmwiki.php/SugarWiki/AwesomeMusic
Social networks
Link by username:
[green](@fb) https://facebook.com/green
Or by profile ID (are there still people without usernames, actually?):
[someone something](@fb:164680686880529) https://facebook.com/profile.php?id=164680686880529
Vkontakte (Вконтакте)
Link by username:
[green](@vk) https://vk.com/green
Or by ID:
[Durov](@vk:1) https://vk.com/id1
Link by username:
[SergeyBrin](@gp) https://plus.google.com/+SergeyBrin
It's alright if the username already starts with a “+”:
[+SergeyBrin](@gp) https://plus.google.com/+SergeyBrin
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:
[Sergey Brin](@gp) https://plus.google.com/+SergeyBrin
You can also link by ID:
[Sergey Brin](@gp:109813896768294978296) https://plus.google.com/109813896768294978296
Finally, there are different links for hashtags:
[#Australia](@gp) https://plus.google.com/explore/Australia
Microblogs
Link by username:
[Edward Kmett](@t:kmett) https://twitter.com/kmett
It's alright if the username already starts with a “@”:
[@kmett](@t) https://twitter.com/kmett
There are different links for hashtags:
[#haskell](@t) https://twitter.com/hashtag/haskell
Link by username:
[thefish](@juick) https://juick.com/thefish
It's alright if the username already starts with a “@”:
[@thefish](@juick) https://juick.com/thefish
There are different links for tags (which start with “*” and not with “#”, by the way):
[*Haskell](@juick) https://juick.com/tag/Haskell
Major search engines
Yandex (Russian search engine)
Search results:
[random query](@yandex) http://yandex.ru/search/?noreask=1&text=random+query
Baidu (Chinese search engine)
Search results:
[random query](@baidu) http://baidu.com/s?nojc=1&wd=random+query
Programming language libraries
Ruby – RubyGems.org
Link to a package:
[github-markdown](@gem) https://rubygems.org/gems/github-markdown
metacpanPod :: Shortcut Source
Perl – MetaCPAN (by module)
Link to a module:
[Text::Markdown](@cpan) https://metacpan.org/pod/Text::Markdown
To link to a release, look at metacpanRelease
.
metacpanRelease :: Shortcut Source
Perl – MetaCPAN (by release)
Link to a release:
[Text-Markdown](@cpan-r) https://metacpan.org/release/Text-Markdown
SWI-Prolog – packages
Link to a package:
[markdown](@swiprolog) http://www.swi-prolog.org/pack/list?p=markdown
Code hosting
Link to a user:
[Aelve](@gh:aelve) https://github.com/aelve
Link to a repository:
[aelve/shortcut-links](@gh) https://github.com/aelve/shortcut-links
The repository owner can also be given as an option (to avoid mentioning nem in the link text):
[shortcut-links](@gh(aelve)) https://github.com/aelve/shortcut-links
Link to a user or a team (note that links like https://gitlab.com/owner work but are going to be automatically redirected to either https://gitlab.com/u/owner or https://gitlab.com/groups/owner, 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):
[CyanogenMod](@bitbucket) https://gitlab.com/CyanogenMod
Link to a repository:
[learnyou/lysa](@gitlab) https://gitlab.com/learnyou/lysa
The repository owner can also be given as an option (to avoid mentioning nem in the link text):
[lysa](@gitlab(learnyou)) https://gitlab.com/learnyou/lysa
Link to a user:
[Bryan](@bitbucket:bos) https://bitbucket.org/bos
Link to a repository:
[bos/text](@bitbucket) https://bitbucket.org/bos/text
The repository owner can also be given as an option (to avoid mentioning nem in the link text):
[text](@bitbucket(bos)) https://bitbucket.org/bos/text
OS packages
Mobile
Android – Google Play (formerly Play Market)
Link to an app:
[Opera Mini](@gplay:com.opera.mini.native) https://play.google.com/store/apps/details?id=com.opera.mini.native
Windows
OS X
braumeister :: Shortcut Source
Braumeister (Homebrew formulas)
Link to a formula:
[multimarkdown](@brew) http://braumeister.org/formula/multimarkdown
Linux
Debian – packages
Link to a package in stable distribution:
[ghc](@debian) https://packages.debian.org/stable/ghc
Distribution can be given as an option:
[ghc](@debian(experimental)) https://packages.debian.org/experimental/ghc
Arch Linux – AUR (“user repository”)
Link to a package:
[ghc-git](@aur) https://aur.archlinux.org/packages/ghc-git
Linux Mint – packages
Link to a package:
[ghc](@mint) http://community.linuxmint.com/software/view/ghc
Gentoo – packages
Link to a package:
[dev-lang/ghc](@gentoo) https://packages.gentoo.org/package/dev-lang/ghc
Category can be given as an option, to avoid cluttering link text:
[ghc](@gentoo(dev-lang)) https://packages.gentoo.org/package/dev-lang/ghc
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.
Addons
Text editors
Emacs – Marmalade
Link to a package:
[markdown-mode](@marmalade) https://marmalade-repo.org/packages/markdown-mode
packagecontrol :: Shortcut Source
Sublime Text – Package Control
Link to a package:
[MarkdownEditing](@sublimepc) https://packagecontrol.io/packages/MarkdownEditing
Atom – themes
Link to a theme:
[atom-material-ui](@atom-theme) https://atom.io/themes/atom-material-ui
jEdit – plugins
Link to a plugin:
[MarkdownPlugin](@jedit) http://plugins.jedit.org/plugins/?MarkdownPlugin
Vim – scripts
Link to a script (by ID):
[haskell.vim](@vim:2062) http://www.vim.org/scripts/script.php?script_id=2062
Browsers
Opera – extensions
Link to an extension:
[Amazon](@opera:amazon-for-opera) https://addons.opera.com/extensions/details/amazon-for-opera
Opera – themes
Link to a theme:
[Space theme](@opera-theme:space-15) https://addons.opera.com/en/themes/details/space-15
Firefox – add-ons
Link to an extension (or a theme):
[tree-style-tab](@firefox) https://addons.mozilla.org/firefox/addon/tree-style-tab
Chrome – Chrome Web Store
Link to an extension, app, or theme (using that weird random-looking ID):
[hdokiejnpimakedhajhdlcegeplioahd](@chrome) https://chrome.google.com/webstore/detail/hdokiejnpimakedhajhdlcegeplioahd
Manuals
GHC (Glasgow Haskell Compiler) extensions
Link to an extension's description in the user manual:
[ViewPatterns](@ghc-ext) https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/syntax-extns.html#view-patterns
Standards and databases
Link to an RFC:
[RFC 2026](@rfc) https://tools.ietf.org/html/rfc2026
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”.
Ecma standards and technical reports
Link to a standard:
[ECMA-262](@ecma) http://www.ecma-international.org/publications/standards/Ecma-262.htm
Link to a technical report:
[TR/71](@ecma) http://ecma-international.org/publications/techreports/E-TR-071.htm
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).
CVEs (Common Vulnerabilities and Exposures)
Link to a CVE:
[CVE-2014-10001](@cve) http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-10001
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”.