From: simonmar Date: Wed, 25 Sep 2002 12:47:42 +0000 (+0000) Subject: [project @ 2002-09-25 12:47:42 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~1637 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=46732ee640c33bb2af8085d4785f511e9d89a95b;p=ghc-hetmet.git [project @ 2002-09-25 12:47:42 by simonmar] The variable in a foreign declaration should be 'var' not 'varid', which means that the following should be legal: foreign export "plusInt" (+) :: Int -> Int -> Int (this example is even in the FFI spec!) --- diff --git a/ghc/compiler/parser/Parser.y b/ghc/compiler/parser/Parser.y index 6daeba9..da58690 100644 --- a/ghc/compiler/parser/Parser.y +++ b/ghc/compiler/parser/Parser.y @@ -1,6 +1,6 @@ {- -*-haskell-*- ----------------------------------------------------------------------------- -$Id: Parser.y,v 1.103 2002/09/19 12:31:09 simonmar Exp $ +$Id: Parser.y,v 1.104 2002/09/25 12:47:42 simonmar Exp $ Haskell grammar. @@ -746,8 +746,8 @@ safety1 :: { Safety } -- only needed to avoid conflicts with the DEPRECATED rules fspec :: { (FastString, RdrName, RdrNameHsType) } - : STRING varid '::' sigtype { ($1 , $2, $4) } - | varid '::' sigtype { (nilFS, $1, $3) } + : STRING var '::' sigtype { ($1 , $2, $4) } + | var '::' sigtype { (nilFS, $1, $3) } -- if the entity string is missing, it defaults to the empty string; -- the meaning of an empty entity string depends on the calling -- convention