Personal tools

Command line option parsers

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(details on cmdargs, cmdtheline, optparse-applicative)
(details on getflag, console-program, cmdlib)
Line 5: Line 5:
 
! Package !! Multi-mode !! Extensions !! Remark
 
! Package !! Multi-mode !! Extensions !! Remark
 
|-
 
|-
| {{HackagePackage|id=cmdargs}} || X || ? || <hask>unsafePerformIO</hask>
+
| {{HackagePackage|id=cmdargs}} || X || TemplateHaskell, SYB generics, ViewPatterns, ... || <hask>unsafePerformIO</hask>
 
|-
 
|-
| {{HackagePackage|id=cmdlib}}
+
| {{HackagePackage|id=cmdlib}} || X || SYB generics || based on [[GetOpt]]
 
|-
 
|-
| {{HackagePackage|id=cmdtheline}} || X || . || shows help as man-page
+
| {{HackagePackage|id=cmdtheline}} || X || FlexibleInstances (although unnecessary) || shows help as man-page
 
|-
 
|-
| {{HackagePackage|id=console-program}}
+
| {{HackagePackage|id=console-program}} || X || TemplateHaskell || configure options via files
 
|-
 
|-
| {{HackagePackage|id=getflag}}
+
| {{HackagePackage|id=getflag}} || . || Haskell98 || like [[GetOpt]] but with Unix/Plan 9 option syntax
 
|-
 
|-
 
| {{HackagePackage|id=hflags}}
 
| {{HackagePackage|id=hflags}}

Revision as of 17:26, 7 November 2012

There are several packages that want to simplify the task of writing command line parsers. Unfortunately, they are distributed across several Hackage categories. Here is an attempt to list them:

Package Multi-mode Extensions Remark
cmdargs X TemplateHaskell, SYB generics, ViewPatterns, ...
unsafePerformIO
cmdlib X SYB generics based on GetOpt
cmdtheline X FlexibleInstances (although unnecessary) shows help as man-page
console-program X TemplateHaskell configure options via files
getflag . Haskell98 like GetOpt but with Unix/Plan 9 option syntax
hflags
multiarg
options
optparse-applicative X . Applicative Functor
parseargs
ReadArgs
simpleargs
yaop