diff --git a/TerminalSimple.hs b/TerminalSimple.hs
--- a/TerminalSimple.hs
+++ b/TerminalSimple.hs
@@ -1,9 +1,4 @@
-{-# LANGUAGE DataKinds #-}
-{-# LANGUAGE FlexibleContexts #-}
-{-# LANGUAGE FlexibleInstances #-}
-{-# LANGUAGE LambdaCase #-}
 {-# LANGUAGE OverloadedStrings #-}
-{-# LANGUAGE ScopedTypeVariables #-}
 
 -- | Example application for the @rhine-terminal@ library.
 module Main where
diff --git a/rhine-terminal.cabal b/rhine-terminal.cabal
--- a/rhine-terminal.cabal
+++ b/rhine-terminal.cabal
@@ -1,10 +1,9 @@
--- Initial rhine-gloss.cabal generated by cabal init.  For further
--- documentation, see http://haskell.org/cabal/users-guide/
+cabal-version: 2.2
 name: rhine-terminal
-version: 1.6
+version: 1.7
 synopsis: Terminal backend for Rhine
 description: This package provides an example of a `terminal` based program using rhine.
-license: BSD3
+license: BSD-3-Clause
 license-file: LICENSE
 author: Manuel Bärenz, Jun Matsushita
 maintainer: programming@manuelbaerenz.de, jun@iilab.org
@@ -13,7 +12,6 @@
 build-type: Simple
 extra-source-files: ChangeLog.md
 extra-doc-files: README.md
-cabal-version: 2.0
 
 source-repository head
   type: git
@@ -24,75 +22,59 @@
   location: https://github.com/turion/rhine.git
   tag: v1.6
 
-library
-  exposed-modules: FRP.Rhine.Terminal
+common opts
   build-depends:
     base >=4.16 && <4.22,
     exceptions >=0.10.4,
     monad-schedule >=1.6,
-    rhine ^>=1.6,
+    rhine ^>=1.7,
     terminal >=0.2.0.0,
+    text >=1.2,
     time >=1.9.3,
-    transformers >=0.5
+    transformers >=0.5,
 
-  hs-source-dirs: src
   default-language: Haskell2010
-  ghc-options: -W
-  default-extensions: TypeOperators
+  ghc-options:
+    -W
 
+  default-extensions:
+    DataKinds
+    LambdaCase
+    TypeOperators
+
   if flag(dev)
     ghc-options: -Werror
 
-executable rhine-terminal-simple
-  main-is: TerminalSimple.hs
-  ghc-options: -threaded
+library
+  import: opts
+  exposed-modules: FRP.Rhine.Terminal
+  hs-source-dirs: src
+  default-extensions: TypeOperators
+
+common executable-opts
   build-depends:
-    base >=4.16 && <4.22,
-    rhine ^>=1.6,
-    rhine-terminal,
-    terminal >=0.2.0.0,
-    text >=1.2,
-    time >=1.9.3
+    rhine-terminal
 
-  default-language: Haskell2010
   ghc-options:
-    -W
     -threaded
     -rtsopts
     -with-rtsopts=-N
 
-  default-extensions: TypeOperators
-
-  if flag(dev)
-    ghc-options: -Werror
+executable rhine-terminal-simple
+  import: opts, executable-opts
+  main-is: TerminalSimple.hs
+  ghc-options: -threaded
 
 test-suite rhine-terminal-tests
+  import: opts, executable-opts
   type: exitcode-stdio-1.0
   main-is: tests/Main.hs
   ghc-options: -threaded
   build-depends:
-    base >=4.16 && <4.22,
     exceptions >=0.10.4,
     hspec,
-    rhine ^>=1.6,
-    rhine-terminal,
     stm >=2.5.0,
-    terminal >=0.2.0.0,
-    text >=1.2,
-    time >=1.9.3,
-    transformers >=0.5
-
-  default-language: Haskell2010
-  ghc-options:
-    -W
-    -threaded
-    -rtsopts
-    -with-rtsopts=-N
-
-  default-extensions: TypeOperators
-
-  if flag(dev)
-    ghc-options: -Werror
+    transformers >=0.5,
 
 flag dev
   description: Enable warnings as errors. Active on ci.
