[GHC] #14231: Core lint error "in result of Static argument"

GHC ghc-devs at haskell.org
Tue Jul 10 10:46:42 UTC 2018


#14231: Core lint error "in result of Static argument"
-------------------------------------+-------------------------------------
        Reporter:  mpickering        |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.5
      Resolution:                    |             Keywords:
                                     |  StaticArgumentTransformation
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D4945
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by osa1):

 > In bindWith (comment:8) we are abstracting over the type variable, but
 it is static. This is the real source of the problem. In my example above,
 note that b was static but a was not.

 We introduce two new bindings:

 - `bindWith_r1` this is the wrapper (or "shadowing" binding). This has to
 have the exact same type with the original binder (`bindWith`) because
 it'll shadow the original definition. This has a type arg because the
 original `bindWith` has one.

 - `sat_worker_s198` this is the actual worker function without static
 argument and because all arguments to `bindWith` are static this has no
 args.

 So in the actual worker we don't abstract over the static type argument.
 It seems to me that there isn't a problem with abstracting over static
 arguments.

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


More information about the ghc-tickets mailing list