X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=c%CE%BBash%2FCLasH%2FNormalize%2FNormalizeTypes.hs;fp=c%CE%BBash%2FCLasH%2FNormalize%2FNormalizeTypes.hs;h=0000000000000000000000000000000000000000;hb=04f836932ad17dd557af0ba388a12d2b74c1e7d7;hp=4e98709eed26c2bf07dbbf5339014957cd44910d;hpb=75978cf28a619d14ae27ea2bb4a53246b6a0bcd8;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git "a/c\316\273ash/CLasH/Normalize/NormalizeTypes.hs" "b/c\316\273ash/CLasH/Normalize/NormalizeTypes.hs" deleted file mode 100644 index 4e98709..0000000 --- "a/c\316\273ash/CLasH/Normalize/NormalizeTypes.hs" +++ /dev/null @@ -1,34 +0,0 @@ -module CLasH.Normalize.NormalizeTypes where - --- Standard modules -import qualified Control.Monad.Trans.Writer as Writer -import qualified Data.Monoid as Monoid - --- GHC API -import qualified CoreSyn - --- Local imports -import CLasH.Translator.TranslatorTypes - --- Wrap a writer around a TranslatorSession, to run a single transformation --- over a single expression and track if the expression was changed. -type TransformMonad = Writer.WriterT Monoid.Any TranslatorSession - --- | 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) - | LetBinding -- ^ The expression is bound in a - -- (recursive or non-recursive) let - -- expression. - | LetBody -- ^ The expression is the body of a - -- let expression - | LambdaBody -- ^ The expression is the body of a - -- lambda abstraction - | Other -- ^ Another context - deriving (Eq, Show) --- | Transforms a CoreExpr and keeps track if it has changed. -type Transform = [CoreContext] -> CoreSyn.CoreExpr -> TransformMonad CoreSyn.CoreExpr