From 8bc44c72708e72151e224f57c01623ac06b2588c Mon Sep 17 00:00:00 2001 From: Moritz Angermann <moritz.angermann@gmail.com> Date: Wed, 21 Feb 2018 22:16:29 +0800 Subject: [PATCH] More `<$>` with ``fmap`` replacements. --- CrossCodegen.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CrossCodegen.hs b/CrossCodegen.hs index ede874f..bfab838 100644 --- a/CrossCodegen.hs +++ b/CrossCodegen.hs @@ -307,7 +307,7 @@ outValidityCheck viaAsm s@(Special pos key value) uniq = case parseEnum value of Nothing -> "" Just (_,_,enums) | viaAsm -> - concatMap (\(hName,cName) -> validConstTestViaAsm (fromMaybe "noKey" (ATT.trim <$> hName) ++ show uniq) cName) enums + concatMap (\(hName,cName) -> validConstTestViaAsm (fromMaybe "noKey" (ATT.trim `fmap` hName) ++ show uniq) cName) enums Just (_,_,enums) -> "void _hsc2hs_test" ++ show uniq ++ "()\n{\n" ++ concatMap (\(_,cName) -> validConstTest cName) enums ++ @@ -601,7 +601,7 @@ runCompileExtract k testStr = do (["-S", "-c", cFile, "-o", sFile] ++ [f | CompFlag f <- flags]) (Just stdout) asm <- liftTestIO $ ATT.parse sFile - case (== 1) <$> ATT.lookupInteger (k ++ "___signed___") asm of + case (== 1) `fmap` (ATT.lookupInteger (k ++ "___signed___") asm) of Just False -> return $ fromMaybe (error "Failed to extract unsigned integer") (ATT.lookupUInteger k asm) Just True -> return $ fromMaybe (error "Failed to extract integer") (ATT.lookupInteger k asm) Nothing -> error "Failed to extract integer sign information" -- GitLab