summaryrefslogtreecommitdiff
path: root/ghc/GHCi/UI.hs
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2020-10-04 20:46:41 +0100
committerAlan Zimmerman <alan.zimm@gmail.com>2020-10-20 08:35:34 +0100
commitea736839d85594c95490dcf02d3325c2bbc68f33 (patch)
tree6f6c0335e216f67b63caf9e4a46d3e5bb6e852af /ghc/GHCi/UI.hs
parent59b08a5d192e102f66a6d9260cc8466d7428cffe (diff)
downloadhaskell-ea736839d85594c95490dcf02d3325c2bbc68f33.tar.gz
API Annotations: Keep track of unicode for linear arrow notationwip/az/unicode-hsscaled
The linear arrow can be parsed as `%1 ->` or a direct single token unicode equivalent. Make sure that this distinction is captured in the parsed AST by using IsUnicodeSyntax where it appears, and introduce a new API Annotation, AnnMult to represent its location when unicode is not used. Updated haddock submodule
Diffstat (limited to 'ghc/GHCi/UI.hs')
-rw-r--r--ghc/GHCi/UI.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs
index 029b39ba42..ac96def464 100644
--- a/ghc/GHCi/UI.hs
+++ b/ghc/GHCi/UI.hs
@@ -1683,7 +1683,7 @@ defineMacro overwrite s = do
ioM = nlHsTyVar (getRdrName ioTyConName) `nlHsAppTy` stringTy
body = nlHsVar compose_RDR `mkHsApp` (nlHsPar step)
`mkHsApp` (nlHsPar expr)
- tySig = mkLHsSigWcType (nlHsFunTy HsUnrestrictedArrow stringTy ioM)
+ tySig = mkLHsSigWcType (nlHsFunTy stringTy ioM)
new_expr = L (getLoc expr) $ ExprWithTySig noExtField body tySig
hv <- GHC.compileParsedExprRemote new_expr
@@ -1751,7 +1751,7 @@ getGhciStepIO = do
ghciM = nlHsTyVar (getRdrName ghciTyConName) `nlHsAppTy` stringTy
ioM = nlHsTyVar (getRdrName ioTyConName) `nlHsAppTy` stringTy
body = nlHsVar (getRdrName ghciStepIoMName)
- tySig = mkLHsSigWcType (nlHsFunTy HsUnrestrictedArrow ghciM ioM)
+ tySig = mkLHsSigWcType (nlHsFunTy ghciM ioM)
return $ noLoc $ ExprWithTySig noExtField body tySig
-----------------------------------------------------------------------------