diff --git a/Dedukti/Runtime.hs b/Dedukti/Runtime.hs
--- a/Dedukti/Runtime.hs
+++ b/Dedukti/Runtime.hs
@@ -31,6 +31,8 @@
 import Prelude hiding (pi, catch)
 import Data.Time.Clock
 import Text.PrettyPrint.Leijen
+import System.Exit
+import System.Posix.Process (exitImmediately)
 
 
 -- Exceptions
@@ -137,6 +139,8 @@
   t' <- getCurrentTime
   let total = diffUTCTime t' t
   putStrLn $ "Stop. Runtime: " ++ show total
+  -- Use Posix exitImmediately rather than System.Exit to really exit GHCi.
+  exitImmediately ExitSuccess
 
 -- Pretty printing.
 
diff --git a/dedukti.cabal b/dedukti.cabal
--- a/dedukti.cabal
+++ b/dedukti.cabal
@@ -1,5 +1,5 @@
 name:           dedukti
-version:        1.1.1
+version:        1.1.2
 author:         Mathieu Boespflug
 maintainer:     Mathieu Boespflug <mboes@lix.polytechnique.fr>
 copyright:      © 2009 CNRS - École Polytechnique - INRIA
@@ -46,7 +46,7 @@
 
 library
   exposed-modules:     Dedukti.Runtime
-  build-depends:       time >= 1.1
+  build-depends:       time >= 1.1, unix >= 2.4
   extensions:          DeriveDataTypeable, PatternGuards, FlexibleInstances
   ghc-options:         -fwarn-unused-binds -fwarn-unused-imports
 
diff --git a/doc/manual.texi.in b/doc/manual.texi.in
--- a/doc/manual.texi.in
+++ b/doc/manual.texi.in
@@ -227,6 +227,8 @@
 
 @node Smoke tests
 @section Smoke tests
+@cindex test harness
+@cindex smoke tests
 
 The package description file for Dedukti declares a @code{test} flag.
 Enabling this flag instructs Cabal to build the test harness as well.
diff --git a/scripts/dkrun b/scripts/dkrun
--- a/scripts/dkrun
+++ b/scripts/dkrun
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-if [ -z $* ]
+if [ -z "$*" ]
 then
     echo "Usage: dkrun module.dko [DEPENDENCY]..." 1>&2
     echo "    Where all dependent modules must be listed explicitly," 1>&2
@@ -11,4 +11,5 @@
 main=$1
 shift 1
 
-echo "do t <- Dedukti.Runtime.start; main; Dedukti.Runtime.stop t" | ghci -x hs -XOverloadedStrings -fglasgow-exts -w $* $main
+echo "do t <- Dedukti.Runtime.start; main; Dedukti.Runtime.stop t
+      System.Posix.Process.exitImmediately (System.Exit.ExitFailure 1)" | ghci -x hs -XOverloadedStrings -fglasgow-exts -w $* $main
