[Haskell-cafe] looking for alex+happy examples that uses location annotated tokens and location information in err msgs

Mateusz Kowalczyk fuuzetsu at fuuzetsu.co.uk
Sun Mar 9 11:44:54 UTC 2014


On 09/03/14 11:15, Ömer Sinan Ağacan wrote:
> I think GHC uses alex+happy in very different way than explained in
> the docs.. For example it doesn't use "posn", "monadUserState" etc.
> wrappers as explained in alex documentations. I also can't figure out
> how does it keep track of token locations.. I guess It's just too
> complicated for me to understand without spending several hours.
> 
> ---
> Ömer Sinan Ağacan
> http://osa1.net

It doesn't use the wrappers provided, it instead uses its own data
structures to do what the wrappers let you do and more. You can look for
the data types defined in those modules to try and shed some light on
how it's all done. I did mention it's not the most lightweight example ;)

-- 
Mateusz K.


More information about the Haskell-Cafe mailing list