
#13398: Associated type family instance validity checking is too conservative -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11450 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): Replying to [comment:2 simonpj]:
Why did you not write (in the original) ...
Because I didn't write this code. It's from Hackage.
But really, what's wrong with just using a variable here?
Because that trick will only work in very limited circumstances. To better illustrate the point I'm trying to make, imagine you instead had this code: {{{#!hs instance HasStaticDuration (t :/ r) where type SetStaticDuration (t :/r) (t' :/ r') = r' :/ t' }}} This is a perfectly legitimate associated type family instance, and moreover, it //requires// pattern-matching on the second argument to `SetStaticDuration` to define. Yet in GHC HEAD, you cannot do this—you necessarily must jump through hoops to accomplish the same thing. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13398#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler