[Git][ghc/ghc][wip/T18101] 4 commits: Add test for #16167

Ben Gamari gitlab at gitlab.haskell.org
Sun May 10 01:20:13 UTC 2020



Ben Gamari pushed to branch wip/T18101 at Glasgow Haskell Compiler / GHC


Commits:
9d97f4b5 by nineonine at 2020-05-08T15:30:03-04:00
Add test for #16167

- - - - -
aa318338 by Ryan Scott at 2020-05-08T15:30:04-04:00
Bump exceptions submodule so that dist-boot is .gitignore'd

`exceptions` is a stage-0 boot library as of commit
30272412fa437ab8e7a8035db94a278e10513413, which means that building
`exceptions` in a GHC tree will generate a `dist-boot` directory.
However, this directory was not specified in `exceptions`'
`.gitignore` file, which causes it to dirty up the current `git`
working directory.

Accordingly, this bumps the `exceptions` submodule to commit
ghc/packages/exceptions at 23c0b8a50d7592af37ca09beeec16b93080df98f,
which adds `dist-boot` to the `.gitignore` file.

- - - - -
ea86360f by Ömer Sinan Ağacan at 2020-05-08T15:30:30-04:00
Linker.c: initialize n_symbols of ObjectCode with other fields

- - - - -
48a80c91 by Ben Gamari at 2020-05-10T01:19:54+00:00
testsuite: Add test for #18101

- - - - -


9 changed files:

- libraries/exceptions
- rts/Linker.c
- + testsuite/tests/driver/T16167.hs
- + testsuite/tests/driver/T16167.stdout
- testsuite/tests/driver/all.T
- + testsuite/tests/generics/T18101/T18101.hs
- + testsuite/tests/generics/T18101/T18101.script
- + testsuite/tests/generics/T18101/T18101.stdout
- + testsuite/tests/generics/T18101/all.T


Changes:

=====================================
libraries/exceptions
=====================================
@@ -1 +1 @@
-Subproject commit fe4166f8d23d8288ef2cbbf9e36118b6b99e0d7d
+Subproject commit 23c0b8a50d7592af37ca09beeec16b93080df98f


=====================================
rts/Linker.c
=====================================
@@ -1326,6 +1326,7 @@ mkOc( pathchar *path, char *image, int imageSize,
    setOcInitialStatus( oc );
 
    oc->fileSize          = imageSize;
+   oc->n_symbols         = 0;
    oc->symbols           = NULL;
    oc->n_sections        = 0;
    oc->sections          = NULL;


=====================================
testsuite/tests/driver/T16167.hs
=====================================
@@ -0,0 +1 @@
+module f


=====================================
testsuite/tests/driver/T16167.stdout
=====================================
@@ -0,0 +1 @@
+{"span": {"file": "T16167.hs","startLine": 1,"startCol": 8,"endLine": 1,"endCol": 9},"doc": "parse error on input \u2018f\u2019","severity": "SevError","reason": null}


=====================================
testsuite/tests/driver/all.T
=====================================
@@ -261,6 +261,8 @@ test('T12955', normal, makefile_test, [])
 test('T12971', [when(opsys('mingw32'), expect_broken(17945)), ignore_stdout], makefile_test, [])
 test('json', normal, compile_fail, ['-ddump-json'])
 test('json2', normalise_version('base','ghc-prim'), compile, ['-ddump-types -ddump-json'])
+test('T16167', exit_code(1), run_command, 
+     ['{compiler} -x hs -e ":set prog T16167.hs" -ddump-json T16167.hs'])
 test('T13604', [], makefile_test, [])
 test('T13604a', [], makefile_test, [])
 # omitting hpc and profasm because they affect the


=====================================
testsuite/tests/generics/T18101/T18101.hs
=====================================
@@ -0,0 +1,5 @@
+module T18101 where
+
+infixr 5 :*
+
+data List a = a :* List a


=====================================
testsuite/tests/generics/T18101/T18101.script
=====================================
@@ -0,0 +1,5 @@
+:load T18101
+:set -XStandaloneDeriving -XDeriveGeneric -XFlexibleInstances
+import GHC.Generics
+deriving instance Generic (List Int)
+:kind! (Rep (List Int))


=====================================
testsuite/tests/generics/T18101/T18101.stdout
=====================================
@@ -0,0 +1,13 @@
+(Rep (List Int)) :: * -> *
+= D1
+    ('MetaData "List" "T18101" "main" 'False)
+    (C1
+       ('MetaCons ":*" ('InfixI 'RightAssociative 5) 'False)
+       (S1
+          ('MetaSel
+             'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy)
+          (Rec0 Int)
+        :*: S1
+              ('MetaSel
+                 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy)
+              (Rec0 (List Int))))


=====================================
testsuite/tests/generics/T18101/all.T
=====================================
@@ -0,0 +1,4 @@
+# This test verifies that fixity is correctly reflected in Generic instances
+# derived for types living outside the current module.
+
+test('T18101', expect_broken(18101), ghci_script, ['T18101.script'])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/35e3b0ba3f197c1716021267952598bf3aa39934...48a80c91b067a205e285204a24baf5cf0f753a32

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/35e3b0ba3f197c1716021267952598bf3aa39934...48a80c91b067a205e285204a24baf5cf0f753a32
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200509/a35d6046/attachment-0001.html>


More information about the ghc-commits mailing list