From 82d9527b5b01dfa7687397be1e779d4be6e55c7d Mon Sep 17 00:00:00 2001 From: Joe Hendrix Date: Tue, 29 Nov 2016 18:47:28 -0800 Subject: [PATCH] Update to reflect dwarf library changes --- src/Data/Macaw/Dwarf.hs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Data/Macaw/Dwarf.hs b/src/Data/Macaw/Dwarf.hs index 29181f33..0ecd225e 100644 --- a/src/Data/Macaw/Dwarf.hs +++ b/src/Data/Macaw/Dwarf.hs @@ -136,14 +136,8 @@ lookupDIE m k = resolveDieIDAttribute :: Map DieID v -> DW_ATVAL -> Parser v resolveDieIDAttribute m v = lookupDIE m =<< attributeAsDieID v -maybeToEither :: String -> Maybe a -> Parser a -maybeToEither _ (Just r) = pure r -maybeToEither msg Nothing = fail msg - attributeAsLang :: DW_ATVAL -> Parser DW_LANG -attributeAsLang v = do - u <- attributeAsUInt v - maybeToEither "Could not parse lang" (get_dw_lang u) +attributeAsLang v = DW_LANG <$> attributeAsUInt v parseGet :: BS.ByteString -> Get a -> Parser a parseGet bs m =