getSearchOptions :: IO [SearchOption]
getSearchOptions = do
  searchOptionsPath <- getDataFileName searchOptionsFile
  searchOptionsJsonString <- getFileString searchOptionsPath
  case searchOptionsJsonString of
    (Left _) -> return []
    (Right jsonString) ->
      case (eitherDecode (BC.pack jsonString) :: Either String SearchOptions) of
        (Left e) -> return [SearchOption {long=e, short=Nothing, desc=e}]
        (Right jsonSearchOptions) -> return (searchoptions jsonSearchOptions)
getSearchOptions :: IO [SearchOption]
getSearchOptions = do
  searchOptionsPath <- getDataFileName searchOptionsFile
  searchOptionsJsonString <- getFileString searchOptionsPath
  case searchOptionsJsonString of
    (Left _) -> return []
    (Right jsonString) ->
      case (eitherDecode (BC.pack jsonString) :: Either String SearchOptions) of
        (Left e) -> return [SearchOption {long=e, short=Nothing, desc=e}]
        (Right jsonSearchOptions) -> return (searchoptions jsonSearchOptions)
getSearchOptions = do
  searchOptionsPath <- getDataFileName searchOptionsFile
  searchOptionsJsonString <- getFileString searchOptionsPath
  case searchOptionsJsonString of
    (Left _) -> return []
    (Right jsonString) ->
      case (eitherDecode (BC.pack jsonString) :: Either String SearchOptions) of
        (Left e) -> return [SearchOption {long=e, short=Nothing, desc=e}]
        (Right jsonSearchOptions) -> return (searchoptions jsonSearchOptions)