diff --git a/app/Main.hs b/app/Main.hs
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -52,7 +52,8 @@
 replDef :: ReplDef ReplM
 replDef =
   ReplDef
-    { rdOnInterrupt = ReplContinue
+    { rdOnInterrupt = pure ReplContinue
+    , rdOnEof = pure ReplQuit
     , rdGreeting = "Hello, REPL!"
     , rdPrompt = "> "
     , rdOptionCommands = options
diff --git a/climb.cabal b/climb.cabal
--- a/climb.cabal
+++ b/climb.cabal
@@ -7,7 +7,7 @@
 -- hash: b29667bdc4492f0f51fe1df41c406056b9bbde355adb6a41eb975a30c7e7af10
 
 name:           climb
-version:        0.6.0
+version:        0.7.0
 synopsis:       Building blocks for a GHCi-like REPL with colon-commands
 description:    Please see the README on GitHub at <https://github.com/ejconlon/climb#readme>
 category:       User Interfaces
@@ -42,7 +42,7 @@
     , bytestring >=0.10 && <1
     , containers >=0.6 && <1
     , exceptions >=0.10 && <1
-    , linenoise >=0.5.0 && <1
+    , linenoise >=0.6.0 && <1
     , mtl >=2.2 && <3
     , text >=1.2 && <3
     , unliftio-core >=0.1 && <1
@@ -64,7 +64,7 @@
     , climb
     , containers >=0.6 && <1
     , exceptions >=0.10 && <1
-    , linenoise >=0.5.0 && <1
+    , linenoise >=0.6.0 && <1
     , mtl >=2.2 && <3
     , text >=1.2 && <3
     , unliftio-core >=0.1 && <1
diff --git a/src/Climb.hs b/src/Climb.hs
--- a/src/Climb.hs
+++ b/src/Climb.hs
@@ -51,7 +51,8 @@
 
 -- | Defines a REPL with commands, options, and completion.
 data ReplDef m = ReplDef
-  { rdOnInterrupt :: !ReplDirective
+  { rdOnInterrupt :: !(m ReplDirective)
+  , rdOnEof :: !(m ReplDirective)
   , rdGreeting :: !Text
   , rdPrompt :: !Text
   , rdOptionCommands :: !(OptionCommands m)
@@ -115,15 +116,15 @@
 
 -- | Runs a REPL as defined.
 runReplDef :: (MonadCatch m, MonadUnliftIO m) => ReplDef m -> m ()
-runReplDef (ReplDef onInterrupt greeting prompt opts exec comp) = do
+runReplDef (ReplDef onInterrupt onEof greeting prompt opts exec comp) = do
   let allOpts = fix (\c -> defaultOptions c <> opts)
       action = outerCommand allOpts exec
       handledAction = handleUserErr action
   liftIO (TIO.putStrLn greeting)
   liftIO (TIO.putStrLn "Enter `:quit` to exit or `:help` to see all commands.")
-  replM onInterrupt prompt handledAction comp
+  replM onInterrupt onEof prompt handledAction comp
 
 -- | Processes a single line of input. Useful for testing.
 -- (Note that this does not handle default option commands.)
 stepReplDef :: (MonadThrow m) => ReplDef m -> Text -> m ReplDirective
-stepReplDef (ReplDef _ _ _ opts exec _) = outerCommand opts exec
+stepReplDef (ReplDef _ _ _ _ opts exec _) = outerCommand opts exec
