Hi, When running Alex -g I get several warning telling me that a bang pattern is required and that the warning will be an error in GHC 6.14. It is something along the following lines: Warning: Bindings containing unlifted types must use an outermost bang pattern: { (base) = alexIndexInt32OffAddr alex_base s } *** This will be an error in GHC 6.14! Fix your code now! In the expression: let (base) = alexIndexInt32OffAddr alex_base s ((I# (ord_c))) = ord c (offset) = (base +# ord_c) .... I'm running it without the -g flag for now. Don't know yet where too look to solve it or if it is really needed. -- Mihai
On 20 February 2011 19:56, Mihai Maruseac <mihai.maruseac@gmail.com> wrote:
Hi,
When running Alex -g I get several warning telling me that a bang pattern is required and that the warning will be an error in GHC 6.14.
As it happens, that is not an error in GHC 7 (see http://hackage.haskell.org/trac/ghc/ticket/3278): """ $ ghci -XMagicHash GHCi, version 7.0.1.20101215: http://www.haskell.org/ghc/ :? for help letLoading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... xdone. Loading package ffi-1.0 ... linking ... done. Prelude> let x = 2# in 10 <interactive>:1:5: Warning: Bindings containing unlifted types should use an outermost bang pattern: x = 2# In the expression: let x = 2# in 10 In an equation for `it': it = let x = 2# in 10 <interactive>:1:5: Warning: Bindings containing unlifted types should use an outermost bang pattern: x = 2# In the expression: let x = 2# in 10 In an equation for `it': it = let x = 2# in 10 10 """ (I'm not quite sure why I get two identical warnings..) It looks like Alex has gone back and forth on what to do here. Selected commits: """ Fri Nov 26 10:43:42 GMT 2010 Simon Marlow <marlowsd@gmail.com> * don't use CPP for LANGUAGE pragmas Drop the -fno-warn-lazy-unlifted-bindings again. CPP in the header prevents the user from adding their own LANGUAGE pragmas at the top of the .x file if they're using GHC < 7.0. Wed Nov 17 10:42:23 GMT 2010 Simon Marlow <marlowsd@gmail.com> * Stop using -fglasgow-exts, and turn off bogus bang-pattern warnings Wed Nov 17 10:41:06 GMT 2010 Simon Marlow <marlowsd@gmail.com> * remove bang patterns on unlifted bindings again Wed Jun 3 23:58:54 BST 2009 Ian Lynagh <igloo@earth.li> * Use bang patterns on unlifted bindings """ So it looks like you should just ignore this warning, or turn it off :-) Max
On Sun, Feb 20, 2011 at 10:20 PM, Max Bolingbroke <batterseapower@hotmail.com> wrote:
On 20 February 2011 19:56, Mihai Maruseac <mihai.maruseac@gmail.com> wrote:
Hi,
When running Alex -g I get several warning telling me that a bang pattern is required and that the warning will be an error in GHC 6.14.
As it happens, that is not an error in GHC 7 (see http://hackage.haskell.org/trac/ghc/ticket/3278):
""" $ ghci -XMagicHash GHCi, version 7.0.1.20101215: http://www.haskell.org/ghc/ :? for help letLoading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... xdone. Loading package ffi-1.0 ... linking ... done. Prelude> let x = 2# in 10
<interactive>:1:5: Warning: Bindings containing unlifted types should use an outermost bang pattern: x = 2# In the expression: let x = 2# in 10 In an equation for `it': it = let x = 2# in 10
<interactive>:1:5: Warning: Bindings containing unlifted types should use an outermost bang pattern: x = 2# In the expression: let x = 2# in 10 In an equation for `it': it = let x = 2# in 10 10 """
(I'm not quite sure why I get two identical warnings..)
It looks like Alex has gone back and forth on what to do here. Selected commits:
""" Fri Nov 26 10:43:42 GMT 2010 Simon Marlow <marlowsd@gmail.com> * don't use CPP for LANGUAGE pragmas Drop the -fno-warn-lazy-unlifted-bindings again. CPP in the header prevents the user from adding their own LANGUAGE pragmas at the top of the .x file if they're using GHC < 7.0.
Wed Nov 17 10:42:23 GMT 2010 Simon Marlow <marlowsd@gmail.com> * Stop using -fglasgow-exts, and turn off bogus bang-pattern warnings
Wed Nov 17 10:41:06 GMT 2010 Simon Marlow <marlowsd@gmail.com> * remove bang patterns on unlifted bindings again
Wed Jun 3 23:58:54 BST 2009 Ian Lynagh <igloo@earth.li> * Use bang patterns on unlifted bindings """
So it looks like you should just ignore this warning, or turn it off :-)
Thanks :)
participants (2)
-
Max Bolingbroke -
Mihai Maruseac