diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2011-2016 Scott N. Walck <walck@lvc.edu>.
+Copyright (c) 2011-2020 Scott N. Walck <walck@lvc.edu>.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff --git a/learn-physics.cabal b/learn-physics.cabal
--- a/learn-physics.cabal
+++ b/learn-physics.cabal
@@ -1,5 +1,5 @@
 Name:                learn-physics
-Version:             0.6.4
+Version:             0.6.5
 Synopsis:            Haskell code for learning physics
 Description:         A library of functions for vector calculus,
                      calculation of electric field, electric flux,
@@ -38,11 +38,11 @@
                        Physics.Learn.Visual.PlotTools
                        Physics.Learn.Visual.VisTools
                        Physics.Learn.Volume
-  Build-depends:       base >= 4.7 && < 4.13,
+  Build-depends:       base >= 4.7 && < 5,
                        vector-space >= 0.8.4,
                        hmatrix >= 0.17,
                        gloss >= 1.8,
-                       gnuplot >= 0.5 && < 0.6,
+                       gnuplot >= 0.5,
                        not-gloss >= 0.5.0.4,
                        spatial-math >= 0.2
   Hs-source-dirs:      src
@@ -54,44 +54,44 @@
 Executable           learn-physics-PlaneWave
   Main-is:           examples/src/PlaneWave.hs
   Build-depends:     not-gloss >= 0.7.4,
-                     base >= 4.5 && < 4.13,
+                     base >= 4.5 && < 5,
                      learn-physics
 
 Executable           learn-physics-eFieldLine3D
   Main-is:           examples/src/eFieldLine3D.hs
   Build-depends:     not-gloss >= 0.7.4,
-                     base >= 4.5 && < 4.13,
+                     base >= 4.5 && < 5,
                      learn-physics
 
 Executable           learn-physics-LorentzForceSimulation
   Main-is:           examples/src/LorentzForceSimulation.hs
   Build-depends:     not-gloss >= 0.7.4,
                      spatial-math >= 0.2,
-                     base >= 4.5 && < 4.13,
+                     base >= 4.5 && < 5,
                      learn-physics
 
 Executable           learn-physics-BCircularLoop
   Main-is:           examples/src/BCircularLoop.hs
   Build-depends:     not-gloss >= 0.7.4,
-                     base >= 4.5 && < 4.13,
+                     base >= 4.5 && < 5,
                      learn-physics
 
 Executable           learn-physics-sunEarth
   Main-is:           examples/src/sunEarthRK4.hs
   Build-depends:     gloss >= 1.8,
-                     base >= 4.5 && < 4.13,
+                     base >= 4.5 && < 5,
                      learn-physics
 
 Executable           learn-physics-eFieldLine2D
   Main-is:           examples/src/eFieldLine2D.hs
   Build-depends:     gloss >= 1.8,
-                     base >= 4.5 && < 4.13,
+                     base >= 4.5 && < 5,
                      learn-physics
 
 Executable           learn-physics-Projectile
   Main-is:           examples/src/Projectile.hs
   Build-depends:     gnuplot >= 0.5,
-                     base >= 4.5 && < 4.13,
+                     base >= 4.5 && < 5,
                      learn-physics
 
 Executable           learn-physics-NMR
diff --git a/src/Physics/Learn/CarrotVec.hs b/src/Physics/Learn/CarrotVec.hs
--- a/src/Physics/Learn/CarrotVec.hs
+++ b/src/Physics/Learn/CarrotVec.hs
@@ -4,7 +4,7 @@
 
 {- | 
 Module      :  Physics.Learn.CarrotVec
-Copyright   :  (c) Scott N. Walck 2011-2018
+Copyright   :  (c) Scott N. Walck 2011-2019
 License     :  BSD3 (see LICENSE)
 Maintainer  :  Scott N. Walck <walck@lvc.edu>
 Stability   :  experimental
@@ -26,6 +26,7 @@
 
 module Physics.Learn.CarrotVec
     ( Vec
+    , R
     , xComp
     , yComp
     , zComp
@@ -65,6 +66,7 @@
     )
 import Physics.Learn.CommonVec
     ( Vec(..)
+    , R
     , xComp
     , yComp
     , zComp
@@ -81,7 +83,7 @@
     Vec ax ay az ^+^ Vec bx by bz = Vec (ax+bx) (ay+by) (az+bz)
 
 instance VectorSpace Vec where
-    type Scalar Vec = Double
+    type Scalar Vec = R
     c *^ Vec ax ay az = Vec (c*ax) (c*ay) (c*az)
 
 instance InnerSpace Vec where
diff --git a/src/Physics/Learn/Charge.hs b/src/Physics/Learn/Charge.hs
--- a/src/Physics/Learn/Charge.hs
+++ b/src/Physics/Learn/Charge.hs
@@ -1,9 +1,9 @@
 {-# OPTIONS_GHC -Wall #-}
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE Safe #-}
 
 {- | 
 Module      :  Physics.Learn.Charge
-Copyright   :  (c) Scott N. Walck 2011-2014
+Copyright   :  (c) Scott N. Walck 2011-2019
 License     :  BSD3 (see LICENSE)
 Maintainer  :  Scott N. Walck <walck@lvc.edu>
 Stability   :  experimental
diff --git a/src/Physics/Learn/CommonVec.hs b/src/Physics/Learn/CommonVec.hs
--- a/src/Physics/Learn/CommonVec.hs
+++ b/src/Physics/Learn/CommonVec.hs
@@ -3,7 +3,7 @@
 
 {- | 
 Module      :  Physics.Learn.CommonVec
-Copyright   :  (c) Scott N. Walck 2012-2014
+Copyright   :  (c) Scott N. Walck 2012-2019
 License     :  BSD3 (see LICENSE)
 Maintainer  :  Scott N. Walck <walck@lvc.edu>
 Stability   :  experimental
@@ -23,6 +23,7 @@
 
 module Physics.Learn.CommonVec
     ( Vec(..)
+    , R
     , vec
     , (><)
     , iHat
@@ -33,10 +34,12 @@
 
 infixl 7 ><
 
+type R = Double
+
 -- | A type for vectors.
-data Vec = Vec { xComp :: Double  -- ^ x component
-               , yComp :: Double  -- ^ y component
-               , zComp :: Double  -- ^ z component
+data Vec = Vec { xComp :: R  -- ^ x component
+               , yComp :: R  -- ^ y component
+               , zComp :: R  -- ^ z component
                } deriving (Eq)
 
 instance Show Vec where
@@ -50,9 +53,9 @@
     | otherwise  = show x
 
 -- | Form a vector by giving its x, y, and z components.
-vec :: Double  -- ^ x component
-    -> Double  -- ^ y component
-    -> Double  -- ^ z component
+vec :: R  -- ^ x component
+    -> R  -- ^ y component
+    -> R  -- ^ z component
     -> Vec
 vec = Vec
 
diff --git a/src/Physics/Learn/Current.hs b/src/Physics/Learn/Current.hs
--- a/src/Physics/Learn/Current.hs
+++ b/src/Physics/Learn/Current.hs
@@ -1,9 +1,9 @@
 {-# OPTIONS_GHC -Wall #-}
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE Safe #-}
 
 {- | 
 Module      :  Physics.Learn.Current
-Copyright   :  (c) Scott N. Walck 2012-2014
+Copyright   :  (c) Scott N. Walck 2012-2019
 License     :  BSD3 (see LICENSE)
 Maintainer  :  Scott N. Walck <walck@lvc.edu>
 Stability   :  experimental
diff --git a/src/Physics/Learn/Mechanics.hs b/src/Physics/Learn/Mechanics.hs
--- a/src/Physics/Learn/Mechanics.hs
+++ b/src/Physics/Learn/Mechanics.hs
@@ -1,10 +1,10 @@
 {-# OPTIONS_GHC -Wall #-}
 {-# LANGUAGE TypeFamilies #-}
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE Safe #-}
 
 {- | 
 Module      :  Physics.Learn.Mechanics
-Copyright   :  (c) Scott N. Walck 2014
+Copyright   :  (c) Scott N. Walck 2014-2019
 License     :  BSD3 (see LICENSE)
 Maintainer  :  Scott N. Walck <walck@lvc.edu>
 Stability   :  experimental
diff --git a/src/Physics/Learn/RungeKutta.hs b/src/Physics/Learn/RungeKutta.hs
--- a/src/Physics/Learn/RungeKutta.hs
+++ b/src/Physics/Learn/RungeKutta.hs
@@ -1,10 +1,10 @@
 {-# OPTIONS_GHC -Wall #-}
 {-# LANGUAGE FlexibleContexts #-}
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE Safe #-}
 
 {- | 
 Module      :  Physics.Learn.RungeKutta
-Copyright   :  (c) Scott N. Walck 2012-2014
+Copyright   :  (c) Scott N. Walck 2012-2019
 License     :  BSD3 (see LICENSE)
 Maintainer  :  Scott N. Walck <walck@lvc.edu>
 Stability   :  experimental
diff --git a/src/Physics/Learn/SimpleVec.hs b/src/Physics/Learn/SimpleVec.hs
--- a/src/Physics/Learn/SimpleVec.hs
+++ b/src/Physics/Learn/SimpleVec.hs
@@ -3,7 +3,7 @@
 
 {- | 
 Module      :  Physics.Learn.SimpleVec
-Copyright   :  (c) Scott N. Walck 2012-2018
+Copyright   :  (c) Scott N. Walck 2012-2019
 License     :  BSD3 (see LICENSE)
 Maintainer  :  Scott N. Walck <walck@lvc.edu>
 Stability   :  experimental
@@ -43,6 +43,7 @@
 
 import Physics.Learn.CommonVec
     ( Vec(..)
+    , R
     , vec
     , iHat
     , jHat
@@ -56,8 +57,6 @@
 infixl 7 ^*
 infixl 7 ^/
 infixl 7 <.>
-
-type R = Double
 
 -- | The zero vector.
 zeroV :: Vec
diff --git a/src/Physics/Learn/StateSpace.hs b/src/Physics/Learn/StateSpace.hs
--- a/src/Physics/Learn/StateSpace.hs
+++ b/src/Physics/Learn/StateSpace.hs
@@ -1,10 +1,10 @@
 {-# OPTIONS_GHC -Wall -fno-warn-orphans #-}
 {-# LANGUAGE FlexibleContexts, FlexibleInstances, TypeFamilies #-}
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE Safe #-}
 
 {- | 
 Module      :  Physics.Learn.StateSpace
-Copyright   :  (c) Scott N. Walck 2014
+Copyright   :  (c) Scott N. Walck 2014-2019
 License     :  BSD3 (see LICENSE)
 Maintainer  :  Scott N. Walck <walck@lvc.edu>
 Stability   :  experimental
diff --git a/src/Physics/Learn/Surface.hs b/src/Physics/Learn/Surface.hs
--- a/src/Physics/Learn/Surface.hs
+++ b/src/Physics/Learn/Surface.hs
@@ -1,10 +1,10 @@
 {-# LANGUAGE TypeFamilies #-}
 {-# OPTIONS_GHC -Wall #-}
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE Safe #-}
 
 {- | 
 Module      :  Physics.Learn.Surface
-Copyright   :  (c) Scott N. Walck 2012-2014
+Copyright   :  (c) Scott N. Walck 2012-2019
 License     :  BSD3 (see LICENSE)
 Maintainer  :  Scott N. Walck <walck@lvc.edu>
 Stability   :  experimental
diff --git a/src/Physics/Learn/Volume.hs b/src/Physics/Learn/Volume.hs
--- a/src/Physics/Learn/Volume.hs
+++ b/src/Physics/Learn/Volume.hs
@@ -1,10 +1,10 @@
 {-# LANGUAGE TypeFamilies #-}
 {-# OPTIONS_GHC -Wall #-}
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE Safe #-}
 
 {- | 
 Module      :  Physics.Learn.Volume
-Copyright   :  (c) Scott N. Walck 2012-2014
+Copyright   :  (c) Scott N. Walck 2012-2019
 License     :  BSD3 (see LICENSE)
 Maintainer  :  Scott N. Walck <walck@lvc.edu>
 Stability   :  experimental
