hughperman / pure-lang

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

pure-gen 0.13 build error: Constructor `CAsmExt' should have 1 argument, but has been given 2 #59

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. build pure-gen

What is the expected output? What do you see instead?
Expected successful compile, got:

ghc -XTypeSynonymInstances --make dump-ast.hs -o dump-ast
[1 of 1] Compiling Main             ( dump-ast.hs, dump-ast.o )

dump-ast.hs:150:8:
    Constructor `CAsmExt' should have 1 argument, but has been given 2
    In the pattern: CAsmExt cStrLit _
    In the definition of `dump':
        dump (CAsmExt cStrLit _) = parens $ "CAsmExt " ++ dump cStrLit
    In the instance declaration for `Dump CExtDecl'

dump-ast.hs:155:4:
    Couldn't match expected type `FilePath'
           against inferred type `Maybe a'
    In the pattern: Nothing
    In a case alternative: Nothing -> ""
    In the expression:
        case fileOfNode nodeInfo of {
          Nothing -> ""
          Just filePath -> "\"" ++ filePath ++ "\"" }
make: *** [dump-ast] Error 1

What version of the product are you using? On what operating system?
pure 0.47, pure-gen 0.13, ghc 6.10.4, hs-language-c 0.3.2.1, gmp 5.0.2, 
MacPorts 2.0.3, Mac OS X 10.6.8, Xcode 3.2.6

Please provide any additional information below.
pure-gen 0.12 builds fine

Original issue reported on code.google.com by ryandesi...@gmail.com on 15 Sep 2011 at 2:32

GoogleCodeExporter commented 8 years ago
Hi Ryan,

this is because we've recently updated dump-ast.hs so that it works with the 
latest Language.C version (0.4.2). So I'm afraid that you'll have to update the 
hs-language-c port in MacPorts if that is possible, or use the reversal of 
http://code.google.com/p/pure-lang/source/detail?r=9cd53d6cd006 as a patch on 
dump-ast.hs to make it work with the old Language.C version.

Albert

Original comment by aggraef@gmail.com on 15 Sep 2011 at 9:29

GoogleCodeExporter commented 8 years ago
Thanks, updating hs-language-c to 0.4.2 worked. I've updated MacPorts.

Original comment by ryandesi...@gmail.com on 15 Sep 2011 at 11:34