
#16059: checkValidType is defeated by a type synonym -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Compiler (Type | Version: 8.7 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC accepts | Unknown/Multiple invalid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Huh. Yes, I suppose hat `Foo` is acceptable in some usage contexts (e.g. as a quantified constraint) but not others (in a kind). So we can't validity-check `Foo` on its own. So I suppose we should always validity-check the expansion, tiresome though that is. Would you like to do that? The `synIsTau` field of a `SynonymTyCon` might allow us to short-circuit the common case where the RHS is totally vanilla. (To do so we'd need to ensure that `synIsTau` is false if there is a `=>` in the RHS, not just a forall.) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16059#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler