[GHC] #15687: Type synonym unused binds no warning?
GHC
ghc-devs at haskell.org
Sat Sep 29 12:47:52 UTC 2018
#15687: Type synonym unused binds no warning?
-------------------------------------+-------------------------------------
Reporter: AntC | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.6.1
(Parser) |
Resolution: | 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: |
-------------------------------------+-------------------------------------
Comment (by goldfire):
I'm not sure why you think that `type` should introduce a ''pattern''
synonym (which, indeed, must mention all its variables on the right-hand
side). It just introduces a (not necessarily injective) synonym.
It's true that `-XTypeSynonymInstances` allows you to use a type synonym
in an instance head. This might suggest the pattern-like behavior you
seek. But this works via the expansion of the synonym, meaning that a
program with both `instance C (Silly Int Bool)` and `instance C (Silly
Char Bool)` will be rightly rejected.
Note that this behavior is not new.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15687#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list