diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2020-10-04 20:46:41 +0100 |
---|---|---|
committer | Alan Zimmerman <alan.zimm@gmail.com> | 2020-10-20 08:35:34 +0100 |
commit | ea736839d85594c95490dcf02d3325c2bbc68f33 (patch) | |
tree | 6f6c0335e216f67b63caf9e4a46d3e5bb6e852af /compiler/GHC/Parser/PostProcess.hs | |
parent | 59b08a5d192e102f66a6d9260cc8466d7428cffe (diff) | |
download | haskell-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.hs | 6 |
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 |