[GHC] #15743: Nail down the Required/Inferred/Specified story

GHC ghc-devs at haskell.org
Wed Oct 17 19:39:47 UTC 2018


#15743: Nail down the Required/Inferred/Specified story
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.6.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 > is it even possible to specify the position of an inferred variable
 other than at the front?

 It isn't possible to specify the position of an inferred variable. Full
 stop.

 (At least, not until we have explicit specificity.)

 But this isn't just about Inferred variables. It's also about Specified
 ones. Here's a slight tweak to `T`:

 {{{#!hs
 data T k (c :: k) (a :: Proxy c) (b :: Proxy d) (x :: SimilarKind a b)
 }}}

 I've given `b` a kind that mentions `d`. This makes `d` Specified. But
 poor `d` still must come ''after'' `k`.

 We can still go ahead with option (1) (which is what I've been reluctantly
 leaning toward as well), but I'm clarifying here that the problem isn't
 just with Inferred.

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


More information about the ghc-tickets mailing list