Steps to reproduce (with a fresh ~/.cabal/config):
This results in the following error:
cabal: Command.optionToFieldDescr: feature not implemented
This happens because optionVerbosity in D.S.Setup produces an OptArg option, but optionToFieldDescr in D.S.Command doesn't handle such options:
OptArg _ _ _ _readE _ _ -> -- The behaviour in this case is not clear, and it has no use so far,
-- so we avoid future surprises by not implementing it.
error "Command.optionToFieldDescr: feature not implemented"
What is the correct way to fix this? Change optionVerbosity to a ReqArg option or make viewAsFieldDescr a total function?
I was aware of this, and actually thought there's an open bug about this issue, but now I can't find it ...
Make 'viewAsFieldDescr' a total function.
Fixes #980 by allowing to create config fields from options with optional
arguments. Without this change, setting the 'jobs' or 'verbose' fields in the
config file results in a fatal error on startup.