filterSpec :: Parser FilterFunc
filterSpec = many1 space *> string "where" *> filterSpec'
  where
    filterSpec' :: Parser FilterFunc
    filterSpec' = do
      void $ many1 space
      target <- many1 letter
      void $ many1 space
      void $ string "is"
      void $ many1 space
      value <- many1 letter
      case filterFunc target value of
        Left err -> parserFail err
        Right f  -> return f
filterSpec :: Parser FilterFunc
filterSpec = many1 space *> string "where" *> filterSpec'
  where
    filterSpec' :: Parser FilterFunc
    filterSpec' = do
      void $ many1 space
      target <- many1 letter
      void $ many1 space
      void $ string "is"
      void $ many1 space
      value <- many1 letter
      case filterFunc target value of
        Left err -> parserFail err
        Right f  -> return f
filterSpec = many1 space *> string "where" *> filterSpec'
  where
    filterSpec' :: Parser FilterFunc
    filterSpec' = do
      void $ many1 space
      target <- many1 letter
      void $ many1 space
      void $ string "is"
      void $ many1 space
      value <- many1 letter
      case filterFunc target value of
        Left err -> parserFail err
        Right f  -> return f