diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 6.2.1 (2018-06-12)
+
+* Fix type of `shuffleVector` in the IRBuilder API.
+
 ## 6.2.0 (2018-05-08)
 
 * Remove field prefixes from `DIDerivedType`, `DIBasicType` and
diff --git a/llvm-hs-pure.cabal b/llvm-hs-pure.cabal
--- a/llvm-hs-pure.cabal
+++ b/llvm-hs-pure.cabal
@@ -1,5 +1,5 @@
 name: llvm-hs-pure
-version: 6.2.0
+version: 6.2.1
 license: BSD3
 license-file: LICENSE
 author: Anthony Cowley, Stephen Diehl, Moritz Kiefer <moritz.kiefer@purelyfunctional.org>, Benjamin S. Scarlet
diff --git a/src/LLVM/AST.hs b/src/LLVM/AST.hs
--- a/src/LLVM/AST.hs
+++ b/src/LLVM/AST.hs
@@ -21,6 +21,11 @@
   module LLVM.AST.Instruction,
   module LLVM.AST.Name,
   module LLVM.AST.Type
+  -- * Overview
+  -- $overview
+
+  -- * Constructing the AST for an LLVM module
+  -- $moduleconstruction
   ) where
 
 import LLVM.Prelude
@@ -33,6 +38,21 @@
 import LLVM.AST.DataLayout
 import qualified LLVM.AST.Attribute as A
 import qualified LLVM.AST.COMDAT as COMDAT
+
+{- $overview
+
+@llvm-hs-pure@ defines the Haskell AST for representing an LLVM
+`Module`. For interacting with the LLVM C/C++ libraries and an
+overview of the various libraries in the @llvm-hs@ ecosystem, take a
+look at the docs in the @LLVM@ module in @llvm-hs@.
+
+In addition to constructing the LLVM AST manually, there is also a
+monadic IRBuilder interface in `LLVM.IRBuilder`. The IRBuilder will
+take care of generating fresh names automatically and generally
+reduces the verbosity of using the AST directly. Using
+@RecursiveDo/mdo@, it is also capable of handling forward references
+automatically.
+-}
 
 -- | Any thing which can be at the top level of a 'Module'
 data Definition
diff --git a/src/LLVM/IRBuilder/Instruction.hs b/src/LLVM/IRBuilder/Instruction.hs
--- a/src/LLVM/IRBuilder/Instruction.hs
+++ b/src/LLVM/IRBuilder/Instruction.hs
@@ -143,7 +143,12 @@
 insertElement v e i = emitInstr (typeOf v) $ InsertElement v e i []
 
 shuffleVector :: MonadIRBuilder m => Operand -> Operand -> C.Constant -> m Operand
-shuffleVector a b m = emitInstr (typeOf a) $ ShuffleVector a b m []
+shuffleVector a b m = emitInstr retType $ ShuffleVector a b m []
+  where retType =
+          case (typeOf a, typeOf m) of
+            (VectorType _ elemTyp, VectorType maskLength _) -> VectorType maskLength elemTyp
+            _ -> error "shuffleVector: Expected two vectors and a vector mask"
+
 
 extractValue :: MonadIRBuilder m => Operand -> [Word32] -> m Operand
 extractValue a i = emitInstr (extractValueType i (typeOf a)) $ ExtractValue a i []
