X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=CoreTools.hs;h=3bfe1a156dfc89826e6070d7255a854ad514add6;hb=83a9910bd8031fbce225992e432e7dfba73b5c0f;hp=bd6f329c537ea93842bf5b221998cf47fb69085c;hpb=46f93616d6a7ef012c5f07698d56372881196015;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git a/CoreTools.hs b/CoreTools.hs index bd6f329..3bfe1a1 100644 --- a/CoreTools.hs +++ b/CoreTools.hs @@ -38,9 +38,10 @@ import Pretty -- | Evaluate a core Type representing type level int from the tfp -- library to a real int. -eval_tfp_int :: Type.Type -> Int -eval_tfp_int ty = +eval_tfp_int :: HscTypes.HscEnv -> Type.Type -> Int +eval_tfp_int env ty = unsafeRunGhc $ do + GHC.setSession env -- Automatically import modules for any fully qualified identifiers setDynFlag DynFlags.Opt_ImplicitImportQualified