Git Product home page Git Product logo

Comments (2)

DylanLukes avatar DylanLukes commented on September 28, 2024

I guess you can suppress it with -funbox-strict-field.

from alex.

simonmar avatar simonmar commented on September 28, 2024

On 29/08/2011 22:20, DylanLukes wrote:

The following pretty clearly describes the issue with the generated code on it's own. I'll let it speak for itself. Not a major issue, but the warning is annoying and I can't suppress it even with {-# OPTIONS_GHC -w #-}.

Yes, the problem is that in GHC we went back and forth on this decision
a couple of times. In 7.2.1 you shouldn't see the warnings.

I'm surprised that you can't supress them. Perhaps you have the
OPTIONS_GHC pragma in the wrong place?

Cheers,
Simon

dist/build/stgma/stgma-tmp/Scan.hs:315:17:
     Warning: Pattern bindings containing unlifted types should use an outermost bang pattern:
                ((I# (ord_c))) = fromIntegral c
     In the expression:
       let
         (base) = alexIndexInt32OffAddr alex_base s
         ((I# (ord_c))) = fromIntegral c
         (offset) = (base +# ord_c)
         ....
       in
         case new_s of {
           -1# ->  (new_acc, input)
           _ ->  alex_scan_tkn
                  user
                  orig_input
                  (if c<  128 || c>= 192 then (len +# 1#) else len)
                  new_input
                  new_s
                  new_acc }
     In a case alternative:
         Just (c, new_input)
           ->  let
                (base) = alexIndexInt32OffAddr alex_base s
                ((I# (ord_c))) = fromIntegral c
                ....
              in
                case new_s of {
                  -1# ->  (new_acc, input)
                  _ ->  alex_scan_tkn
                         user
                         orig_input
                         (if c<  128 || c>= 192 then (len +# 1#) else len)
                         new_input
                         new_s
                         new_acc }
     In the second argument of `seq', namely
       `case alexGetByte input of {
          Nothing ->  (new_acc, input)
          Just (c, new_input)
            ->  let
                 (base) = ...
                 ....
               in
                 case new_s of {
                   -1# ->  ...
                   _ ->  alex_scan_tkn
                          user
                          orig_input
                          (if c<  128 || c>= 192 then (len +# 1#) else len)
                          new_input
                          new_s
                          new_acc } }'

from alex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.