10 import System
.Environment
26 isHelp
:: String -> Bool
27 isHelp str
= str `
elem`
["-h","help","--help"]
29 usage
:: Operation
-> String
30 usage op
= show op
++ " not yet implemented"
32 parseArg
:: String -> Either String Operation
33 parseArg op
= case op
of
35 "bookmark" -> Right Bookmark
36 "citation" -> Right Citation
39 "--help" -> Right Help
40 "modify" -> Right Modify
41 "remove" -> Right Remove
42 "search" -> Right Search
44 "version" -> Right Version
45 _
-> Left
$ "Invalid argument: " ++ op