import "Prelude" hiding (findFirst) findFirst :: (a -> Maybe b) -> [a] -> Maybe b findFirst f l = loop 0 where len = length l loop i | i >= len = Nothing | otherwise = match f (l!i) with s @ (Just _) -> s Nothing -> loop (i+1) main = "Not to be executed" -- 9:29-9:36: Side-effect a is forbidden here.