diff --git a/Setup.hs b/Setup.hs
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/hoppy-generator.cabal b/hoppy-generator.cabal
--- a/hoppy-generator.cabal
+++ b/hoppy-generator.cabal
@@ -1,12 +1,12 @@
 name: hoppy-generator
-version: 0.7.0
+version: 0.7.1
 synopsis: C++ FFI generator - Code generator
 homepage: http://khumba.net/projects/hoppy
 license: AGPL-3
 license-file: LICENSE
 author: Bryan Gardiner <bog@khumba.net>
 maintainer: Bryan Gardiner <bog@khumba.net>
-copyright: Copyright 2015-2019 Bryan Gardiner
+copyright: Copyright 2015-2020 Bryan Gardiner
 category: Foreign
 build-type: Simple
 cabal-version: >=1.10
diff --git a/src/Foreign/Hoppy/Generator/Common.hs b/src/Foreign/Hoppy/Generator/Common.hs
--- a/src/Foreign/Hoppy/Generator/Common.hs
+++ b/src/Foreign/Hoppy/Generator/Common.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
@@ -47,6 +47,9 @@
 #endif
 import Control.Exception (evaluate)
 import Control.Monad (when)
+#if !MIN_VERSION_base(4,13,0)
+import Control.Monad.Fail (MonadFail)
+#endif
 import Data.Char (toLower, toUpper)
 import qualified Data.List as L
 import qualified Data.Map as M
@@ -69,7 +72,7 @@
 fromEitherM = flip either return
 
 -- | @maybeFail s x = maybe (fail s) x@
-maybeFail :: Monad m => String -> Maybe a -> m a
+maybeFail :: MonadFail m => String -> Maybe a -> m a
 maybeFail = fromMaybeM . fail
 
 -- | @whileJust_ gen act@ runs @act@ on values generated from @gen@ until @gen@
diff --git a/src/Foreign/Hoppy/Generator/Common/Consume.hs b/src/Foreign/Hoppy/Generator/Common/Consume.hs
--- a/src/Foreign/Hoppy/Generator/Common/Consume.hs
+++ b/src/Foreign/Hoppy/Generator/Common/Consume.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Compiler.hs b/src/Foreign/Hoppy/Generator/Compiler.hs
--- a/src/Foreign/Hoppy/Generator/Compiler.hs
+++ b/src/Foreign/Hoppy/Generator/Compiler.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Hook.hs b/src/Foreign/Hoppy/Generator/Hook.hs
--- a/src/Foreign/Hoppy/Generator/Hook.hs
+++ b/src/Foreign/Hoppy/Generator/Hook.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
@@ -15,6 +15,8 @@
 -- You should have received a copy of the GNU Affero General Public License
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+{-# LANGUAGE CPP #-}
+
 -- | Hooks for controlling various parts of generators.
 module Foreign.Hoppy.Generator.Hook (
   Hooks (..),
@@ -40,7 +42,9 @@
 import Control.Monad.Writer (execWriter, tell)
 import Data.ByteString.Lazy (ByteString, hPut)
 import Data.ByteString.Builder (stringUtf8, toLazyByteString)
+#if !MIN_VERSION_base(4,12,0)
 import Data.List (splitAt)
+#endif
 import qualified Data.Map as M
 import Data.Maybe (isJust, listToMaybe, mapMaybe)
 import qualified Data.Set as S
diff --git a/src/Foreign/Hoppy/Generator/Hook.hs-boot b/src/Foreign/Hoppy/Generator/Hook.hs-boot
--- a/src/Foreign/Hoppy/Generator/Hook.hs-boot
+++ b/src/Foreign/Hoppy/Generator/Hook.hs-boot
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Language/Cpp.hs b/src/Foreign/Hoppy/Generator/Language/Cpp.hs
--- a/src/Foreign/Hoppy/Generator/Language/Cpp.hs
+++ b/src/Foreign/Hoppy/Generator/Language/Cpp.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Language/Cpp.hs-boot b/src/Foreign/Hoppy/Generator/Language/Cpp.hs-boot
--- a/src/Foreign/Hoppy/Generator/Language/Cpp.hs-boot
+++ b/src/Foreign/Hoppy/Generator/Language/Cpp.hs-boot
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Language/Cpp/Internal.hs b/src/Foreign/Hoppy/Generator/Language/Cpp/Internal.hs
--- a/src/Foreign/Hoppy/Generator/Language/Cpp/Internal.hs
+++ b/src/Foreign/Hoppy/Generator/Language/Cpp/Internal.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Language/Haskell.hs b/src/Foreign/Hoppy/Generator/Language/Haskell.hs
--- a/src/Foreign/Hoppy/Generator/Language/Haskell.hs
+++ b/src/Foreign/Hoppy/Generator/Language/Haskell.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Language/Haskell.hs-boot b/src/Foreign/Hoppy/Generator/Language/Haskell.hs-boot
--- a/src/Foreign/Hoppy/Generator/Language/Haskell.hs-boot
+++ b/src/Foreign/Hoppy/Generator/Language/Haskell.hs-boot
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Language/Haskell/Internal.hs b/src/Foreign/Hoppy/Generator/Language/Haskell/Internal.hs
--- a/src/Foreign/Hoppy/Generator/Language/Haskell/Internal.hs
+++ b/src/Foreign/Hoppy/Generator/Language/Haskell/Internal.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
@@ -47,7 +47,6 @@
 import qualified Data.Set as S
 import Foreign.Hoppy.Generator.Common
 import Foreign.Hoppy.Generator.Spec
-import Foreign.Hoppy.Generator.Spec.Class (toHsDataTypeName)
 import Foreign.Hoppy.Generator.Language.Haskell
 import System.FilePath ((<.>), pathSeparator)
 
diff --git a/src/Foreign/Hoppy/Generator/Main.hs b/src/Foreign/Hoppy/Generator/Main.hs
--- a/src/Foreign/Hoppy/Generator/Main.hs
+++ b/src/Foreign/Hoppy/Generator/Main.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Override.hs b/src/Foreign/Hoppy/Generator/Override.hs
--- a/src/Foreign/Hoppy/Generator/Override.hs
+++ b/src/Foreign/Hoppy/Generator/Override.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Spec.hs b/src/Foreign/Hoppy/Generator/Spec.hs
--- a/src/Foreign/Hoppy/Generator/Spec.hs
+++ b/src/Foreign/Hoppy/Generator/Spec.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Spec/Base.hs b/src/Foreign/Hoppy/Generator/Spec/Base.hs
--- a/src/Foreign/Hoppy/Generator/Spec/Base.hs
+++ b/src/Foreign/Hoppy/Generator/Spec/Base.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
@@ -111,12 +111,13 @@
   Type (..),
   normalizeType,
   stripConst,
+  stripToGc,
   Scoped (..),
   isScoped,
   -- * Functions and parameters
   Constness (..), constNegate,
   Purity (..),
-  Parameter, parameterType, parameterName,
+  Parameter, parameterType, onParameterType, parameterName,
   IsParameter (..), toParameters,
   np, (~:),
   -- * Conversions
@@ -1192,6 +1193,12 @@
   Internal_TConst t' -> stripConst t'
   _ -> t
 
+-- | Strips a leading 'Internal_TToGc' off of a type.
+stripToGc :: Type -> Type
+stripToGc t = case t of
+  Internal_TToGc t' -> t'
+  _ -> t
+
 -- | Indicates whether an entity is scoped or unscoped.
 --
 -- This is used to distinguish unscoped enums (@enum@) or scoped ones (@enum
@@ -1253,6 +1260,7 @@
     , parameterName = Nothing
     }
 
+-- | Maps a function over a parameter's type.
 onParameterType :: (Type -> Type) -> (Parameter -> Parameter)
 onParameterType f p = p { parameterType = f $ parameterType p }
 
diff --git a/src/Foreign/Hoppy/Generator/Spec/Base.hs-boot b/src/Foreign/Hoppy/Generator/Spec/Base.hs-boot
--- a/src/Foreign/Hoppy/Generator/Spec/Base.hs-boot
+++ b/src/Foreign/Hoppy/Generator/Spec/Base.hs-boot
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Spec/Callback.hs b/src/Foreign/Hoppy/Generator/Spec/Callback.hs
--- a/src/Foreign/Hoppy/Generator/Spec/Callback.hs
+++ b/src/Foreign/Hoppy/Generator/Spec/Callback.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Spec/Callback.hs-boot b/src/Foreign/Hoppy/Generator/Spec/Callback.hs-boot
--- a/src/Foreign/Hoppy/Generator/Spec/Callback.hs-boot
+++ b/src/Foreign/Hoppy/Generator/Spec/Callback.hs-boot
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Spec/Class.hs b/src/Foreign/Hoppy/Generator/Spec/Class.hs
--- a/src/Foreign/Hoppy/Generator/Spec/Class.hs
+++ b/src/Foreign/Hoppy/Generator/Spec/Class.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Spec/Class.hs-boot b/src/Foreign/Hoppy/Generator/Spec/Class.hs-boot
--- a/src/Foreign/Hoppy/Generator/Spec/Class.hs-boot
+++ b/src/Foreign/Hoppy/Generator/Spec/Class.hs-boot
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Spec/ClassFeature.hs b/src/Foreign/Hoppy/Generator/Spec/ClassFeature.hs
--- a/src/Foreign/Hoppy/Generator/Spec/ClassFeature.hs
+++ b/src/Foreign/Hoppy/Generator/Spec/ClassFeature.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Spec/Conversion.hs b/src/Foreign/Hoppy/Generator/Spec/Conversion.hs
--- a/src/Foreign/Hoppy/Generator/Spec/Conversion.hs
+++ b/src/Foreign/Hoppy/Generator/Spec/Conversion.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Spec/Enum.hs b/src/Foreign/Hoppy/Generator/Spec/Enum.hs
--- a/src/Foreign/Hoppy/Generator/Spec/Enum.hs
+++ b/src/Foreign/Hoppy/Generator/Spec/Enum.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Spec/Enum.hs-boot b/src/Foreign/Hoppy/Generator/Spec/Enum.hs-boot
--- a/src/Foreign/Hoppy/Generator/Spec/Enum.hs-boot
+++ b/src/Foreign/Hoppy/Generator/Spec/Enum.hs-boot
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Spec/Function.hs b/src/Foreign/Hoppy/Generator/Spec/Function.hs
--- a/src/Foreign/Hoppy/Generator/Spec/Function.hs
+++ b/src/Foreign/Hoppy/Generator/Spec/Function.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Spec/Function.hs-boot b/src/Foreign/Hoppy/Generator/Spec/Function.hs-boot
--- a/src/Foreign/Hoppy/Generator/Spec/Function.hs-boot
+++ b/src/Foreign/Hoppy/Generator/Spec/Function.hs-boot
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Spec/Variable.hs b/src/Foreign/Hoppy/Generator/Spec/Variable.hs
--- a/src/Foreign/Hoppy/Generator/Spec/Variable.hs
+++ b/src/Foreign/Hoppy/Generator/Spec/Variable.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Types.hs b/src/Foreign/Hoppy/Generator/Types.hs
--- a/src/Foreign/Hoppy/Generator/Types.hs
+++ b/src/Foreign/Hoppy/Generator/Types.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Util.hs b/src/Foreign/Hoppy/Generator/Util.hs
--- a/src/Foreign/Hoppy/Generator/Util.hs
+++ b/src/Foreign/Hoppy/Generator/Util.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
diff --git a/src/Foreign/Hoppy/Generator/Version.hs b/src/Foreign/Hoppy/Generator/Version.hs
--- a/src/Foreign/Hoppy/Generator/Version.hs
+++ b/src/Foreign/Hoppy/Generator/Version.hs
@@ -1,6 +1,6 @@
 -- This file is part of Hoppy.
 --
--- Copyright 2015-2019 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2020 Bryan Gardiner <bog@khumba.net>
 --
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU Affero General Public License as published by
