I\'ve ran into a problem while writing a parser. Specifically, I want to be return values of different types. For example, I have two different data types FA an
FA
What exactly do you want?
If you know at compile time whether you want an FA or a PA, then GADTs are a good way to do that.
PA
If you want to decide at run-time to parse either an FA or a PA, you could use... Either FA PA.
Either FA PA