Ticket #34 (closed bug report: fixed)

Opened 8 years ago

Last modified 8 years ago

BangPatterns are incorrectly handled

Reported by: nibro Owned by: nibro
Priority: major Milestone: Full code support
Component: parser Version: 0.5.3
Keywords: Cc:


module BangPatterns where

firstnonspace :: Ptr Word8 -> Int -> Int -> IO Int
firstnonspace !ptr !n !m
    | n >= m    = return n
    | otherwise = do w <- peekElemOff ptr n
                     if isSpaceWord8 w then firstnonspace ptr (n+1) m else return n

The parser complains when there are more than one bang pattern in a function binding. And in fact, when there is only one bang pattern, the parser thinks it's the operator ! that's being defined.

Change History

Changed 8 years ago by nibro

  • status changed from new to assigned

Changed 8 years ago by nibro

  • status changed from assigned to closed
  • resolution set to fixed

Took quite some digging, but now it should work correctly. Case closed.

Note: See TracTickets for help on using tickets.