From dab01c1b5ee96091a49aba57d9a95cc322427cbd Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Wed, 19 Aug 2009 11:58:00 +0200 Subject: [PATCH] Also inline functions named "fromInteger". --- "c\316\273ash/CLasH/Normalize/NormalizeTools.hs" | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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"] -- 2.30.2