haskell-src-exts-1.24.0: tests/examples/BangPatterns.hs.prettyprinter.golden
{-# LANGUAGE BangPatterns #-}
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