diff options
author | sheaf <sam.derbyshire@gmail.com> | 2021-06-03 14:17:52 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-06-04 12:44:19 -0400 |
commit | 733757adb54eccdb4428e5ca4b2d896804bf5965 (patch) | |
tree | 6542f3d992d0e5d1a95665597c2d13cba9e95fec /utils | |
parent | f1b748b491dc49cfbe698cd790610ca21ae21ee7 (diff) | |
download | haskell-733757adb54eccdb4428e5ca4b2d896804bf5965.tar.gz |
Make some simple primops levity-polymorphic
Fixes #17817
Diffstat (limited to 'utils')
-rw-r--r-- | utils/genprimopcode/Main.hs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/utils/genprimopcode/Main.hs b/utils/genprimopcode/Main.hs index a0ea019923..f5eaf757e2 100644 --- a/utils/genprimopcode/Main.hs +++ b/utils/genprimopcode/Main.hs @@ -848,12 +848,13 @@ sl_name :: Entry -> String sl_name i = "(fsLit \"" ++ name i ++ "\") " ppTyVar :: String -> String -ppTyVar "a" = "alphaTyVar" -ppTyVar "b" = "betaTyVar" -ppTyVar "c" = "gammaTyVar" -ppTyVar "s" = "deltaTyVar" -ppTyVar "o" = "runtimeRep1TyVar, openAlphaTyVar" -ppTyVar "p" = "runtimeRep2TyVar, openBetaTyVar" +ppTyVar "a" = "alphaTyVarSpec" +ppTyVar "b" = "betaTyVarSpec" +ppTyVar "c" = "gammaTyVarSpec" +ppTyVar "s" = "deltaTyVarSpec" +ppTyVar "o" = "runtimeRep1TyVarInf, openAlphaTyVarSpec" +ppTyVar "p" = "runtimeRep2TyVarInf, openBetaTyVarSpec" +ppTyVar "v" = "levity1TyVarInf, levPolyTyVar1Spec" ppTyVar _ = error "Unknown type var" ppType :: Ty -> String @@ -888,6 +889,7 @@ ppType (TyVar "c") = "gammaTy" ppType (TyVar "s") = "deltaTy" ppType (TyVar "o") = "openAlphaTy" ppType (TyVar "p") = "openBetaTy" +ppType (TyVar "v") = "levPolyTy1" ppType (TyApp (TyCon "State#") [x]) = "mkStatePrimTy " ++ ppType x ppType (TyApp (TyCon "MutVar#") [x,y]) = "mkMutVarPrimTy " ++ ppType x |