
#15379: Don't reject user-written instances of KnownNat and friends in hsig files -------------------------------------+------------------------------------- Reporter: ezyang | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: backpack Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by ppk): I think I have fixed it. It turned out that the patch is simpler than I though. Essentially I just made the matchGlobalInstance function to first actually search for an instance and failing which try out the KnownNat and KnownSymbol cases. The commit is https://github.com/piyush- kurur/ghc/commit/364de810f315faba50a4fbe4a68fba3876eb0555 I have also written up an explanation. See if it makes sense. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15379#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler