build: fix -Wall warnings
[mate.git] / Mate / Utilities.hs
1 module Mate.Utilities where
2
3 import qualified Data.ByteString.Lazy as B
4
5 import JVM.ClassFile
6
7
8 -- TODO: actually this function already exists in hs-java-0.3!
9 lookupMethod :: B.ByteString -> Class Resolved -> Maybe (Method Resolved)
10 lookupMethod name cls = look (classMethods cls)
11   where
12     look [] = Nothing
13     look (f:fs)
14       | methodName f == name = Just f
15       | otherwise  = look fs