--- | Transforms a CoreExpr and keeps track if it has changed.
-type Transform = CoreExpr -> TransformMonad CoreExpr
-
--- Finds the value of a global binding, if available
-getGlobalBind :: CoreBndr -> TranslatorSession (Maybe CoreExpr)
-getGlobalBind bndr = do
- bindings <- getA tsBindings
- return $ Map.lookup bndr bindings
+-- | In what context does a core expression occur?
+data CoreContext = AppFirst -- ^ The expression is the first
+ -- argument of an application (i.e.,
+ -- it is applied)
+ | AppSecond -- ^ The expression is the second
+ -- argument of an application
+ -- (i.e., something is applied to it)
+ | Other -- ^ Another context