[GHC] #16059: checkValidType is defeated by a type synonym
GHC
ghc-devs at haskell.org
Tue Dec 18 16:54:48 UTC 2018
#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):
But there is nothing fundamentally wrong with `Foo`. You might write
{{{
f :: Foo Int
}}}
which means the same as
{{{
f :: Eq Int => Int
}}}
which is a perfectly legal type.
`checkValidType` checks for reasons a type might be invalid ''other than''
its kind. Are you sure you want type synonyms to hide all the things we
check thereby?
TL;DR: I'm suggesting that if it's valid, it should be valid after
expanding synonyms. You are suggesting that ''they should offer some
level of abstraction''. I'm unconvinced. Exactly what level of
abstraction?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16059#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list