diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Lib.hs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -818,12 +818,12 @@ collectUntil n f src = Just dst' -> (:) src <$> collectUntil (n-1) f dst' headMay :: [a] -> Maybe a -headMay [] = Nothing +headMay [] = Nothing headMay (x:_) = Just x data HeadException = HeadException deriving (Show) instance E.Exception HeadException mustHead :: [a] -> IO a -mustHead [] = throw HeadException +mustHead [] = throw HeadException mustHead (x:_) = return x |