diff --git a/ghc-check.cabal b/ghc-check.cabal
--- a/ghc-check.cabal
+++ b/ghc-check.cabal
@@ -1,9 +1,9 @@
 cabal-version:       1.20
 build-type:          Simple
 name:                ghc-check
-version:             0.1.0.2
-synopsis:            detect mismatches between compile-time and run-time versions of the ghc api
-description:         detect mismatches between compile-time and run-time versions of the ghc api
+version:             0.1.0.3
+synopsis:            Detect mismatches between compile-time and run-time versions of the ghc api
+description:         Detect mismatches between compile-time and run-time versions of the ghc api
 bug-reports:         https://github.com/pepeiborra/ghc-check/issues
 license:             BSD3
 license-file:        LICENSE
diff --git a/src/GHC/Check.hs b/src/GHC/Check.hs
--- a/src/GHC/Check.hs
+++ b/src/GHC/Check.hs
@@ -1,23 +1,37 @@
 {-# LANGUAGE TemplateHaskell #-}
-module GHC.Check (checkGhcVersion, compileTimeVersion, runTimeVersion) where
+module GHC.Check
+( VersionCheck(..)
+, checkGhcVersion
+, compileTimeVersion
+, compileTimeVersionFromLibdir
+, runTimeVersion
+) where
 
 import           Data.Version               (Version)
 import           GHC
 import           GHC.Check.Internal
-import           GHC.Exts                   (IsList (fromList), toList)
-import           Language.Haskell.TH
-import           Language.Haskell.TH.Syntax (lift)
 
--- | Returns the compile-time version of the 'ghc' package
+-- | Returns the compile-time version of the 'ghc' package.
+--   Uses 'guessLibdir' to find the GHC lib dir
 compileTimeVersion :: Version
-compileTimeVersion = fromList $(lift =<< toList <$> runIO getGHCVersionIO)
+compileTimeVersion = $$(compileTimeVersionFromLibdir guessLibdir)
 
 -- | Returns the run-time version of the 'ghc' package by looking up in the package database
 runTimeVersion :: Ghc (Maybe Version)
-runTimeVersion = getGHCVersion
+runTimeVersion = getGhcVersion
 
+data VersionCheck
+    = Match
+    | Mismatch { compileTime :: Version
+               , runTime     :: Maybe Version
+               }
+    deriving (Eq, Show)
+
 -- | Returns 'True' if the run-time version of the 'ghc' package matches the compile-time version
-checkGhcVersion :: Ghc Bool
+--   For using your own GHC libdir at compile time, inline this logic in your program
+checkGhcVersion :: Ghc VersionCheck
 checkGhcVersion = do
-    v <- getPackageVersion "ghc"
-    return (Just compileTimeVersion == v)
+    v <- getGhcVersion
+    return $ if v == Just compileTimeVersion
+        then GHC.Check.Match
+        else Mismatch compileTimeVersion v
diff --git a/src/GHC/Check/Internal.hs b/src/GHC/Check/Internal.hs
--- a/src/GHC/Check/Internal.hs
+++ b/src/GHC/Check/Internal.hs
@@ -1,42 +1,52 @@
 {-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE TemplateHaskell #-}
 module GHC.Check.Internal where
 
-import Control.Applicative
-import GHC
-import GHC.Paths
-import Data.Version (makeVersion, Version)
-import Data.Maybe (fromMaybe)
-import System.Environment (lookupEnv)
-import Packages (initPackages, lookupInstalledPackage, lookupPackageName, lookupPackage)
-import PackageConfig (PackageName(PackageName))
-import Maybes (runMaybeT, MaybeT(MaybeT))
-import Module (componentIdToInstalledUnitId)
-import Control.Monad.Trans.Class (MonadTrans(lift))
-import Packages (InstalledPackageInfo(packageVersion))
-import Control.Monad (join)
-import Data.String (IsString(fromString))
+import           Control.Monad.Trans.Class as Monad (MonadTrans (lift))
+import           Data.Maybe                (fromMaybe)
+import           Data.String               (IsString (fromString))
+import           Data.Version              (Version)
+import           GHC
+import           GHC.Exts                   (IsList (fromList), toList)
+import qualified GHC.Paths
+import           Language.Haskell.TH
+import           Language.Haskell.TH.Syntax as TH (TExp(TExp), lift)
+import           Maybes                    (MaybeT (MaybeT), runMaybeT)
+import           Module                    (componentIdToInstalledUnitId)
+import           PackageConfig             (PackageName (PackageName))
+import           Packages                  (lookupInstalledPackage, lookupPackageName)
+import           Packages                  (InstalledPackageInfo (packageVersion))
+import           System.Environment        (lookupEnv)
 
--- Set the GHC libdir to the nix libdir if it's present.
-getLibdir :: IO FilePath
-getLibdir = fromMaybe GHC.Paths.libdir <$> lookupEnv "NIX_GHC_LIBDIR"
+-- | Look up the GHC lib dir in the NIX environment, then in the 'GHC.Paths'
+guessLibdir :: IO FilePath
+guessLibdir = fromMaybe GHC.Paths.libdir <$> lookupEnv "NIX_GHC_LIBDIR"
 
 getPackageVersion :: String -> Ghc (Maybe Version)
 getPackageVersion packageName = runMaybeT $ do
-    dflags <- lift getSessionDynFlags
+    dflags <- Monad.lift getSessionDynFlags
     component <- MaybeT $ return $ lookupPackageName dflags $ PackageName $ fromString packageName
     p <- MaybeT $ return $ lookupInstalledPackage dflags (componentIdToInstalledUnitId component)
     return $ packageVersion p
 
-getGHCVersion :: Ghc (Maybe Version)
-getGHCVersion = getPackageVersion "ghc"
+getGhcVersion :: Ghc (Maybe Version)
+getGhcVersion = getPackageVersion "ghc"
 
-getGHCVersionIO :: IO Version
-getGHCVersionIO = do
-    libdir <- getLibdir
-    runGhc (Just libdir) $ do
-        dflags <- getSessionDynFlags
-        _ <- setSessionDynFlags dflags
-        ghcV <- getGHCVersion
-        case ghcV of
-            Just v -> return v
-            Nothing -> error "Cannot get version of ghc package"
+getGhcVersionIO :: FilePath -> IO Version
+getGhcVersionIO libdir = runGhc (Just libdir) $ do
+    dflags <- getSessionDynFlags
+    _ <- setSessionDynFlags dflags
+    ghcV <- getGhcVersion
+    case ghcV of
+        Just v  -> return v
+        Nothing -> error "Cannot get version of ghc package"
+
+-- | Returns the compile-time version of the 'ghc' package given the GHC libdir
+compileTimeVersionFromLibdir :: IO FilePath -> TExpQ Version
+compileTimeVersionFromLibdir getLibdir = do
+    ver <- runIO $ do
+        libdir <- getLibdir
+        v <- getGhcVersionIO libdir
+        return (toList v)
+    verLifted <- TH.lift (toList ver)
+    [|| fromList $$(pure $ TExp verLifted) ||]
