hughperman / pure-lang

Automatically exported from code.google.com/p/pure-lang
0 stars 0 forks source link

pure-gen patches for ghc-7.0.x / language-c-0.4.x #58

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Compile pure-gen with the specified ghc and language-c versions

What is the expected output? What do you see instead?
pure-gen should compile fine, but it fails with the following:

(fixed by attached -sysenv.patch:
 System module is now System.Environment)

dump-ast.hs:16:8:
    Could not find module `System':
      Use -v to see a list of the files searched for.

(fixed by attached -ghc_typesynonyminstances.patch:
Multiple occurences of

dump-ast.hs:LINE:10:
    Illegal instance declaration for `Dump FOO'
      (All instance types must be of the form (T t1 ... tn)
       where T is not a synonym.
       Use -XTypeSynonymInstances if you want to disable this.)
    In the instance declaration for `Dump FOO'

(fixed by attached -lang_c_04.patch)
dump-ast.hs:151:9:
    Constructor `CAsmExt' should have 2 arguments, but has been given 1
    In the pattern: CAsmExt cStrLit
    In an equation for `dump':
        dump (CAsmExt cStrLit) = parens $ "CAsmExt " ++ dump cStrLit
    In the instance declaration for `Dump CExtDecl'

dump-ast.hs:153:42:
    Couldn't match expected type `[Char]'
                with actual type `Maybe FilePath'
    In the return type of a call of `fileOfNode'
    In the first argument of `(++)', namely `fileOfNode nodeInfo'
    In the second argument of `(++)', namely
      `fileOfNode nodeInfo ++ "\""'
make: *** [dump-ast] Error 1

What version of the product are you using? On what operating system?
pure-gen-0.12 (and latest Hg)
pure-0.47
llvm-2.8
ghc-7.0.2
ghc-language-c-0.4.2

on Fedora 15 x86_64

Please provide any additional information below.
note: I'm not 100% sure how to handle the case when fileOfNode nodeInfo returns 
Nothing, so right now it's returning an empty string. Feel free to change as 
appropriate

Original issue reported on code.google.com by Michael....@gmail.com on 8 Sep 2011 at 6:05

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks a lot for the patches, I applied those in rev. 9cd53d6cd006. make check 
is ok and regenerating pure-gl and pure-gtk doesn't show any discrepancies 
either, so I guess that we should be fine.

(Still that -XTypeSynonymInstances options is a kludge, we should really try to 
figure out which changes are needed in dump-ast.hs to do without it. But for 
the moment it does the trick.)

Can you please give it a go again? If everything is fine for you as well, I'll 
release a new tarball.

Original comment by aggraef@gmail.com on 9 Sep 2011 at 10:35

GoogleCodeExporter commented 8 years ago
Confirmed that the latest Hg commit compiles out of the box. Thanks!

Original comment by Michael....@gmail.com on 9 Sep 2011 at 9:25

GoogleCodeExporter commented 8 years ago
Ok, thanks for testing. I uploaded a new tarball.

Original comment by aggraef@gmail.com on 10 Sep 2011 at 3:00