Reject polytypes in instance declarations (for now anyway)
[ghc-hetmet.git] / ghc / compiler / ghci / ObjLink.lhs
index 6994a21..057938a 100644 (file)
@@ -25,8 +25,8 @@ import Monad            ( when )
 import Foreign.C
 import Foreign         ( Ptr, nullPtr )
 import Panic           ( panic )
-import DriverUtil       ( prefixUnderscore )
 import BasicTypes      ( SuccessFlag, successIf )
+import Config          ( cLeadingUnderscore )
 import Outputable
 
 -- ---------------------------------------------------------------------------
@@ -42,6 +42,11 @@ lookupSymbol str_in = do
        then return Nothing
        else return (Just addr)
 
+prefixUnderscore :: String -> String
+prefixUnderscore
+ | cLeadingUnderscore == "YES" = ('_':)
+ | otherwise                   = id
+
 loadDLL :: String -> IO (Maybe String)
 -- Nothing      => success
 -- Just err_msg => failure