X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=c%CE%BBash%2FCLasH%2FNormalize.hs;h=56905891fcf19141895f05eec7cb6b49daf9563e;hb=729463aa72a83323564e39a608a68d02412af2c1;hp=538b60d85c9cd53fc2dd67606c8b4aafc61572e5;hpb=c39649cd42d2ef3bc2105b19356aa97b4913a540;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git "a/c\316\273ash/CLasH/Normalize.hs" "b/c\316\273ash/CLasH/Normalize.hs" index 538b60d..5690589 100644 --- "a/c\316\273ash/CLasH/Normalize.hs" +++ "b/c\316\273ash/CLasH/Normalize.hs" @@ -738,7 +738,7 @@ getNormalized bndr = Utils.makeCached bndr tsNormalized $ -- a different error if this happens down in the recursion. error $ "\nNormalize.normalizeBind: Function " ++ show bndr ++ " is polymorphic, can't normalize" else do - expr <- getBinding bndr + Just expr <- getGlobalBind bndr normalizeExpr (show bndr) expr -- | Normalize an expression @@ -755,17 +755,6 @@ normalizeExpr what expr = do trace ("\n" ++ what ++ " after normalization:\n\n" ++ showSDoc ( ppr expr')) $ return () return expr' --- | Get the value that is bound to the given binder at top level. Fails when --- there is no such binding. -getBinding :: - CoreBndr -- ^ The binder to get the expression for - -> TranslatorSession CoreExpr -- ^ The value bound to the binder - -getBinding bndr = Utils.makeCached bndr tsBindings $ - -- If the binding isn't in the "cache" (bindings map), then we can't create - -- it out of thin air, so return an error. - error $ "Normalize.getBinding: Unknown function requested: " ++ show bndr - -- | Split a normalized expression into the argument binders, top level -- bindings and the result binder. splitNormalized ::