[GHC] #13018: TH-spliced pattern synonym declaration fails to typecheck
GHC
ghc-devs at haskell.org
Wed Dec 28 16:05:33 UTC 2016
#13018: TH-spliced pattern synonym declaration fails to typecheck
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.0.1
checker) | Keywords:
Resolution: | PatternSynonyms
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC rejects | Unknown/Multiple
valid program | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by goldfire):
I made these functions monadic not too long ago. Looking back through, it
seems the only `RnM` action taken is `addErrAt` from `mixedVarsErr` (and
the related `xoptM` call). It wouldn't be hard to augment the
`FreeKiTyVars` structure to include a list of errors generated. Then, the
whole lot of these functions could be made pure. This would seem to be an
improvement -- especially in your case when you are not interested in
error messages.
Alternatively, I've recently run into the need to have functions be used
in both `TcM` and `DsM`, but the only monadic action, again, was error
generation. It might be reasonable to have a `ErrMonad` class with
instances for both `TcM` and `DsM`; then these `extractXXX` functions
could be generalized over that class.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13018#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list