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-2016 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2017 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.3.0
+version: 0.3.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-2016 Bryan Gardiner
+copyright: Copyright 2015-2017 Bryan Gardiner
 category: Foreign
 build-type: Simple
 cabal-version: >=1.10
@@ -42,7 +42,7 @@
   build-depends:
       base >=4.7 && <5
     , containers >=0.5 && <0.6
-    , directory >=1.2 && <1.3
+    , directory >=1.2 && <1.4
     , filepath >=1.3 && <1.5
     , haskell-src >=1.0 && <1.1
     , mtl >=2.1 && <2.3
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-2016 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2017 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/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-2016 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2017 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
@@ -532,7 +532,7 @@
             -- the heap and let the foreign language manage that value.
             Internal_TObj cls -> objToHeapT cls
             _ -> t'
-      sayArgRead dir (n, cppType, typeToCType newCppType)
+      sayArgRead dir (n, newCppType, typeToCType newCppType)
 
   _ -> convertDefault
 
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-2016 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2017 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
@@ -699,7 +699,17 @@
       FromCpp -> do
         addImports $ mconcat [hsImport1 "Prelude" "(>>=)",
                               hsImportForRuntime]
-        saysLn ["HoppyFHR.toGc ", fromVar, " >>= \\", toVar, " ->"]
+        ctorName <-
+          maybe (throwError $ tToGcInvalidFormErrorMessage Nothing t')
+                (toHsDataCtorName Unmanaged Nonconst) $
+          case stripConst t' of
+            Internal_TObj cls -> Just cls
+            Internal_TRef (Internal_TConst (Internal_TObj cls)) -> Just cls
+            Internal_TRef (Internal_TObj cls) -> Just cls
+            Internal_TPtr (Internal_TConst (Internal_TObj cls)) -> Just cls
+            Internal_TPtr (Internal_TObj cls) -> Just cls
+            _ -> Nothing
+        saysLn ["HoppyFHR.toGc (", ctorName, " ", fromVar, ") >>= \\", toVar, " ->"]
     Internal_TConst t' -> sayArgProcessing dir t' fromVar toVar
   where noConversion = saysLn ["let ", toVar, " = ", fromVar, " in"]
         sayCoerceIntegral = do
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-2016 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2017 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 2016 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2016-2017 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-2016 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2017 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 2016 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2016-2017 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-2016 Bryan Gardiner <bog@khumba.net>
+-- Copyright 2015-2017 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
