
#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 simonpj): Why did you not write (in the original) {{{ instance HasStaticDuration (t :/ r) where type SetStaticDuration (t :/ r) pt = pt }}} I suppose you'll say that since `StaticTicks` has only one data constructor, replacing `pt` by `(t' :/ r')` makes no difference. But what about {{{ type family F a :: StaticTicks }}} Now I suppose that `SetStaticDuration (t :/ r) (F Int)` will fail to reduce? Suppose `StaticTicks` had a second data constructor `Foo`. Would you still say that the instance should be accepted? I was just trying to enforce that the definition was complete, nothing deeper. There is nothing fundamentally wrong with a partial function I suppose. But really, what's wrong with just using a variable here? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13398#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler