++ "-- This module is automatically generated by the GHC utility\n"
++ "-- \"genprimopcode\". Do not edit!\n"
++ "-----------------------------------------------------------------------\n"
- ++ "module PrimEnv(primTcs, primVals, intLitTypes, ratLitTypes,\n"
- ++ " charLitTypes, stringLitTypes) where\nimport Core\nimport Encoding\n\n"
+ ++ "module Language.Core.PrimEnv(primTcs, primVals, intLitTypes, ratLitTypes,"
+ ++ "\n charLitTypes, stringLitTypes) where\nimport Language.Core.Core"
+ ++ "\nimport Language.Core.Encoding\n\n"
++ "primTcs :: [(Tcon, Kind)]\n"
++ "primTcs = [\n"
++ printList tcEnt entries
gen_wrappers :: Info -> String
gen_wrappers (Info _ entries)
- = "{-# OPTIONS -fno-implicit-prelude #-}\n"
+ = "{-# LANGUAGE NoImplicitPrelude #-}\n"
-- Dependencies on Prelude must be explicit in libraries/base, but we
- -- don't need the Prelude here so we add -fno-implicit-prelude.
+ -- don't need the Prelude here so we add NoImplicitPrelude.
++ "module GHC.PrimopWrappers where\n"
++ "import qualified GHC.Prim\n"
++ unlines (map f (filter (not.dodgy) (filter is_primop entries)))
++ "(" ++ ppType resTy ++ ")"
sl_name :: Entry -> String
-sl_name i = "FSLIT(\"" ++ name i ++ "\") "
+sl_name i = "(fsLit \"" ++ name i ++ "\") "
ppTyVar :: String -> String
ppTyVar "a" = "alphaTyVar"