Related to this I want to ask about the definition of NonNullType. Wouldn't it make more sense to define NonNullType to be:
newtype NonNullType = NonNullType GType
Of course this will permit parsing something like A!!! - but I believe it would simplify some of the code and help fix the bug in the parser. One challenge with that approach, though, is that parsing a type declaration will then require a look-ahead. Does the declaration end with an exclamation mark or not.
There is a bug that prevents a document such as
from parsing.
Note the difference between:
And similarly for
Related to this I want to ask about the definition of
NonNullType
. Wouldn't it make more sense to defineNonNullType
to be:Of course this will permit parsing something like
A!!!
- but I believe it would simplify some of the code and help fix the bug in the parser. One challenge with that approach, though, is that parsing a type declaration will then require a look-ahead. Does the declaration end with an exclamation mark or not.