diff options
author | https://www.google.com/accounts/o8/id?id=AItOawnq-RfkVpFN15SWvQ2lpSGAi0XpNQuLxKM <Yuval@web> | 2014-07-06 10:44:05 +0000 |
---|---|---|
committer | admin <admin@branchable.com> | 2014-07-06 10:44:05 +0000 |
commit | f85892d26cce3b4b3c6914f4a107f9ea42da69e5 (patch) | |
tree | c12d494de48c954229e09f3e0c7f3809e861f8ff /doc/coding_style | |
parent | ad321179a83d057be7ebe29d48c31d0f5735a65e (diff) |
Added a comment: What about safe?
Diffstat (limited to 'doc/coding_style')
-rw-r--r-- | doc/coding_style/comment_1_0097190e1bdfb6c7de032afd4fdfc374._comment | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/coding_style/comment_1_0097190e1bdfb6c7de032afd4fdfc374._comment b/doc/coding_style/comment_1_0097190e1bdfb6c7de032afd4fdfc374._comment new file mode 100644 index 000000000..d6fdd45d0 --- /dev/null +++ b/doc/coding_style/comment_1_0097190e1bdfb6c7de032afd4fdfc374._comment @@ -0,0 +1,20 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawnq-RfkVpFN15SWvQ2lpSGAi0XpNQuLxKM" + nickname="Yuval" + subject="What about safe?" + date="2014-07-06T10:44:05Z" + content=""" +https://hackage.haskell.org/package/safe + +> A library wrapping Prelude/Data.List functions that can throw exceptions, such as head and !!. Each unsafe function has up to four variants, e.g. with tail: +> +> tail :: [a] -> [a], raises an error on tail []. + +> tailMay :: [a] -> Maybe [a], turns errors into Nothing. + +> tailDef :: [a] -> [a] -> [a], takes a default to return on errors. + +> tailNote :: String -> [a] -> [a], takes an extra argument which supplements the error message. + +> tailSafe :: [a] -> [a], returns some sensible default if possible, [] in the case of tail. +"""]] |