X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=CoreTools.hs;h=988825509cd33be0b85f4c58d058ce1ba8edf9dc;hb=1d2f36c370db9ef82667741cc9414f9896084af3;hp=eae4122deff7425570ea5b232d4545ede76d46ac;hpb=758998d6ef18ab5124c65518781c358d76d229ab;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git a/CoreTools.hs b/CoreTools.hs index eae4122..9888255 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