[project @ 1998-11-08 17:10:35 by sof]
[ghc-hetmet.git] / ghc / compiler / reader / PrefixToHs.lhs
index b91f75b..1d5b008 100644 (file)
@@ -14,7 +14,9 @@ module PrefixToHs (
        cvBinds,
        cvMonoBindsAndSigs,
        cvMatches,
-       cvOtherDecls
+       cvOtherDecls,
+       cvForeignDecls -- HACK
+
     ) where
 
 #include "HsVersions.h"
@@ -197,4 +199,12 @@ cvOtherDecls b
     go acc (RdrDefaultDecl d)     = DefD d  : acc
     go acc other                 = acc
        -- Ignore value bindings
+
+cvForeignDecls :: RdrBinding -> [RdrNameHsDecl]
+cvForeignDecls b = go [] b
+ where
+    go acc (RdrAndBindings b1 b2) = go (go acc b1) b2
+    go acc (RdrForeignDecl d)     = ForD d  : acc
+    go acc other                 = acc
 \end{code}