For a uni assignment I need to write parsers in Haskell, right now I have the following parser i think is correct:
parseYear :: Parser Char Year
parseYear = Year <$> ...
I want to check if it works, for example with > parseYear "2004" in ghci. this command is not valid, but i there another way to quickly check if a parser I'm writing is correct?
Edit:
Example, for the parser:nesting :: Parser Char Int, this would be what i want

From your comment responses, I understand that you're using the
uu-tclibrary, but yourParsertype does not come fromParseLib.Simple, because it's not a function.This means your
Parsertype must come either fromParseLib.Parallelor fromParseLib.Abstract. Both of those modules define theirParsertype asdata, and both expose aparsefunction - here's the one fromParseLib.Abstractand here's the one fromParseLib.Parallel.Both these
parsefunctions have the same shape: they take aParseras first parameter and an input list as second. So that's how you would call it: