summaryrefslogtreecommitdiff
path: root/compiler/GHC/Parser/PostProcess.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 /compiler/GHC/Parser/PostProcess.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 'compiler/GHC/Parser/PostProcess.hs')
-rw-r--r--compiler/GHC/Parser/PostProcess.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/GHC/Parser/PostProcess.hs b/compiler/GHC/Parser/PostProcess.hs
index ed11a4df18..4812486d19 100644
--- a/compiler/GHC/Parser/PostProcess.hs
+++ b/compiler/GHC/Parser/PostProcess.hs
@@ -2617,9 +2617,9 @@ mkLHsOpTy x op y =
let loc = getLoc x `combineSrcSpans` getLoc op `combineSrcSpans` getLoc y
in L loc (mkHsOpTy x op y)
-mkMultTy :: LHsType GhcPs -> HsArrow GhcPs
-mkMultTy (L _ (HsTyLit _ (HsNumTy _ 1))) = HsLinearArrow
-mkMultTy t = HsExplicitMult t
+mkMultTy :: IsUnicodeSyntax -> LHsType GhcPs -> HsArrow GhcPs
+mkMultTy u (L _ (HsTyLit _ (HsNumTy _ 1))) = HsLinearArrow u
+mkMultTy u t = HsExplicitMult u t
-----------------------------------------------------------------------------
-- Token symbols