From d4639b7c25183098aafd4c98d7043bcb7e66eb66 Mon Sep 17 00:00:00 2001 From: Leonidas Loucas Date: Sun, 28 Jun 2020 17:15:43 -0700 Subject: [PATCH 1/4] Add handling for HexFloatLiterals #455 --- src/Language/Haskell/Exts/Extension.hs | 3 ++ src/Language/Haskell/Exts/InternalLexer.hs | 51 +++++++++++++++++----- 2 files changed, 44 insertions(+), 10 deletions(-) diff --git a/src/Language/Haskell/Exts/Extension.hs b/src/Language/Haskell/Exts/Extension.hs index 70c56922..efaa5b67 100644 --- a/src/Language/Haskell/Exts/Extension.hs +++ b/src/Language/Haskell/Exts/Extension.hs @@ -560,6 +560,9 @@ data KnownExtension = | BlockArguments + -- | HexFloatLiterals syntax ex 0xFF.FFp-12 + | HexFloatLiterals + deriving (Show, Read, Eq, Ord, Enum, Bounded, Data, Typeable) -- | Certain extensions imply other extensions, and this function diff --git a/src/Language/Haskell/Exts/InternalLexer.hs b/src/Language/Haskell/Exts/InternalLexer.hs index 6f054c8f..55dc4635 100644 --- a/src/Language/Haskell/Exts/InternalLexer.hs +++ b/src/Language/Haskell/Exts/InternalLexer.hs @@ -668,6 +668,9 @@ lexStdToken = do (n, str) <- lexBinary con <- intHash return (con (n, '0':c:str)) + | toLower c == 'x' && isHexDigit d && HexFloatLiterals `elem` exts -> do + discard 2 + lexHexadecimalFloat c | toLower c == 'x' && isHexDigit d -> do discard 2 (n, str) <- lexHexadecimal @@ -1036,22 +1039,50 @@ lexDecimalOrFloat = do '#':_ | MagicHash `elem` exts -> discard 1 >> return (IntTokHash (parseInteger 10 ds, ds)) _ -> return (IntTok (parseInteger 10 ds, ds)) - where - lexExponent :: Lex a (Integer, String) - lexExponent = do - (e:r) <- getInput - discard 1 -- 'e' or 'E' - case r of - '+':d:_ | isDigit d -> do +lexExponent :: Lex a (Integer, String) +lexExponent = do + (e:r) <- getInput + discard 1 -- discard ex notation + case r of + '+':d:_ | isDigit d -> do discard 1 (n, str) <- lexDecimal return (n, e:'+':str) - '-':d:_ | isDigit d -> do + '-':d:_ | isDigit d -> do discard 1 (n, str) <- lexDecimal return (negate n, e:'-':str) - d:_ | isDigit d -> lexDecimal >>= \(n,str) -> return (n, e:str) - _ -> fail "Float with missing exponent" + d:_ | isDigit d -> lexDecimal >>= \(n,str) -> return (n, e:str) + _ -> fail "Float with missing exponent" + +lexHexadecimalFloat :: Char -> Lex a Token +lexHexadecimalFloat c = do + ds <- lexWhile isHexDigit + rest <- getInput + exts <- getExtensionsL + case rest of + ('.':d:_) | isHexDigit d -> do + discard 1 + frac <- lexWhile isHexDigit + let num = parseInteger 16 ds + numFrac = parseFrac frac + (exponent, estr) <- do + rest2 <- getInput + case rest2 of + 'p':_ -> lexExponent + 'P':_ -> lexExponent + _ -> return (0,"") + con <- lexHash FloatTok FloatTokHash (Right DoubleTokHash) + return $ con (((num%1) + numFrac) * 2^^(exponent), '0':c:ds ++ '.':frac ++ estr) + e:_ | toLower e == 'p' -> do + (exponent, estr) <- lexExponent + con <- lexHash FloatTok FloatTokHash (Right DoubleTokHash) + return $ con (((parseInteger 16 ds)%1) * 2^^exponent, '0':c:ds ++ estr) + _ -> return (IntTok (parseInteger 16 ds, '0':c:ds)) + where + parseFrac :: String -> Rational + parseFrac ds = + foldl (\n (dp, d) -> n + (d / (16 ^^ dp))) (0 % 1) $ zip [1..] (map ((% 1) . toInteger . digitToInt) ds) lexHash :: (b -> Token) -> (b -> Token) -> Either String (b -> Token) -> Lex a (b -> Token) lexHash a b c = do From d7414acd262eeee6e311fd87b942976195241dcf Mon Sep 17 00:00:00 2001 From: Leonidas Loucas Date: Sun, 28 Jun 2020 17:22:28 -0700 Subject: [PATCH 2/4] Add tests for HexFloatLiterals #455 --- tests/examples/HexFloatLiteralsBad.hs | 4 + ...HexFloatLiteralsBad.hs.exactprinter.golden | 1 + .../HexFloatLiteralsBad.hs.parser.golden | 3 + ...HexFloatLiteralsBad.hs.prettyparser.golden | 1 + ...exFloatLiteralsBad.hs.prettyprinter.golden | 1 + tests/examples/HexFloatLiteralsGood.hs | 22 + ...exFloatLiteralsGood.hs.exactprinter.golden | 1 + .../HexFloatLiteralsGood.hs.parser.golden | 959 ++++++++++++++++++ ...exFloatLiteralsGood.hs.prettyparser.golden | 10 + ...xFloatLiteralsGood.hs.prettyprinter.golden | 12 + 10 files changed, 1014 insertions(+) create mode 100644 tests/examples/HexFloatLiteralsBad.hs create mode 100644 tests/examples/HexFloatLiteralsBad.hs.exactprinter.golden create mode 100644 tests/examples/HexFloatLiteralsBad.hs.parser.golden create mode 100644 tests/examples/HexFloatLiteralsBad.hs.prettyparser.golden create mode 100644 tests/examples/HexFloatLiteralsBad.hs.prettyprinter.golden create mode 100644 tests/examples/HexFloatLiteralsGood.hs create mode 100644 tests/examples/HexFloatLiteralsGood.hs.exactprinter.golden create mode 100644 tests/examples/HexFloatLiteralsGood.hs.parser.golden create mode 100644 tests/examples/HexFloatLiteralsGood.hs.prettyparser.golden create mode 100644 tests/examples/HexFloatLiteralsGood.hs.prettyprinter.golden diff --git a/tests/examples/HexFloatLiteralsBad.hs b/tests/examples/HexFloatLiteralsBad.hs new file mode 100644 index 00000000..e19ed08c --- /dev/null +++ b/tests/examples/HexFloatLiteralsBad.hs @@ -0,0 +1,4 @@ +-- Missing hex float literals extension. Should fail. +f :: Float -> () +f 0xFF.FFp12 = () +f _ = () diff --git a/tests/examples/HexFloatLiteralsBad.hs.exactprinter.golden b/tests/examples/HexFloatLiteralsBad.hs.exactprinter.golden new file mode 100644 index 00000000..3bed885c --- /dev/null +++ b/tests/examples/HexFloatLiteralsBad.hs.exactprinter.golden @@ -0,0 +1 @@ +ParseFailed (SrcLoc "tests/examples/HexFloatLiteralsBad.hs" 4 1) "Parse error in pattern: f" diff --git a/tests/examples/HexFloatLiteralsBad.hs.parser.golden b/tests/examples/HexFloatLiteralsBad.hs.parser.golden new file mode 100644 index 00000000..19eb7ccc --- /dev/null +++ b/tests/examples/HexFloatLiteralsBad.hs.parser.golden @@ -0,0 +1,3 @@ +ParseFailed + (SrcLoc "tests/examples/HexFloatLiteralsBad.hs" 4 1) + "Parse error in pattern: f" diff --git a/tests/examples/HexFloatLiteralsBad.hs.prettyparser.golden b/tests/examples/HexFloatLiteralsBad.hs.prettyparser.golden new file mode 100644 index 00000000..3bed885c --- /dev/null +++ b/tests/examples/HexFloatLiteralsBad.hs.prettyparser.golden @@ -0,0 +1 @@ +ParseFailed (SrcLoc "tests/examples/HexFloatLiteralsBad.hs" 4 1) "Parse error in pattern: f" diff --git a/tests/examples/HexFloatLiteralsBad.hs.prettyprinter.golden b/tests/examples/HexFloatLiteralsBad.hs.prettyprinter.golden new file mode 100644 index 00000000..3bed885c --- /dev/null +++ b/tests/examples/HexFloatLiteralsBad.hs.prettyprinter.golden @@ -0,0 +1 @@ +ParseFailed (SrcLoc "tests/examples/HexFloatLiteralsBad.hs" 4 1) "Parse error in pattern: f" diff --git a/tests/examples/HexFloatLiteralsGood.hs b/tests/examples/HexFloatLiteralsGood.hs new file mode 100644 index 00000000..b1c38f08 --- /dev/null +++ b/tests/examples/HexFloatLiteralsGood.hs @@ -0,0 +1,22 @@ +{-# LANGUAGE HexFloatLiterals #-} + +import GHC.Types + +main = do + print [ 0x0, -0x0, 0x1, -0x1 + , 0xF, -0xF, 0xF, -0xF + , 0x00000000000000000000000000000000000000000000000000000000000000000000000000001 + , 0x0000000000000000000000000000000000000000000000000000000000000000000000000000F + , -0x00000000000000000000000000000000000000000000000000000000000000000000000000001 + , -0x0000000000000000000000000000000000000000000000000000000000000000000000000000F + , -0x11.11, -0x11.11 + , -0xFF.FF, -0xFF.FF + , -0xFF.FFp12, -0xFF.FFp12 + , -0xFF.FFp-12, -0xFF.FFp-12 + ] + + print [ 0x0, 0x1, 0x10, 0x11, 0x100, 0x101, 0x110, 0x111 :: Integer + , -0x0, -0x1, -0x10, -0x11, -0x100, -0x101, -0x110, -0x111 + , 0x11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 + , -0x11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 + ] diff --git a/tests/examples/HexFloatLiteralsGood.hs.exactprinter.golden b/tests/examples/HexFloatLiteralsGood.hs.exactprinter.golden new file mode 100644 index 00000000..1796dc27 --- /dev/null +++ b/tests/examples/HexFloatLiteralsGood.hs.exactprinter.golden @@ -0,0 +1 @@ +Match diff --git a/tests/examples/HexFloatLiteralsGood.hs.parser.golden b/tests/examples/HexFloatLiteralsGood.hs.parser.golden new file mode 100644 index 00000000..6c58cde5 --- /dev/null +++ b/tests/examples/HexFloatLiteralsGood.hs.parser.golden @@ -0,0 +1,959 @@ +ParseOk + ( Module + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 1 1 23 1 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 1 1 1 1 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 3 1 3 1 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 3 1 3 1 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 3 1 3 1 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 5 1 5 1 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 23 1 23 1 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 23 1 23 1 + ] + } + Nothing + [ LanguagePragma + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 1 1 1 34 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 1 1 1 13 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 1 31 1 34 + ] + } + [ Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 1 14 1 30 + , srcInfoPoints = [] + } + "HexFloatLiterals" + ] + ] + [ ImportDecl + { importAnn = + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 3 1 3 17 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 3 1 3 7 ] + } + , importModule = + ModuleName + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 3 8 3 17 + , srcInfoPoints = [] + } + "GHC.Types" + , importQualified = False + , importSrc = False + , importSafe = False + , importPkg = Nothing + , importAs = Nothing + , importSpecs = Nothing + } + ] + [ PatBind + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 5 1 22 12 + , srcInfoPoints = [] + } + (PVar + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 5 1 5 5 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 5 1 5 5 + , srcInfoPoints = [] + } + "main")) + (UnGuardedRhs + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 5 6 22 12 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 5 6 5 7 ] + } + (Do + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 5 8 22 12 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 5 8 5 10 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 5 6 5 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 5 18 5 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 23 1 23 0 + ] + } + [ Qualifier + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 5 16 12 + , srcInfoPoints = [] + } + (App + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 5 16 12 + , srcInfoPoints = [] + } + (Var + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 5 6 10 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 5 6 10 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 5 6 10 + , srcInfoPoints = [] + } + "print"))) + (List + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 11 16 12 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 11 6 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 16 6 17 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 22 6 23 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 27 6 28 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 11 7 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 16 7 17 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 22 7 23 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 27 7 28 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 8 11 8 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 9 11 9 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 10 11 10 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 11 11 11 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 12 11 12 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 12 21 12 22 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 13 11 13 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 13 21 13 22 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 11 14 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 24 14 25 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 11 15 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 25 15 26 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 16 11 16 12 + ] + } + [ Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 13 6 16 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 13 6 16 + , srcInfoPoints = [] + } + 0 + "0x0") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 18 6 22 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 18 6 19 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 19 6 22 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 19 6 22 + , srcInfoPoints = [] + } + 0 + "0x0")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 24 6 27 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 24 6 27 + , srcInfoPoints = [] + } + 1 + "0x1") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 29 6 33 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 29 6 30 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 30 6 33 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 30 6 33 + , srcInfoPoints = [] + } + 1 + "0x1")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 13 7 16 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 13 7 16 + , srcInfoPoints = [] + } + 15 + "0xF") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 18 7 22 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 18 7 19 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 19 7 22 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 19 7 22 + , srcInfoPoints = [] + } + 15 + "0xF")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 24 7 27 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 24 7 27 + , srcInfoPoints = [] + } + 15 + "0xF") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 29 7 33 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 29 7 30 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 30 7 33 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 30 7 33 + , srcInfoPoints = [] + } + 15 + "0xF")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 8 13 8 92 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 8 13 8 92 + , srcInfoPoints = [] + } + 1 + "0x00000000000000000000000000000000000000000000000000000000000000000000000000001") + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 9 13 9 92 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 9 13 9 92 + , srcInfoPoints = [] + } + 15 + "0x0000000000000000000000000000000000000000000000000000000000000000000000000000F") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 10 13 10 93 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 10 13 10 14 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 10 14 10 93 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 10 14 10 93 + , srcInfoPoints = [] + } + 1 + "0x00000000000000000000000000000000000000000000000000000000000000000000000000001")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 11 13 11 93 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 11 13 11 14 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 11 14 11 93 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 11 14 11 93 + , srcInfoPoints = [] + } + 15 + "0x0000000000000000000000000000000000000000000000000000000000000000000000000000F")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 12 13 12 21 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 12 13 12 14 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 12 14 12 21 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 12 14 12 21 + , srcInfoPoints = [] + } + (4369 % 256) + "0x11.11")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 12 23 12 31 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 12 23 12 24 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 12 24 12 31 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 12 24 12 31 + , srcInfoPoints = [] + } + (4369 % 256) + "0x11.11")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 13 13 13 21 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 13 13 13 14 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 13 14 13 21 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 13 14 13 21 + , srcInfoPoints = [] + } + (65535 % 256) + "0xFF.FF")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 13 23 13 31 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 13 23 13 24 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 13 24 13 31 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 13 24 13 31 + , srcInfoPoints = [] + } + (65535 % 256) + "0xFF.FF")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 13 14 24 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 13 14 14 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 14 14 24 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 14 14 14 24 + , srcInfoPoints = [] + } + (1048560 % 1) + "0xFF.FFp12")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 26 14 37 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 26 14 27 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 27 14 37 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 14 27 14 37 + , srcInfoPoints = [] + } + (1048560 % 1) + "0xFF.FFp12")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 13 15 25 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 13 15 14 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 14 15 25 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 15 14 15 25 + , srcInfoPoints = [] + } + (65535 % 1048576) + "0xFF.FFp-12")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 27 15 39 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 27 15 28 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 28 15 39 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 15 28 15 39 + , srcInfoPoints = [] + } + (65535 % 1048576) + "0xFF.FFp-12")) + ])) + , Qualifier + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 5 22 12 + , srcInfoPoints = [] + } + (App + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 5 22 12 + , srcInfoPoints = [] + } + (Var + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 5 18 10 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 5 18 10 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 5 18 10 + , srcInfoPoints = [] + } + "print"))) + (List + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 11 22 12 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 11 18 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 16 18 17 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 21 18 22 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 27 18 28 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 33 18 34 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 40 18 41 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 47 18 48 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 54 18 55 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 11 19 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 17 19 18 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 23 19 24 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 30 19 31 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 37 19 38 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 45 19 46 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 53 19 54 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 61 19 62 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 11 20 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 21 11 21 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 22 11 22 12 + ] + } + [ Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 13 18 16 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 13 18 16 + , srcInfoPoints = [] + } + 0 + "0x0") + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 18 18 21 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 18 18 21 + , srcInfoPoints = [] + } + 1 + "0x1") + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 23 18 27 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 23 18 27 + , srcInfoPoints = [] + } + 16 + "0x10") + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 29 18 33 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 29 18 33 + , srcInfoPoints = [] + } + 17 + "0x11") + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 35 18 40 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 35 18 40 + , srcInfoPoints = [] + } + 256 + "0x100") + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 42 18 47 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 42 18 47 + , srcInfoPoints = [] + } + 257 + "0x101") + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 49 18 54 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 49 18 54 + , srcInfoPoints = [] + } + 272 + "0x110") + , ExpTypeSig + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 56 18 72 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 62 18 64 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 56 18 61 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 18 56 18 61 + , srcInfoPoints = [] + } + 273 + "0x111")) + (TyCon + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 65 18 72 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 18 65 18 72 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 18 65 18 72 + , srcInfoPoints = [] + } + "Integer"))) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 13 19 17 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 13 19 14 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 14 19 17 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 19 14 19 17 + , srcInfoPoints = [] + } + 0 + "0x0")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 19 19 23 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 19 19 20 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 20 19 23 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 19 20 19 23 + , srcInfoPoints = [] + } + 1 + "0x1")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 25 19 30 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 25 19 26 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 26 19 30 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 19 26 19 30 + , srcInfoPoints = [] + } + 16 + "0x10")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 32 19 37 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 32 19 33 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 33 19 37 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 19 33 19 37 + , srcInfoPoints = [] + } + 17 + "0x11")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 39 19 45 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 39 19 40 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 40 19 45 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 19 40 19 45 + , srcInfoPoints = [] + } + 256 + "0x100")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 47 19 53 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 47 19 48 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 48 19 53 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 19 48 19 53 + , srcInfoPoints = [] + } + 257 + "0x101")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 55 19 61 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 55 19 56 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 56 19 61 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 19 56 19 61 + , srcInfoPoints = [] + } + 272 + "0x110")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 63 19 69 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 63 19 64 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 64 19 69 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 19 64 19 69 + , srcInfoPoints = [] + } + 273 + "0x111")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 13 20 143 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 13 20 143 + , srcInfoPoints = [] + } + 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 + "0x11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 21 13 21 144 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 21 13 21 14 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 21 14 21 144 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 21 14 21 144 + , srcInfoPoints = [] + } + 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 + "0x11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111")) + ])) + ])) + Nothing + ] + , [] + ) diff --git a/tests/examples/HexFloatLiteralsGood.hs.prettyparser.golden b/tests/examples/HexFloatLiteralsGood.hs.prettyparser.golden new file mode 100644 index 00000000..6f0b099d --- /dev/null +++ b/tests/examples/HexFloatLiteralsGood.hs.prettyparser.golden @@ -0,0 +1,10 @@ +Roundtrip test failed + +AST 1: + +Module () Nothing [LanguagePragma () [Ident () "HexFloatLiterals"]] [ImportDecl {importAnn = (), importModule = ModuleName () "GHC.Types", importQualified = False, importSrc = False, importSafe = False, importPkg = Nothing, importAs = Nothing, importSpecs = Nothing}] [PatBind () (PVar () (Ident () "main")) (UnGuardedRhs () (Do () [Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0x0"),NegApp () (Lit () (Int () 0 "0x0")),Lit () (Int () 1 "0x1"),NegApp () (Lit () (Int () 1 "0x1")),Lit () (Int () 15 "0xF"),NegApp () (Lit () (Int () 15 "0xF")),Lit () (Int () 15 "0xF"),NegApp () (Lit () (Int () 15 "0xF")),Lit () (Int () 1 "0x00000000000000000000000000000000000000000000000000000000000000000000000000001"),Lit () (Int () 15 "0x0000000000000000000000000000000000000000000000000000000000000000000000000000F"),NegApp () (Lit () (Int () 1 "0x00000000000000000000000000000000000000000000000000000000000000000000000000001")),NegApp () (Lit () (Int () 15 "0x0000000000000000000000000000000000000000000000000000000000000000000000000000F")),NegApp () (Lit () (Frac () (4369 % 256) "0x11.11")),NegApp () (Lit () (Frac () (4369 % 256) "0x11.11")),NegApp () (Lit () (Frac () (65535 % 256) "0xFF.FF")),NegApp () (Lit () (Frac () (65535 % 256) "0xFF.FF")),NegApp () (Lit () (Frac () (1048560 % 1) "0xFF.FFp12")),NegApp () (Lit () (Frac () (1048560 % 1) "0xFF.FFp12")),NegApp () (Lit () (Frac () (65535 % 1048576) "0xFF.FFp-12")),NegApp () (Lit () (Frac () (65535 % 1048576) "0xFF.FFp-12"))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0x0"),Lit () (Int () 1 "0x1"),Lit () (Int () 16 "0x10"),Lit () (Int () 17 "0x11"),Lit () (Int () 256 "0x100"),Lit () (Int () 257 "0x101"),Lit () (Int () 272 "0x110"),ExpTypeSig () (Lit () (Int () 273 "0x111")) (TyCon () (UnQual () (Ident () "Integer"))),NegApp () (Lit () (Int () 0 "0x0")),NegApp () (Lit () (Int () 1 "0x1")),NegApp () (Lit () (Int () 16 "0x10")),NegApp () (Lit () (Int () 17 "0x11")),NegApp () (Lit () (Int () 256 "0x100")),NegApp () (Lit () (Int () 257 "0x101")),NegApp () (Lit () (Int () 272 "0x110")),NegApp () (Lit () (Int () 273 "0x111")),Lit () (Int () 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 "0x11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"),NegApp () (Lit () (Int () 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 "0x11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"))]))])) Nothing] + +AST 2: + +Module () Nothing [LanguagePragma () [Ident () "HexFloatLiterals"]] [ImportDecl {importAnn = (), importModule = ModuleName () "GHC.Types", importQualified = False, importSrc = False, importSafe = False, importPkg = Nothing, importAs = Nothing, importSpecs = Nothing}] [PatBind () (PVar () (Ident () "main")) (UnGuardedRhs () (Do () [Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0"),NegApp () (Lit () (Int () 0 "0")),Lit () (Int () 1 "1"),NegApp () (Lit () (Int () 1 "1")),Lit () (Int () 15 "15"),NegApp () (Lit () (Int () 15 "15")),Lit () (Int () 15 "15"),NegApp () (Lit () (Int () 15 "15")),Lit () (Int () 1 "1"),Lit () (Int () 15 "15"),NegApp () (Lit () (Int () 1 "1")),NegApp () (Lit () (Int () 15 "15")),NegApp () (Lit () (Frac () (4369 % 256) "17.06640625")),NegApp () (Lit () (Frac () (4369 % 256) "17.06640625")),NegApp () (Lit () (Frac () (65535 % 256) "255.99609375")),NegApp () (Lit () (Frac () (65535 % 256) "255.99609375")),NegApp () (Lit () (Frac () (1048560 % 1) "1048560.0")),NegApp () (Lit () (Frac () (1048560 % 1) "1048560.0")),NegApp () (Lit () (Frac () (31249523162841797 % 500000000000000000) "6.2499046325683594e-2")),NegApp () (Lit () (Frac () (31249523162841797 % 500000000000000000) "6.2499046325683594e-2"))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0"),Lit () (Int () 1 "1"),Lit () (Int () 16 "16"),Lit () (Int () 17 "17"),Lit () (Int () 256 "256"),Lit () (Int () 257 "257"),Lit () (Int () 272 "272"),ExpTypeSig () (Lit () (Int () 273 "273")) (TyCon () (UnQual () (Ident () "Integer"))),NegApp () (Lit () (Int () 0 "0")),NegApp () (Lit () (Int () 1 "1")),NegApp () (Lit () (Int () 16 "16")),NegApp () (Lit () (Int () 17 "17")),NegApp () (Lit () (Int () 256 "256")),NegApp () (Lit () (Int () 257 "257")),NegApp () (Lit () (Int () 272 "272")),NegApp () (Lit () (Int () 273 "273")),Lit () (Int () 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 "893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273"),NegApp () (Lit () (Int () 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 "893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273"))]))])) Nothing] + diff --git a/tests/examples/HexFloatLiteralsGood.hs.prettyprinter.golden b/tests/examples/HexFloatLiteralsGood.hs.prettyprinter.golden new file mode 100644 index 00000000..38cca13e --- /dev/null +++ b/tests/examples/HexFloatLiteralsGood.hs.prettyprinter.golden @@ -0,0 +1,12 @@ +{-# LANGUAGE HexFloatLiterals #-} +import GHC.Types +main + = do print + [0, -0, 1, -1, 15, -15, 15, -15, 1, 15, -1, -15, -17.06640625, + -17.06640625, -255.99609375, -255.99609375, -1048560.0, -1048560.0, + -6.2499046325683594e-2, -6.2499046325683594e-2] + print + [0, 1, 16, 17, 256, 257, 272, 273 :: Integer, -0, -1, -16, -17, + -256, -257, -272, -273, + 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273, + -893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273] From 751febfb94184a66c2477594aa48d7fcf07c4484 Mon Sep 17 00:00:00 2001 From: Leonidas Loucas Date: Sun, 28 Jun 2020 20:01:04 -0700 Subject: [PATCH 3/4] Add handling for NumericUnderscores extension in numeric literals #455 --- src/Language/Haskell/Exts/Extension.hs | 3 + src/Language/Haskell/Exts/InternalLexer.hs | 133 ++++++++++++--------- 2 files changed, 81 insertions(+), 55 deletions(-) diff --git a/src/Language/Haskell/Exts/Extension.hs b/src/Language/Haskell/Exts/Extension.hs index efaa5b67..f5c589b6 100644 --- a/src/Language/Haskell/Exts/Extension.hs +++ b/src/Language/Haskell/Exts/Extension.hs @@ -563,6 +563,9 @@ data KnownExtension = -- | HexFloatLiterals syntax ex 0xFF.FFp-12 | HexFloatLiterals + -- | NumericUnderscores num literal syntax ex 1_000_000 or 0xF_F.F_Fp-12 or 0b11_11_11 or 1_000e+23 + | NumericUnderscores + deriving (Show, Read, Eq, Ord, Enum, Bounded, Data, Typeable) -- | Certain extensions imply other extensions, and this function diff --git a/src/Language/Haskell/Exts/InternalLexer.hs b/src/Language/Haskell/Exts/InternalLexer.hs index 55dc4635..31739049 100644 --- a/src/Language/Haskell/Exts/InternalLexer.hs +++ b/src/Language/Haskell/Exts/InternalLexer.hs @@ -660,20 +660,20 @@ lexStdToken = do '0':c:d:_ | toLower c == 'o' && isOctDigit d -> do discard 2 - (n, str) <- lexOctal + (n, str) <- lexOctal $ numUnderscoresEnabled exts con <- intHash return (con (n, '0':c:str)) | toLower c == 'b' && isBinDigit d && BinaryLiterals `elem` exts -> do discard 2 - (n, str) <- lexBinary + (n, str) <- lexBinary $ numUnderscoresEnabled exts con <- intHash return (con (n, '0':c:str)) | toLower c == 'x' && isHexDigit d && HexFloatLiterals `elem` exts -> do discard 2 - lexHexadecimalFloat c + lexHexadecimalFloat (numUnderscoresEnabled exts) c | toLower c == 'x' && isHexDigit d -> do discard 2 - (n, str) <- lexHexadecimal + (n, str) <- lexHexadecimal $ numUnderscoresEnabled exts con <- intHash return (con (n, '0':c:str)) @@ -806,7 +806,7 @@ lexStdToken = do return $ LabelVarId ident - c:_ | isDigit c -> lexDecimalOrFloat + c:_ | isDigit c -> lexDecimalOrFloat $ numUnderscoresEnabled exts | isUpper c -> lexConIdOrQual "" @@ -1012,77 +1012,76 @@ lexRawPragma = lexRawPragmaAux rpr' <- lexRawPragma return $ rpr ++ '#':rpr' -lexDecimalOrFloat :: Lex a Token -lexDecimalOrFloat = do - ds <- lexWhile isDigit +lexDecimalOrFloat :: NumericUnderscoresAllowed -> Lex a Token +lexDecimalOrFloat underAllowed = do + (n, raw) <- lexHandleUnderAllowed underAllowed isDigit rest <- getInput exts <- getExtensionsL case rest of ('.':d:_) | isDigit d -> do discard 1 - frac <- lexWhile isDigit - let num = parseInteger 10 (ds ++ frac) + (frac, fracRaw) <- lexHandleUnderAllowed underAllowed isDigit + let num = parseInteger 10 (n ++ frac) decimals = toInteger (length frac) (exponent, estr) <- do rest2 <- getInput case rest2 of - 'e':_ -> lexExponent - 'E':_ -> lexExponent + 'e':_ -> lexExponent underAllowed + 'E':_ -> lexExponent underAllowed _ -> return (0,"") con <- lexHash FloatTok FloatTokHash (Right DoubleTokHash) - return $ con ((num%1) * 10^^(exponent - decimals), ds ++ '.':frac ++ estr) + return $ con ((num%1) * 10^^(exponent - decimals), raw ++ '.':fracRaw ++ estr) e:_ | toLower e == 'e' -> do - (exponent, estr) <- lexExponent + (exponent, estr) <- lexExponent underAllowed con <- lexHash FloatTok FloatTokHash (Right DoubleTokHash) - return $ con ((parseInteger 10 ds%1) * 10^^exponent, ds ++ estr) - '#':'#':_ | MagicHash `elem` exts -> discard 2 >> return (WordTokHash (parseInteger 10 ds, ds)) - '#':_ | MagicHash `elem` exts -> discard 1 >> return (IntTokHash (parseInteger 10 ds, ds)) - _ -> return (IntTok (parseInteger 10 ds, ds)) + return $ con ((parseInteger 10 n%1) * 10^^exponent, raw ++ estr) + '#':'#':_ | MagicHash `elem` exts -> discard 2 >> return (WordTokHash (parseInteger 10 n, raw)) + '#':_ | MagicHash `elem` exts -> discard 1 >> return (IntTokHash (parseInteger 10 n, raw)) + _ -> return (IntTok (parseInteger 10 n, raw)) -lexExponent :: Lex a (Integer, String) -lexExponent = do +lexExponent :: NumericUnderscoresAllowed -> Lex a (Integer, String) +lexExponent underAllowed = do (e:r) <- getInput discard 1 -- discard ex notation case r of '+':d:_ | isDigit d -> do discard 1 - (n, str) <- lexDecimal + (n, str) <- lexDecimal underAllowed return (n, e:'+':str) '-':d:_ | isDigit d -> do discard 1 - (n, str) <- lexDecimal + (n, str) <- lexDecimal underAllowed return (negate n, e:'-':str) - d:_ | isDigit d -> lexDecimal >>= \(n,str) -> return (n, e:str) + d:_ | isDigit d -> lexDecimal underAllowed >>= \(n,str) -> return (n, e:str) _ -> fail "Float with missing exponent" -lexHexadecimalFloat :: Char -> Lex a Token -lexHexadecimalFloat c = do - ds <- lexWhile isHexDigit +lexHexadecimalFloat :: NumericUnderscoresAllowed -> Char -> Lex a Token +lexHexadecimalFloat underAllowed c = do + (n, raw) <- lexHandleUnderAllowed underAllowed isHexDigit rest <- getInput - exts <- getExtensionsL case rest of ('.':d:_) | isHexDigit d -> do discard 1 - frac <- lexWhile isHexDigit - let num = parseInteger 16 ds + (frac, fracRaw) <- lexHandleUnderAllowed underAllowed isHexDigit + let num = parseInteger 16 n numFrac = parseFrac frac (exponent, estr) <- do rest2 <- getInput case rest2 of - 'p':_ -> lexExponent - 'P':_ -> lexExponent + 'p':_ -> lexExponent underAllowed + 'P':_ -> lexExponent underAllowed _ -> return (0,"") con <- lexHash FloatTok FloatTokHash (Right DoubleTokHash) - return $ con (((num%1) + numFrac) * 2^^(exponent), '0':c:ds ++ '.':frac ++ estr) + return $ con (((num%1) + numFrac) * 2^^(exponent), '0':c:raw ++ '.':fracRaw ++ estr) e:_ | toLower e == 'p' -> do - (exponent, estr) <- lexExponent + (exponent, estr) <- lexExponent underAllowed con <- lexHash FloatTok FloatTokHash (Right DoubleTokHash) - return $ con (((parseInteger 16 ds)%1) * 2^^exponent, '0':c:ds ++ estr) - _ -> return (IntTok (parseInteger 16 ds, '0':c:ds)) + return $ con (((parseInteger 16 n)%1) * 2^^exponent, '0':c:raw ++ estr) + _ -> return (IntTok (parseInteger 16 n, '0':c:raw)) where parseFrac :: String -> Rational parseFrac ds = - foldl (\n (dp, d) -> n + (d / (16 ^^ dp))) (0 % 1) $ zip [1..] (map ((% 1) . toInteger . digitToInt) ds) + foldl (\n (dp, d) -> n + (d / (16 ^^ dp))) (0 % 1) $ zip [(1 :: Integer) ..] (map ((% 1) . toInteger . digitToInt) ds) lexHash :: (b -> Token) -> (b -> Token) -> Either String (b -> Token) -> Lex a (b -> Token) lexHash a b c = do @@ -1281,16 +1280,16 @@ lexEscape = do 'o':c:_ | isOctDigit c -> do discard 1 - (n, raw) <- lexOctal + (n, raw) <- lexOctal NoUnderscoresAllowedInNumeric n' <- checkChar n return (n', 'o':raw) 'x':c:_ | isHexDigit c -> do discard 1 - (n, raw) <- lexHexadecimal + (n, raw) <- lexHexadecimal NoUnderscoresAllowedInNumeric n' <- checkChar n return (n', 'x':raw) c:_ | isDigit c -> do - (n, raw) <- lexDecimal + (n, raw) <- lexDecimal NoUnderscoresAllowedInNumeric n' <- checkChar n return (n', raw) @@ -1307,28 +1306,28 @@ lexEscape = do cntrl _ = fail "Illegal control character" -- assumes at least one octal digit -lexOctal :: Lex a (Integer, String) -lexOctal = do - ds <- lexWhile isOctDigit - return (parseInteger 8 ds, ds) +lexOctal :: NumericUnderscoresAllowed -> Lex a (Integer, String) +lexOctal underAllowed = do + (n, raw) <- lexHandleUnderAllowed underAllowed isOctDigit + return (parseInteger 8 n, raw) -- assumes at least one binary digit -lexBinary :: Lex a (Integer, String) -lexBinary = do - ds <- lexWhile isBinDigit - return (parseInteger 2 ds, ds) +lexBinary :: NumericUnderscoresAllowed -> Lex a (Integer, String) +lexBinary underAllowed = do + (n, raw) <- lexHandleUnderAllowed underAllowed isBinDigit + return (parseInteger 2 n, raw) -- assumes at least one hexadecimal digit -lexHexadecimal :: Lex a (Integer, String) -lexHexadecimal = do - ds <- lexWhile isHexDigit - return (parseInteger 16 ds, ds) +lexHexadecimal :: NumericUnderscoresAllowed -> Lex a (Integer, String) +lexHexadecimal underAllowed = do + (n, raw) <- lexHandleUnderAllowed underAllowed isHexDigit + return (parseInteger 16 n, raw) -- assumes at least one decimal digit -lexDecimal :: Lex a (Integer, String) -lexDecimal = do - ds <- lexWhile isDigit - return (parseInteger 10 ds, ds) +lexDecimal :: NumericUnderscoresAllowed -> Lex a (Integer, String) +lexDecimal underAllowed = do + (n, raw) <- lexHandleUnderAllowed underAllowed isDigit + return (parseInteger 10 n, raw) -- Stolen from Hugs's Prelude parseInteger :: Integer -> String -> Integer @@ -1341,6 +1340,30 @@ flagKW t = exts <- getExtensionsL when (NondecreasingIndentation `elem` exts) flagDo +data NumericUnderscoresAllowed = UnderscoresAllowedInNumeric | NoUnderscoresAllowedInNumeric + deriving Show + +numUnderscoresEnabled :: [KnownExtension] -> NumericUnderscoresAllowed +numUnderscoresEnabled exts = if (NumericUnderscores `elem` exts) + then UnderscoresAllowedInNumeric + else NoUnderscoresAllowedInNumeric + +lexHandleUnderAllowed :: NumericUnderscoresAllowed -> (Char -> Bool) -> Lex a (String, String) +lexHandleUnderAllowed NoUnderscoresAllowedInNumeric p = do + ds <- lexWhile p + return (ds, ds) +lexHandleUnderAllowed UnderscoresAllowedInNumeric p = do + s <- getInput + case s of + c:_ | p c -> do + raw <- lexWhile (\ic -> p ic || ic == '_') + if (not $ null raw) && last raw == '_' + then fail $ "lexHandleUnderAllowed: numeric must not end with _: " ++ show raw + else return (filter (/= '_') raw, raw) + c:_ -> fail $ "lexHandleUnderAllowed: numeric must start with proper digit: " ++ show c + _ -> fail $ "lexHandleUnderAllowed: token stream exhausted" + + -- | Selects ASCII binary digits, i.e. @\'0\'@..@\'1\'@. isBinDigit :: Char -> Bool isBinDigit c = c >= '0' && c <= '1' From 2376655f889d170e16b9836b2ae1147f6a074caa Mon Sep 17 00:00:00 2001 From: Leonidas Loucas Date: Sun, 28 Jun 2020 20:01:54 -0700 Subject: [PATCH 4/4] Add tests for NumericUnderscores extension handling #455 --- tests/examples/HexFloatLiteralsGood.hs | 19 + .../HexFloatLiteralsGood.hs.parser.golden | 1249 ++++++-- ...exFloatLiteralsGood.hs.prettyparser.golden | 4 +- ...xFloatLiteralsGood.hs.prettyprinter.golden | 11 + tests/examples/NumericUnderscoresBad.hs | 4 + ...mericUnderscoresBad.hs.exactprinter.golden | 1 + .../NumericUnderscoresBad.hs.parser.golden | 3 + ...mericUnderscoresBad.hs.prettyparser.golden | 1 + ...ericUnderscoresBad.hs.prettyprinter.golden | 1 + tests/examples/NumericUnderscoresGood.hs | 52 + ...ericUnderscoresGood.hs.exactprinter.golden | 1 + .../NumericUnderscoresGood.hs.parser.golden | 2523 +++++++++++++++++ ...ericUnderscoresGood.hs.prettyparser.golden | 10 + ...ricUnderscoresGood.hs.prettyprinter.golden | 19 + 14 files changed, 3713 insertions(+), 185 deletions(-) create mode 100644 tests/examples/NumericUnderscoresBad.hs create mode 100644 tests/examples/NumericUnderscoresBad.hs.exactprinter.golden create mode 100644 tests/examples/NumericUnderscoresBad.hs.parser.golden create mode 100644 tests/examples/NumericUnderscoresBad.hs.prettyparser.golden create mode 100644 tests/examples/NumericUnderscoresBad.hs.prettyprinter.golden create mode 100644 tests/examples/NumericUnderscoresGood.hs create mode 100644 tests/examples/NumericUnderscoresGood.hs.exactprinter.golden create mode 100644 tests/examples/NumericUnderscoresGood.hs.parser.golden create mode 100644 tests/examples/NumericUnderscoresGood.hs.prettyparser.golden create mode 100644 tests/examples/NumericUnderscoresGood.hs.prettyprinter.golden diff --git a/tests/examples/HexFloatLiteralsGood.hs b/tests/examples/HexFloatLiteralsGood.hs index b1c38f08..6ed2aa00 100644 --- a/tests/examples/HexFloatLiteralsGood.hs +++ b/tests/examples/HexFloatLiteralsGood.hs @@ -1,4 +1,5 @@ {-# LANGUAGE HexFloatLiterals #-} +{-# LANGUAGE NumericUnderscores #-} import GHC.Types @@ -20,3 +21,21 @@ main = do , 0x11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 , -0x11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 ] + + print [ 0x0_0, -0x0_0, 0x1_0, -0x1_0 + , 0xF_0, -0xF_0, 0xF_F, -0xF_F + , 0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01 + , 0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_0F + , -0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01 + , -0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_0F + , -0x11_0.11_0, -0x11_0.11_0 + , -0xFF_0.FF_0, -0xFF_0.FF_0 + , -0xF_F.F_Fp1_2, -0xF_F.F_Fp1_2 + , -0xF_F.F_Fp-1_2, -0xF_F.F_Fp-1_2 + ] + + print [ 0x0_0, 0x1_0, 0x10_0, 0x11_0, 0x100_0, 0x101_0, 0x110_0, 0x111_0 :: Integer + , -0x0_0, -0x1_0, -0x10_0, -0x11_0, -0x100_0, -0x101_0, -0x110_0, -0x111_0 + , 0x111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_11 + , -0x111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_11 + ] diff --git a/tests/examples/HexFloatLiteralsGood.hs.parser.golden b/tests/examples/HexFloatLiteralsGood.hs.parser.golden index 6c58cde5..7bd2def8 100644 --- a/tests/examples/HexFloatLiteralsGood.hs.parser.golden +++ b/tests/examples/HexFloatLiteralsGood.hs.parser.golden @@ -2,15 +2,16 @@ ParseOk ( Module SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 1 1 23 1 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 1 1 42 1 , srcInfoPoints = [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 1 1 1 1 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 3 1 3 1 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 3 1 3 1 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 3 1 3 1 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 5 1 5 1 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 23 1 23 1 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 23 1 23 1 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 2 1 2 1 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 4 1 4 1 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 4 1 4 1 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 4 1 4 1 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 1 6 1 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 42 1 42 1 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 42 1 42 1 ] } Nothing @@ -31,20 +32,37 @@ ParseOk } "HexFloatLiterals" ] + , LanguagePragma + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 2 1 2 36 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 2 1 2 13 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 2 33 2 36 + ] + } + [ Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 2 14 2 32 + , srcInfoPoints = [] + } + "NumericUnderscores" + ] ] [ ImportDecl { importAnn = SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 3 1 3 17 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 4 1 4 17 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 3 1 3 7 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 4 1 4 7 ] } , importModule = ModuleName SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 3 8 3 17 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 4 8 4 17 , srcInfoPoints = [] } "GHC.Types" @@ -59,109 +77,111 @@ ParseOk [ PatBind SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 5 1 22 12 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 1 41 12 , srcInfoPoints = [] } (PVar SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 5 1 5 5 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 1 6 5 , srcInfoPoints = [] } (Ident SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 5 1 5 5 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 1 6 5 , srcInfoPoints = [] } "main")) (UnGuardedRhs SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 5 6 22 12 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 6 41 12 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 5 6 5 7 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 6 6 7 ] } (Do SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 5 8 22 12 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 8 41 12 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 5 8 5 10 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 5 6 5 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 5 18 5 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 23 1 23 0 + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 8 6 10 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 5 7 5 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 5 19 5 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 25 5 25 5 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 5 37 5 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 42 1 42 0 ] } [ Qualifier SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 5 16 12 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 5 17 12 , srcInfoPoints = [] } (App SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 5 16 12 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 5 17 12 , srcInfoPoints = [] } (Var SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 5 6 10 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 5 7 10 , srcInfoPoints = [] } (UnQual SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 5 6 10 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 5 7 10 , srcInfoPoints = [] } (Ident SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 5 6 10 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 5 7 10 , srcInfoPoints = [] } "print"))) (List SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 11 16 12 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 11 17 12 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 11 6 12 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 16 6 17 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 22 6 23 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 27 6 28 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 11 7 12 + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 11 7 12 , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 16 7 17 , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 22 7 23 , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 27 7 28 , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 8 11 8 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 8 16 8 17 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 8 22 8 23 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 8 27 8 28 , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 9 11 9 12 , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 10 11 10 12 , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 11 11 11 12 , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 12 11 12 12 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 12 21 12 22 , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 13 11 13 12 , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 13 21 13 22 , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 11 14 12 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 24 14 25 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 21 14 22 , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 11 15 12 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 25 15 26 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 24 15 25 , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 16 11 16 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 16 25 16 26 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 17 11 17 12 ] } [ Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 13 6 16 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 13 7 16 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 13 6 16 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 13 7 16 , srcInfoPoints = [] } 0 @@ -169,20 +189,20 @@ ParseOk , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 18 6 22 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 18 7 22 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 18 6 19 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 18 7 19 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 19 6 22 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 19 7 22 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 19 6 22 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 19 7 22 , srcInfoPoints = [] } 0 @@ -190,13 +210,13 @@ ParseOk , Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 24 6 27 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 24 7 27 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 24 6 27 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 24 7 27 , srcInfoPoints = [] } 1 @@ -204,20 +224,20 @@ ParseOk , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 29 6 33 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 29 7 33 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 29 6 30 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 29 7 30 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 30 6 33 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 30 7 33 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 6 30 6 33 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 30 7 33 , srcInfoPoints = [] } 1 @@ -225,13 +245,13 @@ ParseOk , Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 13 7 16 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 8 13 8 16 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 13 7 16 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 8 13 8 16 , srcInfoPoints = [] } 15 @@ -239,20 +259,20 @@ ParseOk , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 18 7 22 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 8 18 8 22 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 18 7 19 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 8 18 8 19 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 19 7 22 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 8 19 8 22 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 19 7 22 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 8 19 8 22 , srcInfoPoints = [] } 15 @@ -260,13 +280,13 @@ ParseOk , Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 24 7 27 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 8 24 8 27 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 24 7 27 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 8 24 8 27 , srcInfoPoints = [] } 15 @@ -274,20 +294,20 @@ ParseOk , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 29 7 33 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 8 29 8 33 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 29 7 30 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 8 29 8 30 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 30 7 33 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 8 30 8 33 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 7 30 7 33 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 8 30 8 33 , srcInfoPoints = [] } 15 @@ -295,13 +315,13 @@ ParseOk , Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 8 13 8 92 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 9 13 9 92 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 8 13 8 92 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 9 13 9 92 , srcInfoPoints = [] } 1 @@ -309,13 +329,13 @@ ParseOk , Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 9 13 9 92 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 10 13 10 92 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 9 13 9 92 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 10 13 10 92 , srcInfoPoints = [] } 15 @@ -323,21 +343,21 @@ ParseOk , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 10 13 10 93 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 11 13 11 93 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 10 13 10 14 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 11 13 11 14 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 10 14 10 93 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 11 14 11 93 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = SrcSpan - "tests/examples/HexFloatLiteralsGood.hs" 10 14 10 93 + "tests/examples/HexFloatLiteralsGood.hs" 11 14 11 93 , srcInfoPoints = [] } 1 @@ -345,21 +365,21 @@ ParseOk , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 11 13 11 93 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 12 13 12 93 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 11 13 11 14 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 12 13 12 14 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 11 14 11 93 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 12 14 12 93 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = SrcSpan - "tests/examples/HexFloatLiteralsGood.hs" 11 14 11 93 + "tests/examples/HexFloatLiteralsGood.hs" 12 14 12 93 , srcInfoPoints = [] } 15 @@ -367,21 +387,21 @@ ParseOk , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 12 13 12 21 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 13 13 13 21 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 12 13 12 14 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 13 13 13 14 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 12 14 12 21 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 13 14 13 21 , srcInfoPoints = [] } (Frac SrcSpanInfo { srcInfoSpan = SrcSpan - "tests/examples/HexFloatLiteralsGood.hs" 12 14 12 21 + "tests/examples/HexFloatLiteralsGood.hs" 13 14 13 21 , srcInfoPoints = [] } (4369 % 256) @@ -389,21 +409,21 @@ ParseOk , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 12 23 12 31 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 13 23 13 31 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 12 23 12 24 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 13 23 13 24 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 12 24 12 31 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 13 24 13 31 , srcInfoPoints = [] } (Frac SrcSpanInfo { srcInfoSpan = SrcSpan - "tests/examples/HexFloatLiteralsGood.hs" 12 24 12 31 + "tests/examples/HexFloatLiteralsGood.hs" 13 24 13 31 , srcInfoPoints = [] } (4369 % 256) @@ -411,21 +431,21 @@ ParseOk , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 13 13 13 21 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 13 14 21 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 13 13 13 14 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 13 14 14 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 13 14 13 21 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 14 14 21 , srcInfoPoints = [] } (Frac SrcSpanInfo { srcInfoSpan = SrcSpan - "tests/examples/HexFloatLiteralsGood.hs" 13 14 13 21 + "tests/examples/HexFloatLiteralsGood.hs" 14 14 14 21 , srcInfoPoints = [] } (65535 % 256) @@ -433,21 +453,21 @@ ParseOk , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 13 23 13 31 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 23 14 31 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 13 23 13 24 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 23 14 24 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 13 24 13 31 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 24 14 31 , srcInfoPoints = [] } (Frac SrcSpanInfo { srcInfoSpan = SrcSpan - "tests/examples/HexFloatLiteralsGood.hs" 13 24 13 31 + "tests/examples/HexFloatLiteralsGood.hs" 14 24 14 31 , srcInfoPoints = [] } (65535 % 256) @@ -455,21 +475,21 @@ ParseOk , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 13 14 24 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 13 15 24 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 13 14 14 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 13 15 14 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 14 14 24 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 14 15 24 , srcInfoPoints = [] } (Frac SrcSpanInfo { srcInfoSpan = SrcSpan - "tests/examples/HexFloatLiteralsGood.hs" 14 14 14 24 + "tests/examples/HexFloatLiteralsGood.hs" 15 14 15 24 , srcInfoPoints = [] } (1048560 % 1) @@ -477,21 +497,21 @@ ParseOk , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 26 14 37 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 26 15 37 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 26 14 27 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 26 15 27 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 14 27 14 37 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 27 15 37 , srcInfoPoints = [] } (Frac SrcSpanInfo { srcInfoSpan = SrcSpan - "tests/examples/HexFloatLiteralsGood.hs" 14 27 14 37 + "tests/examples/HexFloatLiteralsGood.hs" 15 27 15 37 , srcInfoPoints = [] } (1048560 % 1) @@ -499,21 +519,21 @@ ParseOk , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 13 15 25 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 16 13 16 25 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 13 15 14 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 16 13 16 14 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 14 15 25 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 16 14 16 25 , srcInfoPoints = [] } (Frac SrcSpanInfo { srcInfoSpan = SrcSpan - "tests/examples/HexFloatLiteralsGood.hs" 15 14 15 25 + "tests/examples/HexFloatLiteralsGood.hs" 16 14 16 25 , srcInfoPoints = [] } (65535 % 1048576) @@ -521,21 +541,21 @@ ParseOk , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 27 15 39 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 16 27 16 39 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 27 15 28 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 16 27 16 28 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 15 28 15 39 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 16 28 16 39 , srcInfoPoints = [] } (Frac SrcSpanInfo { srcInfoSpan = SrcSpan - "tests/examples/HexFloatLiteralsGood.hs" 15 28 15 39 + "tests/examples/HexFloatLiteralsGood.hs" 16 28 16 39 , srcInfoPoints = [] } (65535 % 1048576) @@ -544,70 +564,70 @@ ParseOk , Qualifier SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 5 22 12 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 5 23 12 , srcInfoPoints = [] } (App SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 5 22 12 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 5 23 12 , srcInfoPoints = [] } (Var SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 5 18 10 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 5 19 10 , srcInfoPoints = [] } (UnQual SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 5 18 10 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 5 19 10 , srcInfoPoints = [] } (Ident SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 5 18 10 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 5 19 10 , srcInfoPoints = [] } "print"))) (List SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 11 22 12 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 11 23 12 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 11 18 12 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 16 18 17 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 21 18 22 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 27 18 28 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 33 18 34 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 40 18 41 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 47 18 48 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 54 18 55 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 11 19 12 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 17 19 18 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 23 19 24 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 30 19 31 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 37 19 38 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 45 19 46 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 53 19 54 - , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 61 19 62 + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 11 19 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 16 19 17 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 21 19 22 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 27 19 28 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 33 19 34 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 40 19 41 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 47 19 48 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 54 19 55 , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 11 20 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 17 20 18 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 23 20 24 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 30 20 31 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 37 20 38 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 45 20 46 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 53 20 54 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 61 20 62 , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 21 11 21 12 , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 22 11 22 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 23 11 23 12 ] } [ Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 13 18 16 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 13 19 16 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 13 18 16 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 13 19 16 , srcInfoPoints = [] } 0 @@ -615,13 +635,13 @@ ParseOk , Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 18 18 21 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 18 19 21 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 18 18 21 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 18 19 21 , srcInfoPoints = [] } 1 @@ -629,13 +649,13 @@ ParseOk , Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 23 18 27 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 23 19 27 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 23 18 27 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 23 19 27 , srcInfoPoints = [] } 16 @@ -643,13 +663,13 @@ ParseOk , Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 29 18 33 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 29 19 33 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 29 18 33 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 29 19 33 , srcInfoPoints = [] } 17 @@ -657,13 +677,13 @@ ParseOk , Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 35 18 40 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 35 19 40 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 35 18 40 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 35 19 40 , srcInfoPoints = [] } 256 @@ -671,13 +691,13 @@ ParseOk , Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 42 18 47 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 42 19 47 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 42 18 47 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 42 19 47 , srcInfoPoints = [] } 257 @@ -685,13 +705,13 @@ ParseOk , Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 49 18 54 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 49 19 54 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 49 18 54 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 49 19 54 , srcInfoPoints = [] } 272 @@ -699,21 +719,21 @@ ParseOk , ExpTypeSig SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 56 18 72 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 56 19 72 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 62 18 64 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 62 19 64 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 56 18 61 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 56 19 61 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = SrcSpan - "tests/examples/HexFloatLiteralsGood.hs" 18 56 18 61 + "tests/examples/HexFloatLiteralsGood.hs" 19 56 19 61 , srcInfoPoints = [] } 273 @@ -721,42 +741,42 @@ ParseOk (TyCon SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 18 65 18 72 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 65 19 72 , srcInfoPoints = [] } (UnQual SrcSpanInfo { srcInfoSpan = SrcSpan - "tests/examples/HexFloatLiteralsGood.hs" 18 65 18 72 + "tests/examples/HexFloatLiteralsGood.hs" 19 65 19 72 , srcInfoPoints = [] } (Ident SrcSpanInfo { srcInfoSpan = SrcSpan - "tests/examples/HexFloatLiteralsGood.hs" 18 65 18 72 + "tests/examples/HexFloatLiteralsGood.hs" 19 65 19 72 , srcInfoPoints = [] } "Integer"))) , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 13 19 17 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 13 20 17 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 13 19 14 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 13 20 14 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 14 19 17 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 14 20 17 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = SrcSpan - "tests/examples/HexFloatLiteralsGood.hs" 19 14 19 17 + "tests/examples/HexFloatLiteralsGood.hs" 20 14 20 17 , srcInfoPoints = [] } 0 @@ -764,21 +784,21 @@ ParseOk , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 19 19 23 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 19 20 23 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 19 19 20 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 19 20 20 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 20 19 23 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 20 20 23 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = SrcSpan - "tests/examples/HexFloatLiteralsGood.hs" 19 20 19 23 + "tests/examples/HexFloatLiteralsGood.hs" 20 20 20 23 , srcInfoPoints = [] } 1 @@ -786,21 +806,21 @@ ParseOk , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 25 19 30 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 25 20 30 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 25 19 26 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 25 20 26 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 26 19 30 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 26 20 30 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = SrcSpan - "tests/examples/HexFloatLiteralsGood.hs" 19 26 19 30 + "tests/examples/HexFloatLiteralsGood.hs" 20 26 20 30 , srcInfoPoints = [] } 16 @@ -808,21 +828,21 @@ ParseOk , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 32 19 37 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 32 20 37 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 32 19 33 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 32 20 33 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 33 19 37 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 33 20 37 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = SrcSpan - "tests/examples/HexFloatLiteralsGood.hs" 19 33 19 37 + "tests/examples/HexFloatLiteralsGood.hs" 20 33 20 37 , srcInfoPoints = [] } 17 @@ -830,21 +850,21 @@ ParseOk , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 39 19 45 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 39 20 45 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 39 19 40 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 39 20 40 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 40 19 45 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 40 20 45 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = SrcSpan - "tests/examples/HexFloatLiteralsGood.hs" 19 40 19 45 + "tests/examples/HexFloatLiteralsGood.hs" 20 40 20 45 , srcInfoPoints = [] } 256 @@ -852,21 +872,21 @@ ParseOk , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 47 19 53 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 47 20 53 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 47 19 48 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 47 20 48 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 48 19 53 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 48 20 53 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = SrcSpan - "tests/examples/HexFloatLiteralsGood.hs" 19 48 19 53 + "tests/examples/HexFloatLiteralsGood.hs" 20 48 20 53 , srcInfoPoints = [] } 257 @@ -874,21 +894,21 @@ ParseOk , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 55 19 61 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 55 20 61 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 55 19 56 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 55 20 56 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 56 19 61 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 56 20 61 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = SrcSpan - "tests/examples/HexFloatLiteralsGood.hs" 19 56 19 61 + "tests/examples/HexFloatLiteralsGood.hs" 20 56 20 61 , srcInfoPoints = [] } 272 @@ -896,21 +916,21 @@ ParseOk , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 63 19 69 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 63 20 69 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 63 19 64 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 63 20 64 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 19 64 19 69 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 64 20 69 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = SrcSpan - "tests/examples/HexFloatLiteralsGood.hs" 19 64 19 69 + "tests/examples/HexFloatLiteralsGood.hs" 20 64 20 69 , srcInfoPoints = [] } 273 @@ -918,13 +938,13 @@ ParseOk , Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 13 20 143 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 21 13 21 143 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 20 13 20 143 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 21 13 21 143 , srcInfoPoints = [] } 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 @@ -932,26 +952,889 @@ ParseOk , NegApp SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 21 13 21 144 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 22 13 22 144 , srcInfoPoints = - [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 21 13 21 14 ] + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 22 13 22 14 ] } (Lit SrcSpanInfo { srcInfoSpan = - SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 21 14 21 144 + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 22 14 22 144 , srcInfoPoints = [] } (Int SrcSpanInfo { srcInfoSpan = SrcSpan - "tests/examples/HexFloatLiteralsGood.hs" 21 14 21 144 + "tests/examples/HexFloatLiteralsGood.hs" 22 14 22 144 , srcInfoPoints = [] } 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 "0x11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111")) ])) + , Qualifier + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 25 5 35 12 + , srcInfoPoints = [] + } + (App + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 25 5 35 12 + , srcInfoPoints = [] + } + (Var + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 25 5 25 10 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 25 5 25 10 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 25 5 25 10 + , srcInfoPoints = [] + } + "print"))) + (List + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 25 11 35 12 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 25 11 25 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 25 18 25 19 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 25 26 25 27 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 25 33 25 34 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 26 11 26 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 26 18 26 19 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 26 26 26 27 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 26 33 26 34 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 27 11 27 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 28 11 28 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 29 11 29 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 30 11 30 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 31 11 31 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 31 25 31 26 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 32 11 32 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 32 25 32 26 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 33 11 33 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 33 27 33 28 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 34 11 34 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 34 28 34 29 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 35 11 35 12 + ] + } + [ Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 25 13 25 18 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 25 13 25 18 + , srcInfoPoints = [] + } + 0 + "0x0_0") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 25 20 25 26 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 25 20 25 21 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 25 21 25 26 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 25 21 25 26 + , srcInfoPoints = [] + } + 0 + "0x0_0")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 25 28 25 33 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 25 28 25 33 + , srcInfoPoints = [] + } + 16 + "0x1_0") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 25 35 25 41 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 25 35 25 36 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 25 36 25 41 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 25 36 25 41 + , srcInfoPoints = [] + } + 16 + "0x1_0")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 26 13 26 18 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 26 13 26 18 + , srcInfoPoints = [] + } + 240 + "0xF_0") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 26 20 26 26 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 26 20 26 21 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 26 21 26 26 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 26 21 26 26 + , srcInfoPoints = [] + } + 240 + "0xF_0")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 26 28 26 33 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 26 28 26 33 + , srcInfoPoints = [] + } + 255 + "0xF_F") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 26 35 26 41 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 26 35 26 36 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 26 36 26 41 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 26 36 26 41 + , srcInfoPoints = [] + } + 255 + "0xF_F")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 27 13 27 117 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 27 13 27 117 + , srcInfoPoints = [] + } + 1 + "0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01") + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 28 13 28 117 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 28 13 28 117 + , srcInfoPoints = [] + } + 15 + "0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_0F") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 29 13 29 118 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 29 13 29 14 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 29 14 29 118 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 29 14 29 118 + , srcInfoPoints = [] + } + 1 + "0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 30 13 30 118 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 30 13 30 14 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 30 14 30 118 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 30 14 30 118 + , srcInfoPoints = [] + } + 15 + "0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_0F")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 31 13 31 25 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 31 13 31 14 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 31 14 31 25 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 31 14 31 25 + , srcInfoPoints = [] + } + (69649 % 256) + "0x11_0.11_0")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 31 27 31 39 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 31 27 31 28 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 31 28 31 39 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 31 28 31 39 + , srcInfoPoints = [] + } + (69649 % 256) + "0x11_0.11_0")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 32 13 32 25 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 32 13 32 14 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 32 14 32 25 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 32 14 32 25 + , srcInfoPoints = [] + } + (1044735 % 256) + "0xFF_0.FF_0")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 32 27 32 39 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 32 27 32 28 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 32 28 32 39 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 32 28 32 39 + , srcInfoPoints = [] + } + (1044735 % 256) + "0xFF_0.FF_0")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 33 13 33 27 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 33 13 33 14 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 33 14 33 27 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 33 14 33 27 + , srcInfoPoints = [] + } + (1048560 % 1) + "0xF_F.F_Fp1_2")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 33 29 33 43 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 33 29 33 30 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 33 30 33 43 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 33 30 33 43 + , srcInfoPoints = [] + } + (1048560 % 1) + "0xF_F.F_Fp1_2")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 34 13 34 28 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 34 13 34 14 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 34 14 34 28 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 34 14 34 28 + , srcInfoPoints = [] + } + (65535 % 1048576) + "0xF_F.F_Fp-1_2")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 34 30 34 45 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 34 30 34 31 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 34 31 34 45 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 34 31 34 45 + , srcInfoPoints = [] + } + (65535 % 1048576) + "0xF_F.F_Fp-1_2")) + ])) + , Qualifier + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 5 41 12 + , srcInfoPoints = [] + } + (App + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 5 41 12 + , srcInfoPoints = [] + } + (Var + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 5 37 10 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 5 37 10 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 5 37 10 + , srcInfoPoints = [] + } + "print"))) + (List + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 11 41 12 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 11 37 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 18 37 19 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 25 37 26 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 33 37 34 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 41 37 42 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 50 37 51 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 59 37 60 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 68 37 69 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 11 38 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 19 38 20 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 27 38 28 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 36 38 37 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 45 38 46 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 55 38 56 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 65 38 66 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 75 38 76 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 39 11 39 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 40 11 40 12 + , SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 41 11 41 12 + ] + } + [ Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 13 37 18 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 13 37 18 + , srcInfoPoints = [] + } + 0 + "0x0_0") + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 20 37 25 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 20 37 25 + , srcInfoPoints = [] + } + 16 + "0x1_0") + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 27 37 33 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 27 37 33 + , srcInfoPoints = [] + } + 256 + "0x10_0") + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 35 37 41 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 35 37 41 + , srcInfoPoints = [] + } + 272 + "0x11_0") + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 43 37 50 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 43 37 50 + , srcInfoPoints = [] + } + 4096 + "0x100_0") + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 52 37 59 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 52 37 59 + , srcInfoPoints = [] + } + 4112 + "0x101_0") + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 61 37 68 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 61 37 68 + , srcInfoPoints = [] + } + 4352 + "0x110_0") + , ExpTypeSig + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 70 37 88 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 78 37 80 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 70 37 77 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 37 70 37 77 + , srcInfoPoints = [] + } + 4368 + "0x111_0")) + (TyCon + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 37 81 37 88 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 37 81 37 88 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 37 81 37 88 + , srcInfoPoints = [] + } + "Integer"))) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 13 38 19 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 13 38 14 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 14 38 19 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 38 14 38 19 + , srcInfoPoints = [] + } + 0 + "0x0_0")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 21 38 27 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 21 38 22 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 22 38 27 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 38 22 38 27 + , srcInfoPoints = [] + } + 16 + "0x1_0")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 29 38 36 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 29 38 30 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 30 38 36 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 38 30 38 36 + , srcInfoPoints = [] + } + 256 + "0x10_0")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 38 38 45 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 38 38 39 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 39 38 45 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 38 39 38 45 + , srcInfoPoints = [] + } + 272 + "0x11_0")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 47 38 55 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 47 38 48 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 48 38 55 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 38 48 38 55 + , srcInfoPoints = [] + } + 4096 + "0x100_0")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 57 38 65 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 57 38 58 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 58 38 65 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 38 58 38 65 + , srcInfoPoints = [] + } + 4112 + "0x101_0")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 67 38 75 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 67 38 68 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 68 38 75 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 38 68 38 75 + , srcInfoPoints = [] + } + 4352 + "0x110_0")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 77 38 85 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 77 38 78 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 38 78 38 85 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 38 78 38 85 + , srcInfoPoints = [] + } + 4368 + "0x111_0")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 39 13 39 185 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 39 13 39 185 + , srcInfoPoints = [] + } + 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 + "0x111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_11") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 40 13 40 186 + , srcInfoPoints = + [ SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 40 13 40 14 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/HexFloatLiteralsGood.hs" 40 14 40 186 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/HexFloatLiteralsGood.hs" 40 14 40 186 + , srcInfoPoints = [] + } + 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 + "0x111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_11")) + ])) ])) Nothing ] diff --git a/tests/examples/HexFloatLiteralsGood.hs.prettyparser.golden b/tests/examples/HexFloatLiteralsGood.hs.prettyparser.golden index 6f0b099d..b707b7c5 100644 --- a/tests/examples/HexFloatLiteralsGood.hs.prettyparser.golden +++ b/tests/examples/HexFloatLiteralsGood.hs.prettyparser.golden @@ -2,9 +2,9 @@ Roundtrip test failed AST 1: -Module () Nothing [LanguagePragma () [Ident () "HexFloatLiterals"]] [ImportDecl {importAnn = (), importModule = ModuleName () "GHC.Types", importQualified = False, importSrc = False, importSafe = False, importPkg = Nothing, importAs = Nothing, importSpecs = Nothing}] [PatBind () (PVar () (Ident () "main")) (UnGuardedRhs () (Do () [Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0x0"),NegApp () (Lit () (Int () 0 "0x0")),Lit () (Int () 1 "0x1"),NegApp () (Lit () (Int () 1 "0x1")),Lit () (Int () 15 "0xF"),NegApp () (Lit () (Int () 15 "0xF")),Lit () (Int () 15 "0xF"),NegApp () (Lit () (Int () 15 "0xF")),Lit () (Int () 1 "0x00000000000000000000000000000000000000000000000000000000000000000000000000001"),Lit () (Int () 15 "0x0000000000000000000000000000000000000000000000000000000000000000000000000000F"),NegApp () (Lit () (Int () 1 "0x00000000000000000000000000000000000000000000000000000000000000000000000000001")),NegApp () (Lit () (Int () 15 "0x0000000000000000000000000000000000000000000000000000000000000000000000000000F")),NegApp () (Lit () (Frac () (4369 % 256) "0x11.11")),NegApp () (Lit () (Frac () (4369 % 256) "0x11.11")),NegApp () (Lit () (Frac () (65535 % 256) "0xFF.FF")),NegApp () (Lit () (Frac () (65535 % 256) "0xFF.FF")),NegApp () (Lit () (Frac () (1048560 % 1) "0xFF.FFp12")),NegApp () (Lit () (Frac () (1048560 % 1) "0xFF.FFp12")),NegApp () (Lit () (Frac () (65535 % 1048576) "0xFF.FFp-12")),NegApp () (Lit () (Frac () (65535 % 1048576) "0xFF.FFp-12"))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0x0"),Lit () (Int () 1 "0x1"),Lit () (Int () 16 "0x10"),Lit () (Int () 17 "0x11"),Lit () (Int () 256 "0x100"),Lit () (Int () 257 "0x101"),Lit () (Int () 272 "0x110"),ExpTypeSig () (Lit () (Int () 273 "0x111")) (TyCon () (UnQual () (Ident () "Integer"))),NegApp () (Lit () (Int () 0 "0x0")),NegApp () (Lit () (Int () 1 "0x1")),NegApp () (Lit () (Int () 16 "0x10")),NegApp () (Lit () (Int () 17 "0x11")),NegApp () (Lit () (Int () 256 "0x100")),NegApp () (Lit () (Int () 257 "0x101")),NegApp () (Lit () (Int () 272 "0x110")),NegApp () (Lit () (Int () 273 "0x111")),Lit () (Int () 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 "0x11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"),NegApp () (Lit () (Int () 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 "0x11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"))]))])) Nothing] +Module () Nothing [LanguagePragma () [Ident () "HexFloatLiterals"],LanguagePragma () [Ident () "NumericUnderscores"]] [ImportDecl {importAnn = (), importModule = ModuleName () "GHC.Types", importQualified = False, importSrc = False, importSafe = False, importPkg = Nothing, importAs = Nothing, importSpecs = Nothing}] [PatBind () (PVar () (Ident () "main")) (UnGuardedRhs () (Do () [Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0x0"),NegApp () (Lit () (Int () 0 "0x0")),Lit () (Int () 1 "0x1"),NegApp () (Lit () (Int () 1 "0x1")),Lit () (Int () 15 "0xF"),NegApp () (Lit () (Int () 15 "0xF")),Lit () (Int () 15 "0xF"),NegApp () (Lit () (Int () 15 "0xF")),Lit () (Int () 1 "0x00000000000000000000000000000000000000000000000000000000000000000000000000001"),Lit () (Int () 15 "0x0000000000000000000000000000000000000000000000000000000000000000000000000000F"),NegApp () (Lit () (Int () 1 "0x00000000000000000000000000000000000000000000000000000000000000000000000000001")),NegApp () (Lit () (Int () 15 "0x0000000000000000000000000000000000000000000000000000000000000000000000000000F")),NegApp () (Lit () (Frac () (4369 % 256) "0x11.11")),NegApp () (Lit () (Frac () (4369 % 256) "0x11.11")),NegApp () (Lit () (Frac () (65535 % 256) "0xFF.FF")),NegApp () (Lit () (Frac () (65535 % 256) "0xFF.FF")),NegApp () (Lit () (Frac () (1048560 % 1) "0xFF.FFp12")),NegApp () (Lit () (Frac () (1048560 % 1) "0xFF.FFp12")),NegApp () (Lit () (Frac () (65535 % 1048576) "0xFF.FFp-12")),NegApp () (Lit () (Frac () (65535 % 1048576) "0xFF.FFp-12"))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0x0"),Lit () (Int () 1 "0x1"),Lit () (Int () 16 "0x10"),Lit () (Int () 17 "0x11"),Lit () (Int () 256 "0x100"),Lit () (Int () 257 "0x101"),Lit () (Int () 272 "0x110"),ExpTypeSig () (Lit () (Int () 273 "0x111")) (TyCon () (UnQual () (Ident () "Integer"))),NegApp () (Lit () (Int () 0 "0x0")),NegApp () (Lit () (Int () 1 "0x1")),NegApp () (Lit () (Int () 16 "0x10")),NegApp () (Lit () (Int () 17 "0x11")),NegApp () (Lit () (Int () 256 "0x100")),NegApp () (Lit () (Int () 257 "0x101")),NegApp () (Lit () (Int () 272 "0x110")),NegApp () (Lit () (Int () 273 "0x111")),Lit () (Int () 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 "0x11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"),NegApp () (Lit () (Int () 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 "0x11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0x0_0"),NegApp () (Lit () (Int () 0 "0x0_0")),Lit () (Int () 16 "0x1_0"),NegApp () (Lit () (Int () 16 "0x1_0")),Lit () (Int () 240 "0xF_0"),NegApp () (Lit () (Int () 240 "0xF_0")),Lit () (Int () 255 "0xF_F"),NegApp () (Lit () (Int () 255 "0xF_F")),Lit () (Int () 1 "0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01"),Lit () (Int () 15 "0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_0F"),NegApp () (Lit () (Int () 1 "0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01")),NegApp () (Lit () (Int () 15 "0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_0F")),NegApp () (Lit () (Frac () (69649 % 256) "0x11_0.11_0")),NegApp () (Lit () (Frac () (69649 % 256) "0x11_0.11_0")),NegApp () (Lit () (Frac () (1044735 % 256) "0xFF_0.FF_0")),NegApp () (Lit () (Frac () (1044735 % 256) "0xFF_0.FF_0")),NegApp () (Lit () (Frac () (1048560 % 1) "0xF_F.F_Fp1_2")),NegApp () (Lit () (Frac () (1048560 % 1) "0xF_F.F_Fp1_2")),NegApp () (Lit () (Frac () (65535 % 1048576) "0xF_F.F_Fp-1_2")),NegApp () (Lit () (Frac () (65535 % 1048576) "0xF_F.F_Fp-1_2"))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0x0_0"),Lit () (Int () 16 "0x1_0"),Lit () (Int () 256 "0x10_0"),Lit () (Int () 272 "0x11_0"),Lit () (Int () 4096 "0x100_0"),Lit () (Int () 4112 "0x101_0"),Lit () (Int () 4352 "0x110_0"),ExpTypeSig () (Lit () (Int () 4368 "0x111_0")) (TyCon () (UnQual () (Ident () "Integer"))),NegApp () (Lit () (Int () 0 "0x0_0")),NegApp () (Lit () (Int () 16 "0x1_0")),NegApp () (Lit () (Int () 256 "0x10_0")),NegApp () (Lit () (Int () 272 "0x11_0")),NegApp () (Lit () (Int () 4096 "0x100_0")),NegApp () (Lit () (Int () 4112 "0x101_0")),NegApp () (Lit () (Int () 4352 "0x110_0")),NegApp () (Lit () (Int () 4368 "0x111_0")),Lit () (Int () 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 "0x111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_11"),NegApp () (Lit () (Int () 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 "0x111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_11"))]))])) Nothing] AST 2: -Module () Nothing [LanguagePragma () [Ident () "HexFloatLiterals"]] [ImportDecl {importAnn = (), importModule = ModuleName () "GHC.Types", importQualified = False, importSrc = False, importSafe = False, importPkg = Nothing, importAs = Nothing, importSpecs = Nothing}] [PatBind () (PVar () (Ident () "main")) (UnGuardedRhs () (Do () [Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0"),NegApp () (Lit () (Int () 0 "0")),Lit () (Int () 1 "1"),NegApp () (Lit () (Int () 1 "1")),Lit () (Int () 15 "15"),NegApp () (Lit () (Int () 15 "15")),Lit () (Int () 15 "15"),NegApp () (Lit () (Int () 15 "15")),Lit () (Int () 1 "1"),Lit () (Int () 15 "15"),NegApp () (Lit () (Int () 1 "1")),NegApp () (Lit () (Int () 15 "15")),NegApp () (Lit () (Frac () (4369 % 256) "17.06640625")),NegApp () (Lit () (Frac () (4369 % 256) "17.06640625")),NegApp () (Lit () (Frac () (65535 % 256) "255.99609375")),NegApp () (Lit () (Frac () (65535 % 256) "255.99609375")),NegApp () (Lit () (Frac () (1048560 % 1) "1048560.0")),NegApp () (Lit () (Frac () (1048560 % 1) "1048560.0")),NegApp () (Lit () (Frac () (31249523162841797 % 500000000000000000) "6.2499046325683594e-2")),NegApp () (Lit () (Frac () (31249523162841797 % 500000000000000000) "6.2499046325683594e-2"))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0"),Lit () (Int () 1 "1"),Lit () (Int () 16 "16"),Lit () (Int () 17 "17"),Lit () (Int () 256 "256"),Lit () (Int () 257 "257"),Lit () (Int () 272 "272"),ExpTypeSig () (Lit () (Int () 273 "273")) (TyCon () (UnQual () (Ident () "Integer"))),NegApp () (Lit () (Int () 0 "0")),NegApp () (Lit () (Int () 1 "1")),NegApp () (Lit () (Int () 16 "16")),NegApp () (Lit () (Int () 17 "17")),NegApp () (Lit () (Int () 256 "256")),NegApp () (Lit () (Int () 257 "257")),NegApp () (Lit () (Int () 272 "272")),NegApp () (Lit () (Int () 273 "273")),Lit () (Int () 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 "893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273"),NegApp () (Lit () (Int () 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 "893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273"))]))])) Nothing] +Module () Nothing [LanguagePragma () [Ident () "HexFloatLiterals"],LanguagePragma () [Ident () "NumericUnderscores"]] [ImportDecl {importAnn = (), importModule = ModuleName () "GHC.Types", importQualified = False, importSrc = False, importSafe = False, importPkg = Nothing, importAs = Nothing, importSpecs = Nothing}] [PatBind () (PVar () (Ident () "main")) (UnGuardedRhs () (Do () [Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0"),NegApp () (Lit () (Int () 0 "0")),Lit () (Int () 1 "1"),NegApp () (Lit () (Int () 1 "1")),Lit () (Int () 15 "15"),NegApp () (Lit () (Int () 15 "15")),Lit () (Int () 15 "15"),NegApp () (Lit () (Int () 15 "15")),Lit () (Int () 1 "1"),Lit () (Int () 15 "15"),NegApp () (Lit () (Int () 1 "1")),NegApp () (Lit () (Int () 15 "15")),NegApp () (Lit () (Frac () (4369 % 256) "17.06640625")),NegApp () (Lit () (Frac () (4369 % 256) "17.06640625")),NegApp () (Lit () (Frac () (65535 % 256) "255.99609375")),NegApp () (Lit () (Frac () (65535 % 256) "255.99609375")),NegApp () (Lit () (Frac () (1048560 % 1) "1048560.0")),NegApp () (Lit () (Frac () (1048560 % 1) "1048560.0")),NegApp () (Lit () (Frac () (31249523162841797 % 500000000000000000) "6.2499046325683594e-2")),NegApp () (Lit () (Frac () (31249523162841797 % 500000000000000000) "6.2499046325683594e-2"))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0"),Lit () (Int () 1 "1"),Lit () (Int () 16 "16"),Lit () (Int () 17 "17"),Lit () (Int () 256 "256"),Lit () (Int () 257 "257"),Lit () (Int () 272 "272"),ExpTypeSig () (Lit () (Int () 273 "273")) (TyCon () (UnQual () (Ident () "Integer"))),NegApp () (Lit () (Int () 0 "0")),NegApp () (Lit () (Int () 1 "1")),NegApp () (Lit () (Int () 16 "16")),NegApp () (Lit () (Int () 17 "17")),NegApp () (Lit () (Int () 256 "256")),NegApp () (Lit () (Int () 257 "257")),NegApp () (Lit () (Int () 272 "272")),NegApp () (Lit () (Int () 273 "273")),Lit () (Int () 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 "893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273"),NegApp () (Lit () (Int () 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 "893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273"))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0"),NegApp () (Lit () (Int () 0 "0")),Lit () (Int () 16 "16"),NegApp () (Lit () (Int () 16 "16")),Lit () (Int () 240 "240"),NegApp () (Lit () (Int () 240 "240")),Lit () (Int () 255 "255"),NegApp () (Lit () (Int () 255 "255")),Lit () (Int () 1 "1"),Lit () (Int () 15 "15"),NegApp () (Lit () (Int () 1 "1")),NegApp () (Lit () (Int () 15 "15")),NegApp () (Lit () (Frac () (69649 % 256) "272.06640625")),NegApp () (Lit () (Frac () (69649 % 256) "272.06640625")),NegApp () (Lit () (Frac () (1044735 % 256) "4080.99609375")),NegApp () (Lit () (Frac () (1044735 % 256) "4080.99609375")),NegApp () (Lit () (Frac () (1048560 % 1) "1048560.0")),NegApp () (Lit () (Frac () (1048560 % 1) "1048560.0")),NegApp () (Lit () (Frac () (31249523162841797 % 500000000000000000) "6.2499046325683594e-2")),NegApp () (Lit () (Frac () (31249523162841797 % 500000000000000000) "6.2499046325683594e-2"))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0"),Lit () (Int () 16 "16"),Lit () (Int () 256 "256"),Lit () (Int () 272 "272"),Lit () (Int () 4096 "4096"),Lit () (Int () 4112 "4112"),Lit () (Int () 4352 "4352"),ExpTypeSig () (Lit () (Int () 4368 "4368")) (TyCon () (UnQual () (Ident () "Integer"))),NegApp () (Lit () (Int () 0 "0")),NegApp () (Lit () (Int () 16 "16")),NegApp () (Lit () (Int () 256 "256")),NegApp () (Lit () (Int () 272 "272")),NegApp () (Lit () (Int () 4096 "4096")),NegApp () (Lit () (Int () 4112 "4112")),NegApp () (Lit () (Int () 4352 "4352")),NegApp () (Lit () (Int () 4368 "4368")),Lit () (Int () 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 "893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273"),NegApp () (Lit () (Int () 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 "893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273"))]))])) Nothing] diff --git a/tests/examples/HexFloatLiteralsGood.hs.prettyprinter.golden b/tests/examples/HexFloatLiteralsGood.hs.prettyprinter.golden index 38cca13e..3d492a58 100644 --- a/tests/examples/HexFloatLiteralsGood.hs.prettyprinter.golden +++ b/tests/examples/HexFloatLiteralsGood.hs.prettyprinter.golden @@ -1,4 +1,5 @@ {-# LANGUAGE HexFloatLiterals #-} +{-# LANGUAGE NumericUnderscores #-} import GHC.Types main = do print @@ -10,3 +11,13 @@ main -256, -257, -272, -273, 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273, -893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273] + print + [0, -0, 16, -16, 240, -240, 255, -255, 1, 15, -1, -15, + -272.06640625, -272.06640625, -4080.99609375, -4080.99609375, + -1048560.0, -1048560.0, -6.2499046325683594e-2, + -6.2499046325683594e-2] + print + [0, 16, 256, 272, 4096, 4112, 4352, 4368 :: Integer, -0, -16, -256, + -272, -4096, -4112, -4352, -4368, + 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273, + -893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273] diff --git a/tests/examples/NumericUnderscoresBad.hs b/tests/examples/NumericUnderscoresBad.hs new file mode 100644 index 00000000..ea8a1e63 --- /dev/null +++ b/tests/examples/NumericUnderscoresBad.hs @@ -0,0 +1,4 @@ +-- Missing NumericUnderscores extension. Should fail. +f :: Integer -> () +f 1_000 = () +f _ = () diff --git a/tests/examples/NumericUnderscoresBad.hs.exactprinter.golden b/tests/examples/NumericUnderscoresBad.hs.exactprinter.golden new file mode 100644 index 00000000..a133da13 --- /dev/null +++ b/tests/examples/NumericUnderscoresBad.hs.exactprinter.golden @@ -0,0 +1 @@ +ParseFailed (SrcLoc "tests/examples/NumericUnderscoresBad.hs" 3 1) "arity mismatch for 'f'" diff --git a/tests/examples/NumericUnderscoresBad.hs.parser.golden b/tests/examples/NumericUnderscoresBad.hs.parser.golden new file mode 100644 index 00000000..ed8ce9e4 --- /dev/null +++ b/tests/examples/NumericUnderscoresBad.hs.parser.golden @@ -0,0 +1,3 @@ +ParseFailed + (SrcLoc "tests/examples/NumericUnderscoresBad.hs" 3 1) + "arity mismatch for 'f'" diff --git a/tests/examples/NumericUnderscoresBad.hs.prettyparser.golden b/tests/examples/NumericUnderscoresBad.hs.prettyparser.golden new file mode 100644 index 00000000..a133da13 --- /dev/null +++ b/tests/examples/NumericUnderscoresBad.hs.prettyparser.golden @@ -0,0 +1 @@ +ParseFailed (SrcLoc "tests/examples/NumericUnderscoresBad.hs" 3 1) "arity mismatch for 'f'" diff --git a/tests/examples/NumericUnderscoresBad.hs.prettyprinter.golden b/tests/examples/NumericUnderscoresBad.hs.prettyprinter.golden new file mode 100644 index 00000000..a133da13 --- /dev/null +++ b/tests/examples/NumericUnderscoresBad.hs.prettyprinter.golden @@ -0,0 +1 @@ +ParseFailed (SrcLoc "tests/examples/NumericUnderscoresBad.hs" 3 1) "arity mismatch for 'f'" diff --git a/tests/examples/NumericUnderscoresGood.hs b/tests/examples/NumericUnderscoresGood.hs new file mode 100644 index 00000000..35b57b41 --- /dev/null +++ b/tests/examples/NumericUnderscoresGood.hs @@ -0,0 +1,52 @@ +{-# LANGUAGE NumericUnderscores #-} +{-# LANGUAGE MagicHash #-} + +import GHC.Types + +main = do + print [ 0_00, -0_00, 1_00, -1_000 + , 000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01 + , -000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01 + , -000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01e12_00 + , -000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01e-12_00 + , -000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01e+12_00 + ] + print [ I# 0_00#, I# -0_00#, I# 1_00#, I# -1_000# + , I# 000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01# + , I# -000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01# + ] + print [ W# 0_00##, W# 1_00##, W# 1_000_000##, W# 1_111_111##, W# 1_1_1_1## + , W# 000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01## + ] + + print [ I8# -0_00_00_00#, I8# 1_00_00_00# ] + + print [ 0_00.00_00, -0_00.00_00, 1_00.00_00, -1_000.00_00 + , 000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01.00_00000_000_0011 + , -000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01.00_00000_000_0011 + , -000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01.00_00000_000_0011e12_00 + , -000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01.00_00000_000_0011e-12_00 + , -000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01.00_00000_000_0011e+12_00 + ] + + print [ 0x0_0, -0x0_0, 0x1_0, -0x1_0 + , 0xF_F, -0xF_F, 0xF_0, -0xF_0 + , 0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01 + , 0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_0F + , -0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01 + , -0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_0F + ] + + print [ 0o0_0, -0o0_0, 0o1_0, -0o1_0 + , 0o7_7, -0o7_7, 0o7_0, -0o7_0 + , 0o000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01 + , 0o000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_07 + , -0o000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01 + , -0o000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_07 + ] + + print [ 0x0, 0x1, 0x10, 0x11, 0x100, 0x101, 0x110, 0x111 :: Integer + , -0x0, -0x1, -0x10, -0x11, -0x100, -0x101, -0x110, -0x111 + , 0x111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_11111 + , -0x111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_11 + ] diff --git a/tests/examples/NumericUnderscoresGood.hs.exactprinter.golden b/tests/examples/NumericUnderscoresGood.hs.exactprinter.golden new file mode 100644 index 00000000..1796dc27 --- /dev/null +++ b/tests/examples/NumericUnderscoresGood.hs.exactprinter.golden @@ -0,0 +1 @@ +Match diff --git a/tests/examples/NumericUnderscoresGood.hs.parser.golden b/tests/examples/NumericUnderscoresGood.hs.parser.golden new file mode 100644 index 00000000..d14b7cb4 --- /dev/null +++ b/tests/examples/NumericUnderscoresGood.hs.parser.golden @@ -0,0 +1,2523 @@ +ParseOk + ( Module + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 1 1 53 1 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 1 1 1 1 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 2 1 2 1 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 4 1 4 1 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 4 1 4 1 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 4 1 4 1 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 6 1 6 1 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 53 1 53 1 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 53 1 53 1 + ] + } + Nothing + [ LanguagePragma + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 1 1 1 36 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 1 1 1 13 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 1 33 1 36 + ] + } + [ Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 1 14 1 32 + , srcInfoPoints = [] + } + "NumericUnderscores" + ] + , LanguagePragma + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 2 1 2 27 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 2 1 2 13 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 2 24 2 27 + ] + } + [ Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 2 14 2 23 + , srcInfoPoints = [] + } + "MagicHash" + ] + ] + [ ImportDecl + { importAnn = + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 4 1 4 17 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 4 1 4 7 ] + } + , importModule = + ModuleName + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 4 8 4 17 + , srcInfoPoints = [] + } + "GHC.Types" + , importQualified = False + , importSrc = False + , importSafe = False + , importPkg = Nothing + , importAs = Nothing + , importSpecs = Nothing + } + ] + [ PatBind + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 6 1 52 12 + , srcInfoPoints = [] + } + (PVar + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 6 1 6 5 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 6 1 6 5 + , srcInfoPoints = [] + } + "main")) + (UnGuardedRhs + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 6 6 52 12 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 6 6 6 7 ] + } + (Do + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 6 8 52 12 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 6 8 6 10 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 7 5 7 5 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 14 5 14 5 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 18 5 18 5 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 22 5 22 5 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 24 5 24 5 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 32 5 32 5 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 40 5 40 5 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 5 48 5 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 53 1 53 0 + ] + } + [ Qualifier + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 7 5 13 12 + , srcInfoPoints = [] + } + (App + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 7 5 13 12 + , srcInfoPoints = [] + } + (Var + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 7 5 7 10 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 7 5 7 10 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 7 5 7 10 + , srcInfoPoints = [] + } + "print"))) + (List + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 7 11 13 12 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 7 11 7 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 7 17 7 18 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 7 24 7 25 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 7 30 7 31 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 8 11 8 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 9 11 9 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 10 11 10 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 11 11 11 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 12 11 12 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 13 11 13 12 + ] + } + [ Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 7 13 7 17 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 7 13 7 17 + , srcInfoPoints = [] + } + 0 + "0_00") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 7 19 7 24 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 7 19 7 20 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 7 20 7 24 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 7 20 7 24 + , srcInfoPoints = [] + } + 0 + "0_00")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 7 26 7 30 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 7 26 7 30 + , srcInfoPoints = [] + } + 100 + "1_00") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 7 32 7 38 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 7 32 7 33 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 7 33 7 38 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 7 33 7 38 + , srcInfoPoints = [] + } + 1000 + "1_000")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 8 13 8 115 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 8 13 8 115 + , srcInfoPoints = [] + } + 1 + "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 9 13 9 116 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 9 13 9 14 ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 9 14 9 116 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 9 14 9 116 + , srcInfoPoints = [] + } + 1 + "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 10 13 10 122 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 10 13 10 14 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 10 14 10 122 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 10 14 10 122 + , srcInfoPoints = [] + } + (1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 % + 1) + "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01e12_00")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 11 13 11 123 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 11 13 11 14 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 11 14 11 123 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 11 14 11 123 + , srcInfoPoints = [] + } + (1 % + 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) + "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01e-12_00")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 12 13 12 123 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 12 13 12 14 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 12 14 12 123 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 12 14 12 123 + , srcInfoPoints = [] + } + (1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 % + 1) + "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01e+12_00")) + ])) + , Qualifier + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 14 5 17 12 + , srcInfoPoints = [] + } + (App + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 14 5 17 12 + , srcInfoPoints = [] + } + (Var + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 14 5 14 10 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 14 5 14 10 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 14 5 14 10 + , srcInfoPoints = [] + } + "print"))) + (List + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 14 11 17 12 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 14 11 14 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 14 21 14 22 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 14 32 14 33 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 14 42 14 43 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 15 11 15 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 16 11 16 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 17 11 17 12 + ] + } + [ App + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 14 13 14 21 + , srcInfoPoints = [] + } + (Con + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 14 13 14 15 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 14 13 14 15 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" + 14 + 13 + 14 + 15 + , srcInfoPoints = [] + } + "I#"))) + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 14 16 14 21 + , srcInfoPoints = [] + } + (PrimInt + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 14 16 14 21 + , srcInfoPoints = [] + } + 0 + "0_00")) + , InfixApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 14 23 14 32 + , srcInfoPoints = [] + } + (Con + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 14 23 14 25 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 14 23 14 25 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" + 14 + 23 + 14 + 25 + , srcInfoPoints = [] + } + "I#"))) + (QVarOp + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 14 26 14 27 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 14 26 14 27 + , srcInfoPoints = [] + } + (Symbol + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" + 14 + 26 + 14 + 27 + , srcInfoPoints = [] + } + "-"))) + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 14 27 14 32 + , srcInfoPoints = [] + } + (PrimInt + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 14 27 14 32 + , srcInfoPoints = [] + } + 0 + "0_00")) + , App + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 14 34 14 42 + , srcInfoPoints = [] + } + (Con + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 14 34 14 36 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 14 34 14 36 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" + 14 + 34 + 14 + 36 + , srcInfoPoints = [] + } + "I#"))) + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 14 37 14 42 + , srcInfoPoints = [] + } + (PrimInt + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 14 37 14 42 + , srcInfoPoints = [] + } + 100 + "1_00")) + , InfixApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 14 44 14 54 + , srcInfoPoints = [] + } + (Con + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 14 44 14 46 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 14 44 14 46 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" + 14 + 44 + 14 + 46 + , srcInfoPoints = [] + } + "I#"))) + (QVarOp + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 14 47 14 48 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 14 47 14 48 + , srcInfoPoints = [] + } + (Symbol + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" + 14 + 47 + 14 + 48 + , srcInfoPoints = [] + } + "-"))) + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 14 48 14 54 + , srcInfoPoints = [] + } + (PrimInt + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 14 48 14 54 + , srcInfoPoints = [] + } + 1000 + "1_000")) + , App + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 15 13 15 119 + , srcInfoPoints = [] + } + (Con + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 15 13 15 15 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 15 13 15 15 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" + 15 + 13 + 15 + 15 + , srcInfoPoints = [] + } + "I#"))) + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 15 16 15 119 + , srcInfoPoints = [] + } + (PrimInt + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 15 16 15 119 + , srcInfoPoints = [] + } + 1 + "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01")) + , InfixApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 16 13 16 120 + , srcInfoPoints = [] + } + (Con + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 16 13 16 15 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 16 13 16 15 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" + 16 + 13 + 16 + 15 + , srcInfoPoints = [] + } + "I#"))) + (QVarOp + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 16 16 16 17 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 16 16 16 17 + , srcInfoPoints = [] + } + (Symbol + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" + 16 + 16 + 16 + 17 + , srcInfoPoints = [] + } + "-"))) + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 16 17 16 120 + , srcInfoPoints = [] + } + (PrimInt + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 16 17 16 120 + , srcInfoPoints = [] + } + 1 + "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01")) + ])) + , Qualifier + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 18 5 20 12 + , srcInfoPoints = [] + } + (App + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 18 5 20 12 + , srcInfoPoints = [] + } + (Var + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 18 5 18 10 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 18 5 18 10 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 18 5 18 10 + , srcInfoPoints = [] + } + "print"))) + (List + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 18 11 20 12 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 18 11 18 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 18 22 18 23 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 18 33 18 34 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 18 49 18 50 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 18 65 18 66 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 19 11 19 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 20 11 20 12 + ] + } + [ App + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 18 13 18 22 + , srcInfoPoints = [] + } + (Con + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 18 13 18 15 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 18 13 18 15 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" + 18 + 13 + 18 + 15 + , srcInfoPoints = [] + } + "W#"))) + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 18 16 18 22 + , srcInfoPoints = [] + } + (PrimWord + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 18 16 18 22 + , srcInfoPoints = [] + } + 0 + "0_00")) + , App + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 18 24 18 33 + , srcInfoPoints = [] + } + (Con + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 18 24 18 26 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 18 24 18 26 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" + 18 + 24 + 18 + 26 + , srcInfoPoints = [] + } + "W#"))) + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 18 27 18 33 + , srcInfoPoints = [] + } + (PrimWord + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 18 27 18 33 + , srcInfoPoints = [] + } + 100 + "1_00")) + , App + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 18 35 18 49 + , srcInfoPoints = [] + } + (Con + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 18 35 18 37 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 18 35 18 37 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" + 18 + 35 + 18 + 37 + , srcInfoPoints = [] + } + "W#"))) + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 18 38 18 49 + , srcInfoPoints = [] + } + (PrimWord + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 18 38 18 49 + , srcInfoPoints = [] + } + 1000000 + "1_000_000")) + , App + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 18 51 18 65 + , srcInfoPoints = [] + } + (Con + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 18 51 18 53 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 18 51 18 53 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" + 18 + 51 + 18 + 53 + , srcInfoPoints = [] + } + "W#"))) + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 18 54 18 65 + , srcInfoPoints = [] + } + (PrimWord + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 18 54 18 65 + , srcInfoPoints = [] + } + 1111111 + "1_111_111")) + , App + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 18 67 18 79 + , srcInfoPoints = [] + } + (Con + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 18 67 18 69 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 18 67 18 69 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" + 18 + 67 + 18 + 69 + , srcInfoPoints = [] + } + "W#"))) + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 18 70 18 79 + , srcInfoPoints = [] + } + (PrimWord + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 18 70 18 79 + , srcInfoPoints = [] + } + 1111 + "1_1_1_1")) + , App + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 19 13 19 120 + , srcInfoPoints = [] + } + (Con + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 19 13 19 15 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 19 13 19 15 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" + 19 + 13 + 19 + 15 + , srcInfoPoints = [] + } + "W#"))) + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 19 16 19 120 + , srcInfoPoints = [] + } + (PrimWord + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 19 16 19 120 + , srcInfoPoints = [] + } + 1 + "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01")) + ])) + , Qualifier + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 22 5 22 48 + , srcInfoPoints = [] + } + (App + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 22 5 22 48 + , srcInfoPoints = [] + } + (Var + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 22 5 22 10 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 22 5 22 10 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 22 5 22 10 + , srcInfoPoints = [] + } + "print"))) + (List + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 22 11 22 48 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 22 11 22 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 22 29 22 30 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 22 47 22 48 + ] + } + [ InfixApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 22 13 22 29 + , srcInfoPoints = [] + } + (Con + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 22 13 22 16 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 22 13 22 16 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" + 22 + 13 + 22 + 16 + , srcInfoPoints = [] + } + "I8#"))) + (QVarOp + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 22 17 22 18 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 22 17 22 18 + , srcInfoPoints = [] + } + (Symbol + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" + 22 + 17 + 22 + 18 + , srcInfoPoints = [] + } + "-"))) + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 22 18 22 29 + , srcInfoPoints = [] + } + (PrimInt + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 22 18 22 29 + , srcInfoPoints = [] + } + 0 + "0_00_00_00")) + , App + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 22 31 22 46 + , srcInfoPoints = [] + } + (Con + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 22 31 22 34 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 22 31 22 34 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" + 22 + 31 + 22 + 34 + , srcInfoPoints = [] + } + "I8#"))) + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 22 35 22 46 + , srcInfoPoints = [] + } + (PrimInt + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 22 35 22 46 + , srcInfoPoints = [] + } + 1000000 + "1_00_00_00")) + ])) + , Qualifier + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 24 5 30 12 + , srcInfoPoints = [] + } + (App + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 24 5 30 12 + , srcInfoPoints = [] + } + (Var + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 24 5 24 10 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 24 5 24 10 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 24 5 24 10 + , srcInfoPoints = [] + } + "print"))) + (List + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 24 11 30 12 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 24 11 24 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 24 23 24 24 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 24 36 24 37 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 24 48 24 49 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 25 11 25 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 26 11 26 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 27 11 27 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 28 11 28 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 29 11 29 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 30 11 30 12 + ] + } + [ Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 24 13 24 23 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 24 13 24 23 + , srcInfoPoints = [] + } + (0 % 1) + "0_00.00_00") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 24 25 24 36 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 24 25 24 26 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 24 26 24 36 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 24 26 24 36 + , srcInfoPoints = [] + } + (0 % 1) + "0_00.00_00")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 24 38 24 48 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 24 38 24 48 + , srcInfoPoints = [] + } + (100 % 1) + "1_00.00_00") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 24 50 24 62 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 24 50 24 51 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 24 51 24 62 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 24 51 24 62 + , srcInfoPoints = [] + } + (1000 % 1) + "1_000.00_00")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 25 13 25 133 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 25 13 25 133 + , srcInfoPoints = [] + } + (100000000000011 % 100000000000000) + "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01.00_00000_000_0011") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 26 13 26 134 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 26 13 26 14 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 26 14 26 134 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 26 14 26 134 + , srcInfoPoints = [] + } + (100000000000011 % 100000000000000) + "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01.00_00000_000_0011")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 27 13 27 140 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 27 13 27 14 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 27 14 27 140 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 27 14 27 140 + , srcInfoPoints = [] + } + (1000000000000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 % + 1) + "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01.00_00000_000_0011e12_00")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 28 13 28 141 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 28 13 28 14 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 28 14 28 141 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 28 14 28 141 + , srcInfoPoints = [] + } + (100000000000011 % + 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) + "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01.00_00000_000_0011e-12_00")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 29 13 29 141 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 29 13 29 14 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 29 14 29 141 + , srcInfoPoints = [] + } + (Frac + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 29 14 29 141 + , srcInfoPoints = [] + } + (1000000000000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 % + 1) + "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01.00_00000_000_0011e+12_00")) + ])) + , Qualifier + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 32 5 38 12 + , srcInfoPoints = [] + } + (App + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 32 5 38 12 + , srcInfoPoints = [] + } + (Var + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 32 5 32 10 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 32 5 32 10 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 32 5 32 10 + , srcInfoPoints = [] + } + "print"))) + (List + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 32 11 38 12 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 32 11 32 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 32 18 32 19 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 32 26 32 27 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 32 33 32 34 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 33 11 33 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 33 18 33 19 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 33 26 33 27 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 33 33 33 34 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 34 11 34 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 35 11 35 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 36 11 36 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 37 11 37 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 38 11 38 12 + ] + } + [ Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 32 13 32 18 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 32 13 32 18 + , srcInfoPoints = [] + } + 0 + "0x0_0") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 32 20 32 26 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 32 20 32 21 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 32 21 32 26 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 32 21 32 26 + , srcInfoPoints = [] + } + 0 + "0x0_0")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 32 28 32 33 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 32 28 32 33 + , srcInfoPoints = [] + } + 16 + "0x1_0") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 32 35 32 41 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 32 35 32 36 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 32 36 32 41 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 32 36 32 41 + , srcInfoPoints = [] + } + 16 + "0x1_0")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 33 13 33 18 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 33 13 33 18 + , srcInfoPoints = [] + } + 255 + "0xF_F") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 33 20 33 26 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 33 20 33 21 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 33 21 33 26 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 33 21 33 26 + , srcInfoPoints = [] + } + 255 + "0xF_F")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 33 28 33 33 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 33 28 33 33 + , srcInfoPoints = [] + } + 240 + "0xF_0") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 33 35 33 41 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 33 35 33 36 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 33 36 33 41 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 33 36 33 41 + , srcInfoPoints = [] + } + 240 + "0xF_0")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 34 13 34 117 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 34 13 34 117 + , srcInfoPoints = [] + } + 1 + "0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01") + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 35 13 35 117 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 35 13 35 117 + , srcInfoPoints = [] + } + 15 + "0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_0F") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 36 13 36 118 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 36 13 36 14 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 36 14 36 118 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 36 14 36 118 + , srcInfoPoints = [] + } + 1 + "0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 37 13 37 118 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 37 13 37 14 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 37 14 37 118 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 37 14 37 118 + , srcInfoPoints = [] + } + 15 + "0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_0F")) + ])) + , Qualifier + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 40 5 46 12 + , srcInfoPoints = [] + } + (App + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 40 5 46 12 + , srcInfoPoints = [] + } + (Var + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 40 5 40 10 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 40 5 40 10 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 40 5 40 10 + , srcInfoPoints = [] + } + "print"))) + (List + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 40 11 46 12 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 40 11 40 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 40 18 40 19 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 40 26 40 27 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 40 33 40 34 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 41 11 41 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 41 18 41 19 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 41 26 41 27 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 41 33 41 34 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 42 11 42 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 43 11 43 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 44 11 44 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 45 11 45 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 46 11 46 12 + ] + } + [ Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 40 13 40 18 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 40 13 40 18 + , srcInfoPoints = [] + } + 0 + "0o0_0") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 40 20 40 26 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 40 20 40 21 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 40 21 40 26 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 40 21 40 26 + , srcInfoPoints = [] + } + 0 + "0o0_0")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 40 28 40 33 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 40 28 40 33 + , srcInfoPoints = [] + } + 8 + "0o1_0") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 40 35 40 41 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 40 35 40 36 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 40 36 40 41 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 40 36 40 41 + , srcInfoPoints = [] + } + 8 + "0o1_0")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 41 13 41 18 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 41 13 41 18 + , srcInfoPoints = [] + } + 63 + "0o7_7") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 41 20 41 26 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 41 20 41 21 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 41 21 41 26 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 41 21 41 26 + , srcInfoPoints = [] + } + 63 + "0o7_7")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 41 28 41 33 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 41 28 41 33 + , srcInfoPoints = [] + } + 56 + "0o7_0") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 41 35 41 41 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 41 35 41 36 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 41 36 41 41 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 41 36 41 41 + , srcInfoPoints = [] + } + 56 + "0o7_0")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 42 13 42 117 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 42 13 42 117 + , srcInfoPoints = [] + } + 1 + "0o000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01") + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 43 13 43 117 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 43 13 43 117 + , srcInfoPoints = [] + } + 7 + "0o000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_07") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 44 13 44 118 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 44 13 44 14 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 44 14 44 118 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 44 14 44 118 + , srcInfoPoints = [] + } + 1 + "0o000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 45 13 45 118 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 45 13 45 14 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 45 14 45 118 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 45 14 45 118 + , srcInfoPoints = [] + } + 7 + "0o000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_07")) + ])) + , Qualifier + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 5 52 12 + , srcInfoPoints = [] + } + (App + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 5 52 12 + , srcInfoPoints = [] + } + (Var + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 5 48 10 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 5 48 10 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 5 48 10 + , srcInfoPoints = [] + } + "print"))) + (List + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 11 52 12 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 11 48 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 16 48 17 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 21 48 22 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 27 48 28 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 33 48 34 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 40 48 41 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 47 48 48 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 54 48 55 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 11 49 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 17 49 18 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 23 49 24 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 30 49 31 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 37 49 38 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 45 49 46 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 53 49 54 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 61 49 62 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 50 11 50 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 51 11 51 12 + , SrcSpan "tests/examples/NumericUnderscoresGood.hs" 52 11 52 12 + ] + } + [ Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 13 48 16 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 48 13 48 16 + , srcInfoPoints = [] + } + 0 + "0x0") + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 18 48 21 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 48 18 48 21 + , srcInfoPoints = [] + } + 1 + "0x1") + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 23 48 27 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 48 23 48 27 + , srcInfoPoints = [] + } + 16 + "0x10") + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 29 48 33 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 48 29 48 33 + , srcInfoPoints = [] + } + 17 + "0x11") + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 35 48 40 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 48 35 48 40 + , srcInfoPoints = [] + } + 256 + "0x100") + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 42 48 47 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 48 42 48 47 + , srcInfoPoints = [] + } + 257 + "0x101") + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 49 48 54 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 48 49 48 54 + , srcInfoPoints = [] + } + 272 + "0x110") + , ExpTypeSig + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 56 48 72 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 48 62 48 64 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 48 56 48 61 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 48 56 48 61 + , srcInfoPoints = [] + } + 273 + "0x111")) + (TyCon + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 48 65 48 72 + , srcInfoPoints = [] + } + (UnQual + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 48 65 48 72 + , srcInfoPoints = [] + } + (Ident + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" + 48 + 65 + 48 + 72 + , srcInfoPoints = [] + } + "Integer"))) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 13 49 17 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 13 49 14 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 49 14 49 17 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 49 14 49 17 + , srcInfoPoints = [] + } + 0 + "0x0")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 19 49 23 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 19 49 20 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 49 20 49 23 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 49 20 49 23 + , srcInfoPoints = [] + } + 1 + "0x1")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 25 49 30 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 25 49 26 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 49 26 49 30 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 49 26 49 30 + , srcInfoPoints = [] + } + 16 + "0x10")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 32 49 37 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 32 49 33 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 49 33 49 37 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 49 33 49 37 + , srcInfoPoints = [] + } + 17 + "0x11")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 39 49 45 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 39 49 40 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 49 40 49 45 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 49 40 49 45 + , srcInfoPoints = [] + } + 256 + "0x100")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 47 49 53 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 47 49 48 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 49 48 49 53 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 49 48 49 53 + , srcInfoPoints = [] + } + 257 + "0x101")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 55 49 61 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 55 49 56 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 49 56 49 61 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 49 56 49 61 + , srcInfoPoints = [] + } + 272 + "0x110")) + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 63 49 69 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 49 63 49 64 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 49 64 49 69 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 49 64 49 69 + , srcInfoPoints = [] + } + 273 + "0x111")) + , Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 50 13 50 184 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 50 13 50 184 + , srcInfoPoints = [] + } + 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 + "0x111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_11111") + , NegApp + SrcSpanInfo + { srcInfoSpan = + SrcSpan "tests/examples/NumericUnderscoresGood.hs" 51 13 51 186 + , srcInfoPoints = + [ SrcSpan "tests/examples/NumericUnderscoresGood.hs" 51 13 51 14 + ] + } + (Lit + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 51 14 51 186 + , srcInfoPoints = [] + } + (Int + SrcSpanInfo + { srcInfoSpan = + SrcSpan + "tests/examples/NumericUnderscoresGood.hs" 51 14 51 186 + , srcInfoPoints = [] + } + 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 + "0x111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_11")) + ])) + ])) + Nothing + ] + , [] + ) diff --git a/tests/examples/NumericUnderscoresGood.hs.prettyparser.golden b/tests/examples/NumericUnderscoresGood.hs.prettyparser.golden new file mode 100644 index 00000000..2676b903 --- /dev/null +++ b/tests/examples/NumericUnderscoresGood.hs.prettyparser.golden @@ -0,0 +1,10 @@ +Roundtrip test failed + +AST 1: + +Module () Nothing [LanguagePragma () [Ident () "NumericUnderscores"],LanguagePragma () [Ident () "MagicHash"]] [ImportDecl {importAnn = (), importModule = ModuleName () "GHC.Types", importQualified = False, importSrc = False, importSafe = False, importPkg = Nothing, importAs = Nothing, importSpecs = Nothing}] [PatBind () (PVar () (Ident () "main")) (UnGuardedRhs () (Do () [Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0_00"),NegApp () (Lit () (Int () 0 "0_00")),Lit () (Int () 100 "1_00"),NegApp () (Lit () (Int () 1000 "1_000")),Lit () (Int () 1 "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01"),NegApp () (Lit () (Int () 1 "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01")),NegApp () (Lit () (Frac () (1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 % 1) "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01e12_00")),NegApp () (Lit () (Frac () (1 % 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01e-12_00")),NegApp () (Lit () (Frac () (1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 % 1) "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01e+12_00"))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [App () (Con () (UnQual () (Ident () "I#"))) (Lit () (PrimInt () 0 "0_00")),InfixApp () (Con () (UnQual () (Ident () "I#"))) (QVarOp () (UnQual () (Symbol () "-"))) (Lit () (PrimInt () 0 "0_00")),App () (Con () (UnQual () (Ident () "I#"))) (Lit () (PrimInt () 100 "1_00")),InfixApp () (Con () (UnQual () (Ident () "I#"))) (QVarOp () (UnQual () (Symbol () "-"))) (Lit () (PrimInt () 1000 "1_000")),App () (Con () (UnQual () (Ident () "I#"))) (Lit () (PrimInt () 1 "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01")),InfixApp () (Con () (UnQual () (Ident () "I#"))) (QVarOp () (UnQual () (Symbol () "-"))) (Lit () (PrimInt () 1 "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01"))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [App () (Con () (UnQual () (Ident () "W#"))) (Lit () (PrimWord () 0 "0_00")),App () (Con () (UnQual () (Ident () "W#"))) (Lit () (PrimWord () 100 "1_00")),App () (Con () (UnQual () (Ident () "W#"))) (Lit () (PrimWord () 1000000 "1_000_000")),App () (Con () (UnQual () (Ident () "W#"))) (Lit () (PrimWord () 1111111 "1_111_111")),App () (Con () (UnQual () (Ident () "W#"))) (Lit () (PrimWord () 1111 "1_1_1_1")),App () (Con () (UnQual () (Ident () "W#"))) (Lit () (PrimWord () 1 "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01"))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [InfixApp () (Con () (UnQual () (Ident () "I8#"))) (QVarOp () (UnQual () (Symbol () "-"))) (Lit () (PrimInt () 0 "0_00_00_00")),App () (Con () (UnQual () (Ident () "I8#"))) (Lit () (PrimInt () 1000000 "1_00_00_00"))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Frac () (0 % 1) "0_00.00_00"),NegApp () (Lit () (Frac () (0 % 1) "0_00.00_00")),Lit () (Frac () (100 % 1) "1_00.00_00"),NegApp () (Lit () (Frac () (1000 % 1) "1_000.00_00")),Lit () (Frac () (100000000000011 % 100000000000000) "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01.00_00000_000_0011"),NegApp () (Lit () (Frac () (100000000000011 % 100000000000000) "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01.00_00000_000_0011")),NegApp () (Lit () (Frac () (1000000000000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 % 1) "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01.00_00000_000_0011e12_00")),NegApp () (Lit () (Frac () (100000000000011 % 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01.00_00000_000_0011e-12_00")),NegApp () (Lit () (Frac () (1000000000000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 % 1) "000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01.00_00000_000_0011e+12_00"))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0x0_0"),NegApp () (Lit () (Int () 0 "0x0_0")),Lit () (Int () 16 "0x1_0"),NegApp () (Lit () (Int () 16 "0x1_0")),Lit () (Int () 255 "0xF_F"),NegApp () (Lit () (Int () 255 "0xF_F")),Lit () (Int () 240 "0xF_0"),NegApp () (Lit () (Int () 240 "0xF_0")),Lit () (Int () 1 "0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01"),Lit () (Int () 15 "0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_0F"),NegApp () (Lit () (Int () 1 "0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01")),NegApp () (Lit () (Int () 15 "0x000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_0F"))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0o0_0"),NegApp () (Lit () (Int () 0 "0o0_0")),Lit () (Int () 8 "0o1_0"),NegApp () (Lit () (Int () 8 "0o1_0")),Lit () (Int () 63 "0o7_7"),NegApp () (Lit () (Int () 63 "0o7_7")),Lit () (Int () 56 "0o7_0"),NegApp () (Lit () (Int () 56 "0o7_0")),Lit () (Int () 1 "0o000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01"),Lit () (Int () 7 "0o000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_07"),NegApp () (Lit () (Int () 1 "0o000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01")),NegApp () (Lit () (Int () 7 "0o000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_07"))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0x0"),Lit () (Int () 1 "0x1"),Lit () (Int () 16 "0x10"),Lit () (Int () 17 "0x11"),Lit () (Int () 256 "0x100"),Lit () (Int () 257 "0x101"),Lit () (Int () 272 "0x110"),ExpTypeSig () (Lit () (Int () 273 "0x111")) (TyCon () (UnQual () (Ident () "Integer"))),NegApp () (Lit () (Int () 0 "0x0")),NegApp () (Lit () (Int () 1 "0x1")),NegApp () (Lit () (Int () 16 "0x10")),NegApp () (Lit () (Int () 17 "0x11")),NegApp () (Lit () (Int () 256 "0x100")),NegApp () (Lit () (Int () 257 "0x101")),NegApp () (Lit () (Int () 272 "0x110")),NegApp () (Lit () (Int () 273 "0x111")),Lit () (Int () 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 "0x111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_11111"),NegApp () (Lit () (Int () 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 "0x111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_111_11"))]))])) Nothing] + +AST 2: + +Module () Nothing [LanguagePragma () [Ident () "NumericUnderscores"],LanguagePragma () [Ident () "MagicHash"]] [ImportDecl {importAnn = (), importModule = ModuleName () "GHC.Types", importQualified = False, importSrc = False, importSafe = False, importPkg = Nothing, importAs = Nothing, importSpecs = Nothing}] [PatBind () (PVar () (Ident () "main")) (UnGuardedRhs () (Do () [Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0"),NegApp () (Lit () (Int () 0 "0")),Lit () (Int () 100 "100"),NegApp () (Lit () (Int () 1000 "1000")),Lit () (Int () 1 "1"),NegApp () (Lit () (Int () 1 "1")),NegApp () (Con () (UnQual () (Ident () "Infinity"))),NegApp () (Lit () (Frac () (0 % 1) "0.0")),NegApp () (Con () (UnQual () (Ident () "Infinity")))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [App () (Con () (UnQual () (Ident () "I#"))) (Lit () (PrimInt () 0 "0")),InfixApp () (Con () (UnQual () (Ident () "I#"))) (QVarOp () (UnQual () (Symbol () "-"))) (Lit () (PrimInt () 0 "0")),App () (Con () (UnQual () (Ident () "I#"))) (Lit () (PrimInt () 100 "100")),InfixApp () (Con () (UnQual () (Ident () "I#"))) (QVarOp () (UnQual () (Symbol () "-"))) (Lit () (PrimInt () 1000 "1000")),App () (Con () (UnQual () (Ident () "I#"))) (Lit () (PrimInt () 1 "1")),InfixApp () (Con () (UnQual () (Ident () "I#"))) (QVarOp () (UnQual () (Symbol () "-"))) (Lit () (PrimInt () 1 "1"))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [App () (Con () (UnQual () (Ident () "W#"))) (Lit () (PrimWord () 0 "0")),App () (Con () (UnQual () (Ident () "W#"))) (Lit () (PrimWord () 100 "100")),App () (Con () (UnQual () (Ident () "W#"))) (Lit () (PrimWord () 1000000 "1000000")),App () (Con () (UnQual () (Ident () "W#"))) (Lit () (PrimWord () 1111111 "1111111")),App () (Con () (UnQual () (Ident () "W#"))) (Lit () (PrimWord () 1111 "1111")),App () (Con () (UnQual () (Ident () "W#"))) (Lit () (PrimWord () 1 "1"))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [InfixApp () (Con () (UnQual () (Ident () "I8#"))) (QVarOp () (UnQual () (Symbol () "-"))) (Lit () (PrimInt () 0 "0")),App () (Con () (UnQual () (Ident () "I8#"))) (Lit () (PrimInt () 1000000 "1000000"))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Frac () (0 % 1) "0.0"),NegApp () (Lit () (Frac () (0 % 1) "0.0")),Lit () (Frac () (100 % 1) "100.0"),NegApp () (Lit () (Frac () (1000 % 1) "1000.0")),Lit () (Frac () (100000000000011 % 100000000000000) "1.00000000000011"),NegApp () (Lit () (Frac () (100000000000011 % 100000000000000) "1.00000000000011")),NegApp () (Con () (UnQual () (Ident () "Infinity"))),NegApp () (Lit () (Frac () (0 % 1) "0.0")),NegApp () (Con () (UnQual () (Ident () "Infinity")))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0"),NegApp () (Lit () (Int () 0 "0")),Lit () (Int () 16 "16"),NegApp () (Lit () (Int () 16 "16")),Lit () (Int () 255 "255"),NegApp () (Lit () (Int () 255 "255")),Lit () (Int () 240 "240"),NegApp () (Lit () (Int () 240 "240")),Lit () (Int () 1 "1"),Lit () (Int () 15 "15"),NegApp () (Lit () (Int () 1 "1")),NegApp () (Lit () (Int () 15 "15"))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0"),NegApp () (Lit () (Int () 0 "0")),Lit () (Int () 8 "8"),NegApp () (Lit () (Int () 8 "8")),Lit () (Int () 63 "63"),NegApp () (Lit () (Int () 63 "63")),Lit () (Int () 56 "56"),NegApp () (Lit () (Int () 56 "56")),Lit () (Int () 1 "1"),Lit () (Int () 7 "7"),NegApp () (Lit () (Int () 1 "1")),NegApp () (Lit () (Int () 7 "7"))])),Qualifier () (App () (Var () (UnQual () (Ident () "print"))) (List () [Lit () (Int () 0 "0"),Lit () (Int () 1 "1"),Lit () (Int () 16 "16"),Lit () (Int () 17 "17"),Lit () (Int () 256 "256"),Lit () (Int () 257 "257"),Lit () (Int () 272 "272"),ExpTypeSig () (Lit () (Int () 273 "273")) (TyCon () (UnQual () (Ident () "Integer"))),NegApp () (Lit () (Int () 0 "0")),NegApp () (Lit () (Int () 1 "1")),NegApp () (Lit () (Int () 16 "16")),NegApp () (Lit () (Int () 17 "17")),NegApp () (Lit () (Int () 256 "256")),NegApp () (Lit () (Int () 257 "257")),NegApp () (Lit () (Int () 272 "272")),NegApp () (Lit () (Int () 273 "273")),Lit () (Int () 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 "893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273"),NegApp () (Lit () (Int () 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273 "893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273"))]))])) Nothing] + diff --git a/tests/examples/NumericUnderscoresGood.hs.prettyprinter.golden b/tests/examples/NumericUnderscoresGood.hs.prettyprinter.golden new file mode 100644 index 00000000..fb2fd26a --- /dev/null +++ b/tests/examples/NumericUnderscoresGood.hs.prettyprinter.golden @@ -0,0 +1,19 @@ +{-# LANGUAGE NumericUnderscores #-} +{-# LANGUAGE MagicHash #-} +import GHC.Types +main + = do print [0, -0, 100, -1000, 1, -1, -Infinity, -0.0, -Infinity] + print [I# 0#, I# - 0#, I# 100#, I# - 1000#, I# 1#, I# - 1#] + print + [W# 0##, W# 100##, W# 1000000##, W# 1111111##, W# 1111##, W# 1##] + print [I8# - 0#, I8# 1000000#] + print + [0.0, -0.0, 100.0, -1000.0, 1.00000000000011, -1.00000000000011, + -Infinity, -0.0, -Infinity] + print [0, -0, 16, -16, 255, -255, 240, -240, 1, 15, -1, -15] + print [0, -0, 8, -8, 63, -63, 56, -56, 1, 7, -1, -7] + print + [0, 1, 16, 17, 256, 257, 272, 273 :: Integer, -0, -1, -16, -17, + -256, -257, -272, -273, + 893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273, + -893853861996173139971601666547056408498624388039492891848237429581450935338236465120124953211126895179335457212432403390250258854129771329762243267072273]