[project @ 2002-09-25 12:47:42 by simonmar]
authorsimonmar <unknown>
Wed, 25 Sep 2002 12:47:42 +0000 (12:47 +0000)
committersimonmar <unknown>
Wed, 25 Sep 2002 12:47:42 +0000 (12:47 +0000)
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!)

ghc/compiler/parser/Parser.y

index 6daeba9..da58690 100644 (file)
@@ -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