summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2015-08-07 10:36:32 +0200
committerJoachim Breitner <mail@joachim-breitner.de>2015-08-08 09:30:49 +0200
commit590aa0f03dda8bb71c7b6910e64aa6e7f951fbbf (patch)
tree2d79d9b29402d5bd1107948a625325b487be0ea2 /compiler
parentf1b4864d06c080b4b1234f2a5f16a6def25cd615 (diff)
downloadhaskell-590aa0f03dda8bb71c7b6910e64aa6e7f951fbbf.tar.gz
Make oneShot open-kinded
akio wants to use oneShot with unlifted types as well, and there is no good reason not to let him. This changes the type of the built-in oneShot definition to open kinds, and also expand the documentation a little bit. Differential Revision: https://phabricator.haskell.org/D1136
Diffstat (limited to 'compiler')
-rw-r--r--compiler/basicTypes/MkId.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/basicTypes/MkId.hs b/compiler/basicTypes/MkId.hs
index 11f8f788cd..29e0e64c9b 100644
--- a/compiler/basicTypes/MkId.hs
+++ b/compiler/basicTypes/MkId.hs
@@ -1142,11 +1142,11 @@ oneShotId = pcMiscPrelId oneShotName ty info
where
info = noCafIdInfo `setInlinePragInfo` alwaysInlinePragma
`setUnfoldingInfo` mkCompulsoryUnfolding rhs
- ty = mkForAllTys [alphaTyVar, betaTyVar] (mkFunTy fun_ty fun_ty)
+ ty = mkForAllTys [openAlphaTyVar, openBetaTyVar] (mkFunTy fun_ty fun_ty)
fun_ty = mkFunTy alphaTy betaTy
[body, x] = mkTemplateLocals [fun_ty, alphaTy]
x' = setOneShotLambda x
- rhs = mkLams [alphaTyVar, betaTyVar, body, x'] $ Var body `App` Var x
+ rhs = mkLams [openAlphaTyVar, openBetaTyVar, body, x'] $ Var body `App` Var x
--------------------------------------------------------------------------------