diff --git a/.hlint.yaml b/.hlint.yaml
new file mode 100644
--- /dev/null
+++ b/.hlint.yaml
@@ -0,0 +1,4 @@
+- ignore: {name: Use fmap}
+- ignore: {name: Avoid lambda}
+- ignore: {name: Redundant lambda}
+- ignore: {name: Unused LANGUAGE pragma}
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
--- a/.travis.yml
+++ /dev/null
@@ -1,164 +0,0 @@
-# This Travis job script has been generated by a script via
-#
-#   haskell-ci '--output=.travis.yml' '--config=cabal.haskell-ci' 'cabal.project'
-#
-# To regenerate the script (for example after adjusting tested-with) run
-#
-#   haskell-ci regenerate
-#
-# For more information, see https://github.com/haskell-CI/haskell-ci
-#
-# version: 0.10
-#
-version: ~> 1.0
-language: c
-os: linux
-dist: xenial
-git:
-  # whether to recursively clone submodules
-  submodules: false
-notifications:
-  irc:
-    channels:
-      - irc.freenode.org#haskell-lens
-    skip_join: true
-    template:
-      - "\x0313linear\x03/\x0306%{branch}\x03 \x0314%{commit}\x03 %{build_url} %{message}"
-cache:
-  directories:
-    - $HOME/.cabal/packages
-    - $HOME/.cabal/store
-    - $HOME/.hlint
-before_cache:
-  - rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
-  # remove files that are regenerated by 'cabal update'
-  - rm -fv $CABALHOME/packages/hackage.haskell.org/00-index.*
-  - rm -fv $CABALHOME/packages/hackage.haskell.org/*.json
-  - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.cache
-  - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
-  - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
-  - rm -rfv $CABALHOME/packages/head.hackage
-jobs:
-  include:
-    - compiler: ghc-8.10.1
-      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.10.1","cabal-install-3.2"]}}
-      os: linux
-    - compiler: ghc-8.8.3
-      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.8.3","cabal-install-3.2"]}}
-      os: linux
-    - compiler: ghc-8.6.5
-      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.2"]}}
-      os: linux
-    - compiler: ghc-8.4.4
-      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.4.4","cabal-install-3.2"]}}
-      os: linux
-    - compiler: ghc-8.2.2
-      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.2.2","cabal-install-3.2"]}}
-      os: linux
-    - compiler: ghc-8.0.2
-      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.0.2","cabal-install-3.2"]}}
-      os: linux
-    - compiler: ghc-7.10.3
-      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.10.3","cabal-install-3.2"]}}
-      os: linux
-    - compiler: ghc-7.8.4
-      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.8.4","cabal-install-3.2"]}}
-      os: linux
-    - compiler: ghc-7.6.3
-      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.6.3","cabal-install-3.2"]}}
-      os: linux
-    - compiler: ghc-7.4.2
-      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.4.2","cabal-install-3.2"]}}
-      os: linux
-before_install:
-  - HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
-  - WITHCOMPILER="-w $HC"
-  - HADDOCK=$(echo "/opt/$CC/bin/haddock" | sed 's/-/\//')
-  - HCPKG="$HC-pkg"
-  - unset CC
-  - CABAL=/opt/ghc/bin/cabal
-  - CABALHOME=$HOME/.cabal
-  - export PATH="$CABALHOME/bin:$PATH"
-  - TOP=$(pwd)
-  - "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
-  - echo $HCNUMVER
-  - CABAL="$CABAL -vnormal+nowrap"
-  - set -o pipefail
-  - TEST=--enable-tests
-  - BENCH=--enable-benchmarks
-  - HEADHACKAGE=false
-  - rm -f $CABALHOME/config
-  - |
-    echo "verbose: normal +nowrap +markoutput"          >> $CABALHOME/config
-    echo "remote-build-reporting: anonymous"            >> $CABALHOME/config
-    echo "write-ghc-environment-files: always"          >> $CABALHOME/config
-    echo "remote-repo-cache: $CABALHOME/packages"       >> $CABALHOME/config
-    echo "logs-dir:          $CABALHOME/logs"           >> $CABALHOME/config
-    echo "world-file:        $CABALHOME/world"          >> $CABALHOME/config
-    echo "extra-prog-path:   $CABALHOME/bin"            >> $CABALHOME/config
-    echo "symlink-bindir:    $CABALHOME/bin"            >> $CABALHOME/config
-    echo "installdir:        $CABALHOME/bin"            >> $CABALHOME/config
-    echo "build-summary:     $CABALHOME/logs/build.log" >> $CABALHOME/config
-    echo "store-dir:         $CABALHOME/store"          >> $CABALHOME/config
-    echo "install-dirs user"                            >> $CABALHOME/config
-    echo "  prefix: $CABALHOME"                         >> $CABALHOME/config
-    echo "repository hackage.haskell.org"               >> $CABALHOME/config
-    echo "  url: http://hackage.haskell.org/"           >> $CABALHOME/config
-install:
-  - ${CABAL} --version
-  - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
-  - |
-    echo "program-default-options"                >> $CABALHOME/config
-    echo "  ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config
-  - cat $CABALHOME/config
-  - rm -fv cabal.project cabal.project.local cabal.project.freeze
-  - travis_retry ${CABAL} v2-update -v
-  # Generate cabal.project
-  - rm -rf cabal.project cabal.project.local cabal.project.freeze
-  - touch cabal.project
-  - |
-    echo "packages: ." >> cabal.project
-  - if [ $HCNUMVER -ge 80200 ] ; then echo 'package linear' >> cabal.project ; fi
-  - "if [ $HCNUMVER -ge 80200 ] ; then echo '  ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
-  - |
-  - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(linear)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
-  - cat cabal.project || true
-  - cat cabal.project.local || true
-  - if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
-  - ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH}
-  - "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
-  - rm  cabal.project.freeze
-  - travis_wait 40 ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all
-script:
-  - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
-  # Packaging...
-  - ${CABAL} v2-sdist all
-  # Unpacking...
-  - mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
-  - cd ${DISTDIR} || false
-  - find . -maxdepth 1 -type f -name '*.tar.gz' -exec tar -xvf '{}' \;
-  - find . -maxdepth 1 -type f -name '*.tar.gz' -exec rm       '{}' \;
-  - PKGDIR_linear="$(find . -maxdepth 1 -type d -regex '.*/linear-[0-9.]*')"
-  # Generate cabal.project
-  - rm -rf cabal.project cabal.project.local cabal.project.freeze
-  - touch cabal.project
-  - |
-    echo "packages: ${PKGDIR_linear}" >> cabal.project
-  - if [ $HCNUMVER -ge 80200 ] ; then echo 'package linear' >> cabal.project ; fi
-  - "if [ $HCNUMVER -ge 80200 ] ; then echo '  ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
-  - |
-  - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(linear)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
-  - cat cabal.project || true
-  - cat cabal.project.local || true
-  # Building with tests and benchmarks...
-  # build & run tests, build benchmarks
-  - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all
-  # Testing...
-  - ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all
-  # cabal check...
-  - (cd ${PKGDIR_linear} && ${CABAL} -vnormal check)
-  # haddock...
-  - ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all
-
-# REGENDATA ("0.10",["--output=.travis.yml","--config=cabal.haskell-ci","cabal.project"])
-# EOF
diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown
--- a/CHANGELOG.markdown
+++ b/CHANGELOG.markdown
@@ -1,3 +1,11 @@
+1.21.4 [2021.01.29]
+-------------------
+* Allow building with `vector-0.12.2` or later.
+* The build-type has been changed from `Custom` to `Simple`.
+  To achieve this, the `doctests` test suite has been removed in favor of using
+  [`cabal-docspec`](https://github.com/phadej/cabal-extras/tree/master/cabal-docspec)
+  to run the doctests.
+
 1.21.3 [2020.10.03]
 -------------------
 * Allow building with GHC 9.0.
diff --git a/README.markdown b/README.markdown
--- a/README.markdown
+++ b/README.markdown
@@ -1,7 +1,7 @@
 linear
 ======
 
-[![Hackage](https://img.shields.io/hackage/v/linear.svg)](https://hackage.haskell.org/package/linear) [![Build Status](https://secure.travis-ci.org/ekmett/linear.svg)](http://travis-ci.org/ekmett/linear)
+[![Hackage](https://img.shields.io/hackage/v/linear.svg)](https://hackage.haskell.org/package/linear) [![Build Status](https://github.com/ekmett/linear/workflows/Haskell-CI/badge.svg)](https://github.com/ekmett/linear/actions?query=workflow%3AHaskell-CI)
 
 Highly polymorphic vector space operations on sparse and free vector spaces.
 
diff --git a/Setup.lhs b/Setup.lhs
--- a/Setup.lhs
+++ b/Setup.lhs
@@ -1,34 +1,7 @@
-\begin{code}
-{-# LANGUAGE CPP #-}
-{-# OPTIONS_GHC -Wall #-}
-module Main (main) where
-
-#ifndef MIN_VERSION_cabal_doctest
-#define MIN_VERSION_cabal_doctest(x,y,z) 0
-#endif
-
-#if MIN_VERSION_cabal_doctest(1,0,0)
-
-import Distribution.Extra.Doctest ( defaultMainWithDoctests )
-main :: IO ()
-main = defaultMainWithDoctests "doctests"
-
-#else
-
-#ifdef MIN_VERSION_Cabal
--- If the macro is defined, we have new cabal-install,
--- but for some reason we don't have cabal-doctest in package-db
---
--- Probably we are running cabal sdist, when otherwise using new-build
--- workflow
-import Warning ()
-#endif
-
-import Distribution.Simple
-
-main :: IO ()
-main = defaultMain
+#!/usr/bin/runhaskell
+> module Main (main) where
 
-#endif
+> import Distribution.Simple
 
-\end{code}
+> main :: IO ()
+> main = defaultMain
diff --git a/Warning.hs b/Warning.hs
deleted file mode 100644
--- a/Warning.hs
+++ /dev/null
@@ -1,5 +0,0 @@
-module Warning
-  {-# WARNING ["You are configuring this package without cabal-doctest installed.",
-               "The doctests test-suite will not work as a result.",
-               "To fix this, install cabal-doctest before configuring."] #-}
-  () where
diff --git a/linear.cabal b/linear.cabal
--- a/linear.cabal
+++ b/linear.cabal
@@ -1,6 +1,6 @@
 name:          linear
 category:      Math, Algebra
-version:       1.21.3
+version:       1.21.4
 license:       BSD3
 cabal-version: >= 1.10
 license-file:  LICENSE
@@ -12,7 +12,7 @@
 copyright:     Copyright (C) 2012-2015 Edward A. Kmett
 synopsis:      Linear Algebra
 description:   Types and combinators for linear algebra on free vector spaces
-build-type:    Custom
+build-type:    Simple
 tested-with:   GHC == 7.4.2
              , GHC == 7.6.3
              , GHC == 7.8.4
@@ -25,13 +25,10 @@
              , GHC == 8.10.1
 extra-source-files:
   .gitignore
-  .travis.yml
+  .hlint.yaml
   .vim.custom
-  travis/cabal-apt-install
-  travis/config
   CHANGELOG.markdown
   README.markdown
-  Warning.hs
 
 flag template-haskell
   description:
@@ -50,12 +47,6 @@
   type: git
   location: https://github.com/ekmett/linear
 
-custom-setup
-  setup-depends:
-    base          >= 4 && < 5,
-    Cabal,
-    cabal-doctest >= 1 && < 1.1
-
 library
   build-depends:
     adjunctions          >= 4     && < 5,
@@ -128,19 +119,19 @@
 
   default-language: Haskell2010
 
--- Verify the results of the examples
+  x-docspec-extra-packages: simple-reflect
+
+-- We need this dummy test-suite to add simple-reflect to the install plan
+--
+-- When cabal-install's extra-packages support becomes widely available
+-- (i.e. after 3.4 release), we can remove this test-suite.
 test-suite doctests
-  type:           exitcode-stdio-1.0
-  main-is:        doctests.hs
-  ghc-options:    -Wall -threaded
-  hs-source-dirs: tests
-  build-depends:
-    base,
-    doctest        >= 0.11.1 && < 0.18,
-    lens,
-    linear,
-    simple-reflect >= 0.3.1
-  default-language: Haskell2010
+  type:              exitcode-stdio-1.0
+  main-is:           doctests.hs
+  hs-source-dirs:    tests
+  default-language:  Haskell2010
+
+  build-depends: base, simple-reflect >= 0.3.1
 
 test-suite UnitTests
   type:           exitcode-stdio-1.0
diff --git a/src/Linear.hs b/src/Linear.hs
--- a/src/Linear.hs
+++ b/src/Linear.hs
@@ -46,5 +46,3 @@
 import Linear.V3
 import Linear.V4
 import Linear.Vector
-
-{-# ANN module "Hlint: ignore Use import/export shortcut" #-}
diff --git a/src/Linear/Affine.hs b/src/Linear/Affine.hs
--- a/src/Linear/Affine.hs
+++ b/src/Linear/Affine.hs
@@ -88,10 +88,6 @@
 import Linear.Vector
 import System.Random
 
-#ifdef HLINT
-{-# ANN module "HLint: ignore Unused LANGUAGE pragma" #-}
-#endif
-
 -- | An affine space is roughly a vector space in which we have
 -- forgotten or at least pretend to have forgotten the origin.
 --
diff --git a/src/Linear/Conjugate.hs b/src/Linear/Conjugate.hs
--- a/src/Linear/Conjugate.hs
+++ b/src/Linear/Conjugate.hs
@@ -25,6 +25,10 @@
 import Data.Word
 import Foreign.C.Types (CFloat, CDouble)
 
+-- $setup
+-- >>> import Data.Complex (Complex (..))
+
+
 -- | An involutive ring
 class Num a => Conjugate a where
   -- | Conjugate a value. This defaults to the trivial involution.
diff --git a/src/Linear/Matrix.hs b/src/Linear/Matrix.hs
--- a/src/Linear/Matrix.hs
+++ b/src/Linear/Matrix.hs
@@ -72,9 +72,14 @@
 import Linear.V
 #endif
 
-#ifdef HLINT
-{-# ANN module "HLint: ignore Reduce duplication" #-}
-#endif
+-- $setup
+-- >>> import Control.Lens hiding (index)
+-- >>> import Data.Complex (Complex (..))
+-- >>> import Linear.V2
+-- >>> import Linear.V3
+-- >>> import Linear.V
+-- >>> import Data.IntMap
+-- >>> import Debug.SimpleReflect.Vars
 
 -- | This is a generalization of 'Control.Lens.inside' to work over any corepresentable 'Functor'.
 --
@@ -95,12 +100,6 @@
    i = tabulate $ \ e -> ipos $ go (index es e)
    o eb = tabulate $ \ e -> ipeek (index eb e) (go (index es e))
 
--- $setup
--- >>> import Data.Complex
--- >>> import Data.IntMap
--- >>> import Debug.SimpleReflect.Vars
--- >>> import Linear.V
-
 infixl 7 !*!
 -- | Matrix product. This can compute any combination of sparse and dense multiplication.
 --
@@ -245,12 +244,10 @@
      (V4 d e f 0)
      (V4 g h i 0)
      (V4 j k l 1)
-{-# ANN m43_to_m44 "HLint: ignore Use camelCase" #-}
 
 -- | Convert a 3x3 matrix to a 4x4 matrix extending it with 0's in the new row and column.
 m33_to_m44 :: Num a => M33 a -> M44 a
 m33_to_m44 (V3 r1 r2 r3) = V4 (vector r1) (vector r2) (vector r3) (point 0)
-{-# ANN m33_to_m44 "HLint: ignore Use camelCase" #-}
 
 -- |The identity matrix for any dimension vector.
 --
diff --git a/src/Linear/Plucker.hs b/src/Linear/Plucker.hs
--- a/src/Linear/Plucker.hs
+++ b/src/Linear/Plucker.hs
@@ -106,8 +106,6 @@
 import Linear.Vector
 import System.Random
 
-{-# ANN module "HLint: ignore Reduce duplication" #-}
-
 -- | Plücker coordinates for lines in a 3-dimensional space.
 data Plucker a = Plucker !a !a !a !a !a !a deriving (Eq,Ord,Show,Read
 #if __GLASGOW_HASKELL__ >= 702
diff --git a/src/Linear/Projection.hs b/src/Linear/Projection.hs
--- a/src/Linear/Projection.hs
+++ b/src/Linear/Projection.hs
@@ -30,9 +30,10 @@
 import Linear.Epsilon
 import Linear.Metric
 
-#ifdef HLINT
-{-# ANN module "HLint: ignore Reduce duplication" #-}
-#endif
+-- $setup
+-- >>> import Linear.Matrix
+-- >>> import Linear.V2
+-- >>> import Linear.V4
 
 -- | Build a look at view matrix
 lookAt
diff --git a/src/Linear/Quaternion.hs b/src/Linear/Quaternion.hs
--- a/src/Linear/Quaternion.hs
+++ b/src/Linear/Quaternion.hs
@@ -116,8 +116,6 @@
 import Prelude hiding (any)
 import System.Random
 
-{-# ANN module "HLint: ignore Reduce duplication" #-}
-
 -- | Quaternions
 data Quaternion a = Quaternion !a {-# UNPACK #-}!(V3 a)
                     deriving (Eq,Ord,Read,Show,Data,Typeable
diff --git a/src/Linear/Trace.hs b/src/Linear/Trace.hs
--- a/src/Linear/Trace.hs
+++ b/src/Linear/Trace.hs
@@ -50,6 +50,7 @@
 -- >>> import Data.Complex
 -- >>> import Data.IntMap
 -- >>> import Debug.SimpleReflect.Vars
+-- >>> import Linear.V2
 
 class Functor m => Trace m where
   -- | Compute the trace of a matrix
diff --git a/src/Linear/V.hs b/src/Linear/V.hs
--- a/src/Linear/V.hs
+++ b/src/Linear/V.hs
@@ -98,7 +98,8 @@
 #if __GLASGOW_HASKELL__ < 710
 import Data.Traversable (sequenceA)
 #endif
-import Data.Vector as V
+import qualified Data.Vector as V
+import Data.Vector (Vector)
 import qualified Data.Vector.Generic as G
 import qualified Data.Vector.Unboxed as U
 import qualified Data.Vector.Generic.Mutable as M
@@ -127,11 +128,6 @@
 #endif
 import System.Random
 
-
-#ifdef HLINT
-{-# ANN module "hlint: ignore Eta reduce" #-}
-#endif
-
 class Dim n where
   reflectDim :: p n -> Int
 
@@ -240,7 +236,7 @@
 instance Foldable (V n) where
   fold (V as) = fold as
   {-# INLINE fold #-}
-  foldMap f (V as) = foldMap f as
+  foldMap f (V as) = Foldable.foldMap f as
   {-# INLINE foldMap #-}
   foldr f z (V as) = V.foldr f z as
   {-# INLINE foldr #-}
@@ -300,15 +296,15 @@
   {-# INLINE (<*>) #-}
 
 instance Bind (V n) where
-  V as >>- f = V $ generate (V.length as) $ \i ->
-    toVector (f (as `unsafeIndex` i)) `unsafeIndex` i
+  V as >>- f = V $ V.generate (V.length as) $ \i ->
+    toVector (f (as `V.unsafeIndex` i)) `V.unsafeIndex` i
   {-# INLINE (>>-) #-}
 
 instance Dim n => Monad (V n) where
   return = V . V.replicate (reflectDim (Proxy :: Proxy n))
   {-# INLINE return #-}
-  V as >>= f = V $ generate (reflectDim (Proxy :: Proxy n)) $ \i ->
-    toVector (f (as `unsafeIndex` i)) `unsafeIndex` i
+  V as >>= f = V $ V.generate (reflectDim (Proxy :: Proxy n)) $ \i ->
+    toVector (f (as `V.unsafeIndex` i)) `V.unsafeIndex` i
   {-# INLINE (>>=) #-}
 
 instance Dim n => Additive (V n) where
@@ -382,7 +378,7 @@
     {-# INLINE acosh #-}
 
 instance Dim n => Distributive (V n) where
-  distribute f = V $ V.generate (reflectDim (Proxy :: Proxy n)) $ \i -> fmap (\(V v) -> unsafeIndex v i) f
+  distribute f = V $ V.generate (reflectDim (Proxy :: Proxy n)) $ \i -> fmap (\(V v) -> V.unsafeIndex v i) f
   {-# INLINE distribute #-}
 
 instance Hashable a => Hashable (V n a) where
@@ -404,10 +400,10 @@
   alignment _ = alignment (undefined :: a)
   {-# INLINE alignment #-}
   poke ptr (V xs) = Foldable.forM_ [0..reflectDim (Proxy :: Proxy n)-1] $ \i ->
-    pokeElemOff ptr' i (unsafeIndex xs i)
+    pokeElemOff ptr' i (V.unsafeIndex xs i)
     where ptr' = castPtr ptr
   {-# INLINE poke #-}
-  peek ptr = V <$> generateM (reflectDim (Proxy :: Proxy n)) (peekElemOff ptr')
+  peek ptr = V <$> V.generateM (reflectDim (Proxy :: Proxy n)) (peekElemOff ptr')
     where ptr' = castPtr ptr
   {-# INLINE peek #-}
 
@@ -475,7 +471,7 @@
 
 instance Dim n => Representable (V n) where
   type Rep (V n) = Int
-  tabulate = V . generate (reflectDim (Proxy :: Proxy n))
+  tabulate = V . V.generate (reflectDim (Proxy :: Proxy n))
   {-# INLINE tabulate #-}
   index (V xs) i = xs V.! i
   {-# INLINE index #-}
@@ -519,10 +515,10 @@
 #endif
 
 instance (Typeable1 (V n), Typeable (V n a), Dim n, Data a) => Data (V n a) where
-  gfoldl f z (V as) = z (V . fromList) `f` V.toList as
+  gfoldl f z (V as) = z (V . V.fromList) `f` V.toList as
   toConstr _ = vConstr
   gunfold k z c = case constrIndex c of
-    1 -> k (z (V . fromList))
+    1 -> k (z (V . V.fromList))
     _ -> error "gunfold"
   dataTypeOf _ = vDataType
   dataCast1 f = gcast1 f
diff --git a/src/Linear/V0.hs b/src/Linear/V0.hs
--- a/src/Linear/V0.hs
+++ b/src/Linear/V0.hs
@@ -97,7 +97,10 @@
 import Prelude hiding (sum)
 
 -- $setup
+-- >>> import Control.Applicative
 -- >>> import Control.Lens
+-- >>> import qualified Data.Foldable as F
+-- >>> let sum xs = F.sum xs
 
 -- | A 0-dimensional vector
 --
diff --git a/src/Linear/V1.hs b/src/Linear/V1.hs
--- a/src/Linear/V1.hs
+++ b/src/Linear/V1.hs
@@ -101,13 +101,11 @@
 import qualified Data.Vector.Generic as G
 import qualified Data.Vector.Unboxed.Base as U
 
-#ifdef HLINT
--- HLint is delusional
-{-# ANN module "HLint: ignore Unused LANGUAGE pragma" #-}
-#endif
-
 -- $setup
+-- >>> import Control.Applicative
 -- >>> import Control.Lens
+-- >>> import qualified Data.Foldable as F
+-- >>> let sum xs = F.sum xs
 
 -- | A 1-dimensional vector
 --
diff --git a/src/Linear/V2.hs b/src/Linear/V2.hs
--- a/src/Linear/V2.hs
+++ b/src/Linear/V2.hs
@@ -106,7 +106,10 @@
 import System.Random
 
 -- $setup
+-- >>> import Control.Applicative
 -- >>> import Control.Lens
+-- >>> import qualified Data.Foldable as F
+-- >>> let sum xs = F.sum xs
 
 -- | A 2-dimensional vector
 --
diff --git a/src/Linear/V3.hs b/src/Linear/V3.hs
--- a/src/Linear/V3.hs
+++ b/src/Linear/V3.hs
@@ -102,7 +102,8 @@
 import Linear.Vector
 import System.Random
 
-{-# ANN module "HLint: ignore Reduce duplication" #-}
+-- $setup
+-- >>> import Control.Lens hiding (index)
 
 -- | A 3-dimensional vector
 data V3 a = V3 !a !a !a deriving (Eq,Ord,Show,Read,Data,Typeable
diff --git a/src/Linear/V4.hs b/src/Linear/V4.hs
--- a/src/Linear/V4.hs
+++ b/src/Linear/V4.hs
@@ -109,7 +109,8 @@
 import Linear.Vector
 import System.Random
 
-{-# ANN module "HLint: ignore Reduce duplication" #-}
+-- $setup
+-- >>> import Control.Lens hiding (index)
 
 -- | A 4-dimensional vector.
 data V4 a = V4 !a !a !a !a deriving (Eq,Ord,Show,Read,Data,Typeable
diff --git a/src/Linear/Vector.hs b/src/Linear/Vector.hs
--- a/src/Linear/Vector.hs
+++ b/src/Linear/Vector.hs
@@ -51,15 +51,14 @@
 #if __GLASGOW_HASKELL__ < 710
 import Data.Monoid (mempty)
 #endif
-import Data.Vector as Vector
-import Data.Vector.Mutable as Mutable
+import qualified Data.Vector as Vector
+import Data.Vector (Vector)
+import qualified Data.Vector.Mutable as Mutable
 #ifdef USE_GHC_GENERICS
 import GHC.Generics
 #endif
 import Linear.Instances ()
 
-{-# ANN module "HLint: ignore Redundant lambda" #-}
-
 -- $setup
 -- >>> import Linear.V2
 
@@ -215,10 +214,10 @@
   {-# INLINE zero #-}
   liftU2 f u v = case compare lu lv of
     LT | lu == 0   -> v
-       | otherwise -> Vector.modify (\ w -> Foldable.forM_ [0..lu-1] $ \i -> unsafeWrite w i $ f (unsafeIndex u i) (unsafeIndex v i)) v
+       | otherwise -> Vector.modify (\ w -> Foldable.forM_ [0..lu-1] $ \i -> Mutable.unsafeWrite w i $ f (Vector.unsafeIndex u i) (Vector.unsafeIndex v i)) v
     EQ -> Vector.zipWith f u v
     GT | lv == 0   -> u
-       | otherwise -> Vector.modify (\ w -> Foldable.forM_ [0..lv-1] $ \i -> unsafeWrite w i $ f (unsafeIndex u i) (unsafeIndex v i)) u
+       | otherwise -> Vector.modify (\ w -> Foldable.forM_ [0..lv-1] $ \i -> Mutable.unsafeWrite w i $ f (Vector.unsafeIndex u i) (Vector.unsafeIndex v i)) u
     where
       lu = Vector.length u
       lv = Vector.length v
diff --git a/tests/doctests.hs b/tests/doctests.hs
--- a/tests/doctests.hs
+++ b/tests/doctests.hs
@@ -7,19 +7,13 @@
 -- Stability   :  provisional
 -- Portability :  portable
 --
--- This module provides doctests for a project based on the actual versions
--- of the packages it was built with. It requires a corresponding Setup.lhs
--- to be added to the project
+-- This module exists to add dependencies
 -----------------------------------------------------------------------------
 module Main where
 
-import Build_doctests (flags, pkgs, module_sources)
-import Data.Foldable (traverse_)
-import Test.DocTest
-
 main :: IO ()
 main = do
-    traverse_ putStrLn args
-    doctest args
-  where
-    args = flags ++ pkgs ++ module_sources
+    putStrLn "This test-suite exists only to add dependencies"
+    putStrLn "To run doctests: "
+    putStrLn "    cabal build all --enable-tests"
+    putStrLn "    cabal-docspec"
diff --git a/travis/cabal-apt-install b/travis/cabal-apt-install
deleted file mode 100644
--- a/travis/cabal-apt-install
+++ /dev/null
@@ -1,27 +0,0 @@
-#! /bin/bash
-set -eu
-
-APT="sudo apt-get -q -y"
-CABAL_INSTALL_DEPS="cabal install --only-dependencies --force-reinstall"
-
-$APT update
-$APT install dctrl-tools
-
-# Find potential system packages to satisfy cabal dependencies
-deps()
-{
-	local M='^\([^ ]\+\)-[0-9.]\+ (.*$'
-	local G=' -o ( -FPackage -X libghc-\L\1\E-dev )'
-	local E="$($CABAL_INSTALL_DEPS "$@" --dry-run -v 2> /dev/null \
-		| sed -ne "s/$M/$G/p" | sort -u)"
-	grep-aptavail -n -sPackage \( -FNone -X None \) $E | sort -u
-}
-
-$APT install $(deps "$@") libghc-quickcheck2-dev # QuickCheck is special
-$CABAL_INSTALL_DEPS "$@" # Install the rest via Hackage
-
-if ! $APT install hlint ; then
-	$APT install $(deps hlint)
-	cabal install hlint
-fi
-
diff --git a/travis/config b/travis/config
deleted file mode 100644
--- a/travis/config
+++ /dev/null
@@ -1,16 +0,0 @@
--- This provides a custom ~/.cabal/config file for use when hackage is down that should work on unix
---
--- This is particularly useful for travis-ci to get it to stop complaining
--- about a broken build when everything is still correct on our end.
---
--- This uses Luite Stegeman's mirror of hackage provided by his 'hdiff' site instead
---
--- To enable this, uncomment the before_script in .travis.yml
-
-remote-repo: hdiff.luite.com:http://hdiff.luite.com/packages/archive
-remote-repo-cache: ~/.cabal/packages
-world-file: ~/.cabal/world
-build-summary: ~/.cabal/logs/build.log
-remote-build-reporting: anonymous
-install-dirs user
-install-dirs global
