diff --git a/FindBin.cabal b/FindBin.cabal
--- a/FindBin.cabal
+++ b/FindBin.cabal
@@ -1,5 +1,5 @@
 name:               FindBin
-version:            0.0.3
+version:            0.0.4
 copyright:          2008-2011 Audrey Tang
 homepage:           https://github.com/audreyt/findbin
 license:            BSD3
@@ -19,5 +19,5 @@
 extra-source-files: README
 hs-source-dirs:     src
 category:           System
-tested-with:        GHC==6.8.2, GHC==6.8.3, GHC==6.10.1, GHC==7.0.1
+tested-with:        GHC==6.8.2, GHC==6.8.3, GHC==6.10.1, GHC==7.0.1, GHC==7.0.2
 ghc-options:        -Wall
diff --git a/src/System/Environment/FindBin.hs b/src/System/Environment/FindBin.hs
--- a/src/System/Environment/FindBin.hs
+++ b/src/System/Environment/FindBin.hs
@@ -25,10 +25,12 @@
     argv <- peek p_argv
     findBin =<< peekCString =<< peekElemOff argv 0
     where
+    directoryOf "" = directoryOf "."
     directoryOf x = do
         x' <- canonicalizePath x
         let path = takeDirectory x'
         return (length path `seq` path)
+    findBin "<interactive>" = findBin ""
     findBin s = case takeDirectory s of
         ""  -> do
             -- This should work for ghci as well, as long as nobody name
@@ -42,7 +44,7 @@
                     argc'   <- peek p_argc'
                     argv'   <- peek p_argv'
                     prog    <- peekCString =<< peekElemOff argv' 0
-                    s'      <- case (takeBaseName prog) of
+                    s'      <- case takeBaseName prog of
                         "runghc" -> peekCString =<< peekElemOff argv' (fromEnum argc'-1)
                         "runhaskell" -> peekCString =<< peekElemOff argv' (fromEnum argc'-1)
                         _ -> return prog
