haskell / alex

A lexical analyser generator for Haskell
https://hackage.haskell.org/package/alex
BSD 3-Clause "New" or "Revised" License
297 stars 82 forks source link

[ #71 ] declare head locally for better error reporting #137

Closed andreasabel closed 4 years ago

andreasabel commented 5 years ago

Tiny PR: modification used to find cause of #71

simonmar commented 5 years ago

If this is just for debugging, does it need to be in the codebase?

Why not compile with profiling and get a trace for the error? Or use ghci -prof -fexternal-interpreter.