[GHC] #13549: GHC 8.2.1's typechecker rejects code generated by singletons that 8.0 accepts

GHC ghc-devs at haskell.org
Mon Apr 24 12:24:14 UTC 2017


#13549: GHC 8.2.1's typechecker rejects code generated by singletons that 8.0
accepts
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:  8.4.1
       Component:  Compiler (Type    |              Version:  8.1
  checker)                           |
      Resolution:  duplicate         |             Keywords:  TypeInType
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 > This is just fine for type inference, but it's bad for kind inference.

 I don't understand this.  With `MonoLocalBinds` we don't generalise and
 all is well, no?

 > So, here is the characterization of the infelicity in singletons: if a
 local function's type would be different depending on the presence of
 MonoLocalBinds, then it needs a type signature in order for singletons to
 work.

 I don't understand this either.  Could you give a small example?

 Looking at the `Bug3.hs` it looks as if there ''is'' a type signature,
 generated by Template Haskell.  Perhaps you are saying that this type
 signature is insufficiently kind-generalised?  In which case shouldn't the
 TH code simply add the necessary kind generalisation?

 > I'm going to close the ticket as a dup of #13555.

 But #13555's conclusion was "not a bug".  So is this not a bug goo?  If so
 what about the singletons library?

 Very confused!

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13549#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list