From ea736839d85594c95490dcf02d3325c2bbc68f33 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Sun, 4 Oct 2020 20:46:41 +0100 Subject: API Annotations: Keep track of unicode for linear arrow notation 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 --- compiler/GHC/Tc/TyCl.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/GHC/Tc/TyCl.hs') diff --git a/compiler/GHC/Tc/TyCl.hs b/compiler/GHC/Tc/TyCl.hs index 28d3651876..bd47bf7bd9 100644 --- a/compiler/GHC/Tc/TyCl.hs +++ b/compiler/GHC/Tc/TyCl.hs @@ -3416,7 +3416,7 @@ tcConArg exp_kind (HsScaled w bty) ; return (Scaled w' arg_ty, getBangStrictness bty) } tcDataConMult :: HsArrow GhcRn -> TcM Mult -tcDataConMult arr@HsUnrestrictedArrow = do +tcDataConMult arr@(HsUnrestrictedArrow _) = do -- See Note [Function arrows in GADT constructors] linearEnabled <- xoptM LangExt.LinearTypes if linearEnabled then tcMult arr else return oneDataConTy -- cgit v1.2.1