{"@context":"https://w3id.org/codemeta/3.0","@type":"SoftwareSourceCode","identifier":"pkg:hackage/usb-safe","name":"usb-safe","description":"The usb package provides a standard Haskell abstraction layer over\nbindings-libusb providing: abstract types instead of Ptrs, automatic\nmarshalling and unmarshalling, automatic garbage collection,\nexceptions instead of integer return codes, etc..\n\nWhile all that is very nice there are still some things that you can\ndo wrong. For example doing I/O with a closed device or reading from\nor writing to an endpoint which doesn't belong to the claimed\ninterface. Or reading from an Out endpoint or writing to an In\nendpoint.\n\nusb-safe provides the following guarantees:\n\nYou can't reference handles to devices that are closed. In other words: no\nI/O with closed handles is possible.\n\nThe programmer specifies the region in which devices should remain open. On\nexit from the region the opened devices will be closed automatically.\n\nYou can't reference handles to configurations that have not been set.\n\nYou can't reference handles to interfaces that have not been claimed.\n\nJust like with devices, the programmer can specify the region in\nwhich interfaces should remain claimed. On exit from the region\nthe claimed interfaces will be released automatically.\n\nYou can't reference handles to alternates that have not been set.\n\nYou can't reference endpoints that don't belong to a setted alternate.\n\nYou can't read from an endpoint with an Out transfer direction.\n\nYou can't write to an endpoint with an In transfer direction.\n\nThe primary technique used in usb-safe is called \"Lightweight monadic\nregions\" which was invented by Oleg Kiselyov and Chung-chieh Shan.\nSee:\n\nhttp://okmij.org/ftp/Haskell/regions.html#light-weight\n\nThis technique is implemented in the regions package which is\nre-exported from usb-safe.\n\nSee the usb-safe-examples package for examples how to use this library:","version":"0.14","softwareVersion":"0.14","license":"https://spdx.org/licenses/BSD-3-Clause","codeRepository":"https://github.com/basvandijk/usb-safe","issueTracker":"https://github.com/basvandijk/usb-safe/issues","url":"https://github.com/basvandijk/usb-safe/","keywords":["bsd3","library","monadic-regions","system","Propose Tags"],"programmingLanguage":{"@type":"ComputerLanguage","name":"Haskell"},"maintainer":[{"@type":"Person","name":"BasVanDijk"}],"author":[{"@type":"Person","name":"BasVanDijk"}],"copyrightHolder":[{"@type":"Person","name":"BasVanDijk"}],"dateCreated":"2009-12-08","dateModified":"2011-09-23","datePublished":"2011-09-23","copyrightYear":2009,"downloadUrl":"https://hackage.haskell.org/package/usb-safe-0.14/usb-safe-0.14.tar.gz","applicationCategory":"hackage","runtimePlatform":"hackage","developmentStatus":"active","sameAs":["https://hackage.haskell.org/package/usb-safe"],"https://www.w3.org/ns/activitystreams#likes":5,"https://forgefed.org/ns#forks":1}