From: Matthijs Kooijman Date: Wed, 19 Aug 2009 09:58:00 +0000 (+0200) Subject: Also inline functions named "fromInteger". X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=dab01c1b5ee96091a49aba57d9a95cc322427cbd;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Also inline functions named "fromInteger". --- diff --git "a/c\316\273ash/CLasH/Normalize/NormalizeTools.hs" "b/c\316\273ash/CLasH/Normalize/NormalizeTools.hs" index e4d22f3..2d2a906 100644 --- "a/c\316\273ash/CLasH/Normalize/NormalizeTools.hs" +++ "b/c\316\273ash/CLasH/Normalize/NormalizeTools.hs" @@ -193,6 +193,11 @@ is_local_var _ = return False isUserDefined :: CoreSyn.CoreBndr -> Bool -- System names are certain to not be user defined isUserDefined bndr | Name.isSystemName (Id.idName bndr) = False --- Assume everything else is user defined -isUserDefined bdnr = True - +-- Check a list of typical compiler-defined names +isUserDefined bndr = str `elem` compiler_names + where + str = Name.getOccString bndr + -- These are names of bindings usually generated by the compiler. For some + -- reason these are not marked as system, probably because the name itself + -- is not made up by the compiler, just this particular binding is. + compiler_names = ["fromInteger"]