Ticket #34 (closed bug report: fixed)
BangPatterns are incorrectly handled
| Reported by: | nibro | Owned by: | nibro |
|---|---|---|---|
| Priority: | major | Milestone: | Full code support |
| Component: | parser | Version: | 0.5.3 |
| Keywords: | Cc: |
Description
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
Note: See
TracTickets for help on using
tickets.
