-- | Read the value of a double flag.
runFlagDouble :: F.FlagSpec -> Experiment Double
runFlagDouble (F.FlagSpec { F.long = k }) = flagValue k >>= \flagv ->
  case flagv of F.FDouble s -> return s
                _           -> error $ printf "BUG: Flag '%s' is not a double." k

-- | Declare a dependency on a file command line flag. File flags are only
-- satisfied when they refer to files that exist. (To accept a file that
-- does not exist, use a string flag.)
runFlagDouble :: F.FlagSpec -> Experiment Double
runFlagDouble (F.FlagSpec { F.long = k }) = flagValue k >>= \flagv ->
  case flagv of F.FDouble s -> return s
                _           -> error $ printf "BUG: Flag '%s' is not a double." k

-- | Declare a dependency on a file command line flag. File flags are only
-- satisfied when they refer to files that exist. (To accept a file that
-- does not exist, use a string flag.)
runFlagDouble (F.FlagSpec { F.long = k }) = flagValue k >>= \flagv ->
  case flagv of F.FDouble s -> return s
                _           -> error $ printf "BUG: Flag '%s' is not a double." k

-- | Declare a dependency on a file command line flag. File flags are only
-- satisfied when they refer to files that exist. (To accept a file that
-- does not exist, use a string flag.)