{"@context":"https://w3id.org/codemeta/3.0","@type":"SoftwareSourceCode","identifier":"pkg:hackage/safe","name":"safe","description":"A library wrapping Prelude/Data.List functions that can throw exceptions, such as head and !!.\nEach unsafe function has up to four variants, e.g. with tail:\n\ntail :: [a] -\u003e [a], raises an error on tail [].\n\ntailMay :: [a] -\u003e Maybe [a], turns errors into Nothing.\n\ntailDef :: [a] -\u003e [a] -\u003e [a], takes a default to return on errors.\n\ntailNote :: String -\u003e [a] -\u003e [a], takes an extra argument which supplements the error message.\n\ntailSafe :: [a] -\u003e [a], returns some sensible default if possible, [] in the case of tail.\n\nThis package is divided into three modules:\n\nSafe contains safe variants of Prelude and Data.List functions.\n\nSafe.Foldable contains safe variants of Foldable functions.\n\nSafe.Exact creates crashing versions of functions like zip (errors if the lists are not equal) and take (errors if there are not enough elements), then wraps them to provide safe variants.","version":"0.3.21","softwareVersion":"0.3.21","license":"https://spdx.org/licenses/BSD-3-Clause","codeRepository":"https://github.com/ndmitchell/safe","issueTracker":"https://github.com/ndmitchell/safe/issues","url":"https://github.com/ndmitchell/safe#readme","keywords":["bsd3","library","unclassified","Propose Tags"],"programmingLanguage":{"@type":"ComputerLanguage","name":"Haskell"},"maintainer":[{"@type":"Person","name":"NeilMitchell"}],"author":[{"@type":"Person","name":"NeilMitchell"}],"copyrightHolder":[{"@type":"Person","name":"NeilMitchell"}],"dateCreated":"2008-05-21","dateModified":"2024-01-18","datePublished":"2024-01-18","copyrightYear":2008,"downloadUrl":"https://hackage.haskell.org/package/safe-0.3.21/safe-0.3.21.tar.gz","applicationCategory":"hackage","runtimePlatform":"hackage","developmentStatus":"active","sameAs":["https://hackage.haskell.org/package/safe"],"https://www.w3.org/ns/activitystreams#likes":47,"https://forgefed.org/ns#forks":12}