
#15687: Type synonym unused binds no warning? -------------------------------------+------------------------------------- Reporter: AntC | Owner: (none) Type: feature | Status: new request | Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.6.1 (Parser) | Keywords: | Operating System: Windows Architecture: | Type of failure: GHC accepts Unknown/Multiple | invalid program Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I was taken aback this was accepted {{{#!hs type Silly a b = Maybe b x :: Silly Int Bool x = Just True y :: Silly Char Bool y = Just False z = x == y -- returns False }}} What's with the `a` in `Silly`'s decl? That's not a phantom type. It's ignored and thrown away. So `x` and `y` are the same type, and can be compare for equality. I expected a rule: all tyvars in the `type`'s head must appear on rhs. Or at least a warning there was something silly. I tried `-Wall, -fwarn- unused-binds`, `-Wunused-type-patterns`. I was just checking up on [https://github.com/ghc-proposals/ghc- proposals/pull/173#issuecomment-424980779 a remark] that type synonyms are at the type level like implicit bidirectional pattern synonyms. For those, all vars must appear on both sides. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15687 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler