diff options
author | andy <unknown> | 2000-05-24 07:31:44 +0000 |
---|---|---|
committer | andy <unknown> | 2000-05-24 07:31:44 +0000 |
commit | 3b24089dc380e2ff268182b42ebc51164db9ab90 (patch) | |
tree | 8d05b4255973bd9de78f232bb1e89d6785af910b /ghc/compiler/javaGen/Java.lhs | |
parent | 60a202ee6cb40a0c1e86ed32738ea6d021cae316 (diff) | |
download | haskell-3b24089dc380e2ff268182b42ebc51164db9ab90.tar.gz |
[project @ 2000-05-24 07:31:44 by andy]
Adding a field to the Method constructor, to allow methods
to say what they might raise. This is needed to actually
compile generated code.
Also, the generated code now imports haskell.runtime.*
Diffstat (limited to 'ghc/compiler/javaGen/Java.lhs')
-rw-r--r-- | ghc/compiler/javaGen/Java.lhs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ghc/compiler/javaGen/Java.lhs b/ghc/compiler/javaGen/Java.lhs index 3151014041..a07c9f8e8a 100644 --- a/ghc/compiler/javaGen/Java.lhs +++ b/ghc/compiler/javaGen/Java.lhs @@ -25,9 +25,7 @@ data Decl = Import [Name] | Field [Modifier] Type Name (Maybe Expr) | Constructor [Modifier] Name [Parameter] [Statement] - -- Add Throws (list of Names) - -- to Method - | Method [Modifier] Type Name [Parameter] [Statement] + | Method [Modifier] Type Name [Parameter] [Name] [Statement] | Comment [String] | Interface [Modifier] Name [Name] [Decl] | Class [Modifier] Name [Name] [Name] [Decl] @@ -98,7 +96,7 @@ addModifier = \m -> \d -> { Import n -> Import n ; Field ms t n e -> Field (m:ms) t n e ; Constructor ms n as ss -> Constructor (m:ms) n as ss - ; Method ms t n as ss -> Method (m:ms) t n as ss + ; Method ms t n as ts ss -> Method (m:ms) t n as ts ss ; Comment ss -> Comment ss ; Interface ms n xs ds -> Interface (m:ms) n xs ds ; Class ms n xs is ds -> Class (m:ms) n xs is ds |