TTG: Handling Source Locations
sh.najd at gmail.com
Wed Feb 13 13:00:58 UTC 2019
>is there any plan to get rid of all those panics?
There are two sorts of panics related to TTG: the ones due to #15247
(i.e. unused extension constructors), and the ones due to #15884 (i.e.
issues with view patterns).
About the former, I believe we all agree. Moreover, using Solution A
discussed above, there will be way less unused extension constructors
anyway: HsSyn types will use their extension constructors for the
location wrapper constructor.
About the latter, until #15247 is fixed, we can do rewrites as Ryan
suggests. Hopefully, there will also be less of such panics around
after making the code idiomatic to match Solution A discussed above.
On Wed, 13 Feb 2019 at 12:07, Ryan Scott <ryan.gl.scott at gmail.com> wrote:
> Yes, I agree. This will require sprinkling the codebase with EmptyCase due to , but that's still a sight better than calling `panic`. After GHC 8.10 is released (and the minimum version of GHC that HEAD supports is 8.8), we can even remove these empty cases by making the empty data type fields strict (see ).
> Ryan S.
>  https://ghc.haskell.org/trac/ghc/ticket/15247#comment:4
>  https://ghc.haskell.org/trac/ghc/ticket/15305
> ghc-devs mailing list
> ghc-devs at haskell.org
More information about the ghc-devs