diff --git a/hs-bindgen/fixtures/anonymous.hs b/hs-bindgen/fixtures/anonymous.hs
index 95780668..71dbecd9 100644
--- a/hs-bindgen/fixtures/anonymous.hs
+++ b/hs-bindgen/fixtures/anonymous.hs
@@ -1,10 +1,10 @@
-DeclData (Struct {structName = "CS1c", structConstr = "MkCS1c", structFields = ("cS1c_a",HsPrimType HsPrimCInt) ::: ("cS1c_b",HsPrimType HsPrimCInt) ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CS1c", structConstr = "MkCS1c", structFields = ("cS1c_a",HsPrimType HsPrimCInt) ::: ("cS1c_b",HsPrimType HsPrimCInt) ::: VNil}) (StorableInstance {storableSizeOf = 8, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS1c", structConstr = "MkCS1c", structFields = ("cS1c_a",HsPrimType HsPrimCInt) ::: ("cS1c_b",HsPrimType HsPrimCInt) ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 4]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS1c", structConstr = "MkCS1c", structFields = ("cS1c_a",HsPrimType HsPrimCInt) ::: ("cS1c_b",HsPrimType HsPrimCInt) ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 4 1])))}))
-DeclData (Struct {structName = "CS1", structConstr = "MkCS1", structFields = ("cS1_c",HsTypRef "CS1c") ::: ("cS1_d",HsPrimType HsPrimCInt) ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CS1", structConstr = "MkCS1", structFields = ("cS1_c",HsTypRef "CS1c") ::: ("cS1_d",HsPrimType HsPrimCInt) ::: VNil}) (StorableInstance {storableSizeOf = 12, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS1", structConstr = "MkCS1", structFields = ("cS1_c",HsTypRef "CS1c") ::: ("cS1_d",HsPrimType HsPrimCInt) ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 8]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS1", structConstr = "MkCS1", structFields = ("cS1_c",HsTypRef "CS1c") ::: ("cS1_d",HsPrimType HsPrimCInt) ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 8 1])))}))
-DeclData (Struct {structName = "CS2innerdeep", structConstr = "MkCS2innerdeep", structFields = ("cS2innerdeep_b",HsPrimType HsPrimCInt) ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CS2innerdeep", structConstr = "MkCS2innerdeep", structFields = ("cS2innerdeep_b",HsPrimType HsPrimCInt) ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS2innerdeep", structConstr = "MkCS2innerdeep", structFields = ("cS2innerdeep_b",HsPrimType HsPrimCInt) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS2innerdeep", structConstr = "MkCS2innerdeep", structFields = ("cS2innerdeep_b",HsPrimType HsPrimCInt) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
-DeclData (Struct {structName = "CS2inner", structConstr = "MkCS2inner", structFields = ("cS2inner_a",HsPrimType HsPrimCInt) ::: ("cS2inner_deep",HsTypRef "CS2innerdeep") ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CS2inner", structConstr = "MkCS2inner", structFields = ("cS2inner_a",HsPrimType HsPrimCInt) ::: ("cS2inner_deep",HsTypRef "CS2innerdeep") ::: VNil}) (StorableInstance {storableSizeOf = 8, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS2inner", structConstr = "MkCS2inner", structFields = ("cS2inner_a",HsPrimType HsPrimCInt) ::: ("cS2inner_deep",HsTypRef "CS2innerdeep") ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 4]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS2inner", structConstr = "MkCS2inner", structFields = ("cS2inner_a",HsPrimType HsPrimCInt) ::: ("cS2inner_deep",HsTypRef "CS2innerdeep") ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 4 1])))}))
-DeclData (Struct {structName = "CS2", structConstr = "MkCS2", structFields = ("cS2_inner",HsTypRef "CS2inner") ::: ("cS2_d",HsPrimType HsPrimCInt) ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CS2", structConstr = "MkCS2", structFields = ("cS2_inner",HsTypRef "CS2inner") ::: ("cS2_d",HsPrimType HsPrimCInt) ::: VNil}) (StorableInstance {storableSizeOf = 12, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS2", structConstr = "MkCS2", structFields = ("cS2_inner",HsTypRef "CS2inner") ::: ("cS2_d",HsPrimType HsPrimCInt) ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 8]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS2", structConstr = "MkCS2", structFields = ("cS2_inner",HsTypRef "CS2inner") ::: ("cS2_d",HsPrimType HsPrimCInt) ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 8 1])))}))
+DeclData (Struct {structName = "CS1c", structConstr = "MkCS1c", structFields = Field {fieldName = "cS1c_a", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cS1c_b", fieldType = HsPrimType HsPrimCInt} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CS1c", structConstr = "MkCS1c", structFields = Field {fieldName = "cS1c_a", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cS1c_b", fieldType = HsPrimType HsPrimCInt} ::: VNil}) (StorableInstance {storableSizeOf = 8, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS1c", structConstr = "MkCS1c", structFields = Field {fieldName = "cS1c_a", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cS1c_b", fieldType = HsPrimType HsPrimCInt} ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 4]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS1c", structConstr = "MkCS1c", structFields = Field {fieldName = "cS1c_a", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cS1c_b", fieldType = HsPrimType HsPrimCInt} ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 4 1])))}))
+DeclData (Struct {structName = "CS1", structConstr = "MkCS1", structFields = Field {fieldName = "cS1_c", fieldType = HsTypRef "CS1c"} ::: Field {fieldName = "cS1_d", fieldType = HsPrimType HsPrimCInt} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CS1", structConstr = "MkCS1", structFields = Field {fieldName = "cS1_c", fieldType = HsTypRef "CS1c"} ::: Field {fieldName = "cS1_d", fieldType = HsPrimType HsPrimCInt} ::: VNil}) (StorableInstance {storableSizeOf = 12, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS1", structConstr = "MkCS1", structFields = Field {fieldName = "cS1_c", fieldType = HsTypRef "CS1c"} ::: Field {fieldName = "cS1_d", fieldType = HsPrimType HsPrimCInt} ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 8]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS1", structConstr = "MkCS1", structFields = Field {fieldName = "cS1_c", fieldType = HsTypRef "CS1c"} ::: Field {fieldName = "cS1_d", fieldType = HsPrimType HsPrimCInt} ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 8 1])))}))
+DeclData (Struct {structName = "CS2innerdeep", structConstr = "MkCS2innerdeep", structFields = Field {fieldName = "cS2innerdeep_b", fieldType = HsPrimType HsPrimCInt} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CS2innerdeep", structConstr = "MkCS2innerdeep", structFields = Field {fieldName = "cS2innerdeep_b", fieldType = HsPrimType HsPrimCInt} ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS2innerdeep", structConstr = "MkCS2innerdeep", structFields = Field {fieldName = "cS2innerdeep_b", fieldType = HsPrimType HsPrimCInt} ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS2innerdeep", structConstr = "MkCS2innerdeep", structFields = Field {fieldName = "cS2innerdeep_b", fieldType = HsPrimType HsPrimCInt} ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
+DeclData (Struct {structName = "CS2inner", structConstr = "MkCS2inner", structFields = Field {fieldName = "cS2inner_a", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cS2inner_deep", fieldType = HsTypRef "CS2innerdeep"} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CS2inner", structConstr = "MkCS2inner", structFields = Field {fieldName = "cS2inner_a", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cS2inner_deep", fieldType = HsTypRef "CS2innerdeep"} ::: VNil}) (StorableInstance {storableSizeOf = 8, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS2inner", structConstr = "MkCS2inner", structFields = Field {fieldName = "cS2inner_a", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cS2inner_deep", fieldType = HsTypRef "CS2innerdeep"} ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 4]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS2inner", structConstr = "MkCS2inner", structFields = Field {fieldName = "cS2inner_a", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cS2inner_deep", fieldType = HsTypRef "CS2innerdeep"} ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 4 1])))}))
+DeclData (Struct {structName = "CS2", structConstr = "MkCS2", structFields = Field {fieldName = "cS2_inner", fieldType = HsTypRef "CS2inner"} ::: Field {fieldName = "cS2_d", fieldType = HsPrimType HsPrimCInt} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CS2", structConstr = "MkCS2", structFields = Field {fieldName = "cS2_inner", fieldType = HsTypRef "CS2inner"} ::: Field {fieldName = "cS2_d", fieldType = HsPrimType HsPrimCInt} ::: VNil}) (StorableInstance {storableSizeOf = 12, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS2", structConstr = "MkCS2", structFields = Field {fieldName = "cS2_inner", fieldType = HsTypRef "CS2inner"} ::: Field {fieldName = "cS2_d", fieldType = HsPrimType HsPrimCInt} ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 8]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS2", structConstr = "MkCS2", structFields = Field {fieldName = "cS2_inner", fieldType = HsTypRef "CS2inner"} ::: Field {fieldName = "cS2_d", fieldType = HsPrimType HsPrimCInt} ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 8 1])))}))
diff --git a/hs-bindgen/fixtures/bool.hs b/hs-bindgen/fixtures/bool.hs
index b2321eb7..05774d53 100644
--- a/hs-bindgen/fixtures/bool.hs
+++ b/hs-bindgen/fixtures/bool.hs
@@ -1,7 +1,7 @@
-DeclNewtype (Newtype {newtypeName = "CBOOL", newtypeConstr = "MkCBOOL", newtypeField = "unCBOOL", newtypeType = HsPrimType HsPrimCBool})
-DeclData (Struct {structName = "CBools1", structConstr = "MkCBools1", structFields = ("cBools1_x",HsPrimType HsPrimCBool) ::: ("cBools1_y",HsPrimType HsPrimCBool) ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CBools1", structConstr = "MkCBools1", structFields = ("cBools1_x",HsPrimType HsPrimCBool) ::: ("cBools1_y",HsPrimType HsPrimCBool) ::: VNil}) (StorableInstance {storableSizeOf = 2, storableAlignment = 1, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CBools1", structConstr = "MkCBools1", structFields = ("cBools1_x",HsPrimType HsPrimCBool) ::: ("cBools1_y",HsPrimType HsPrimCBool) ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 1]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CBools1", structConstr = "MkCBools1", structFields = ("cBools1_x",HsPrimType HsPrimCBool) ::: ("cBools1_y",HsPrimType HsPrimCBool) ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 1 1])))}))
-DeclData (Struct {structName = "CBools2", structConstr = "MkCBools2", structFields = ("cBools2_x",HsPrimType HsPrimCBool) ::: ("cBools2_y",HsPrimType HsPrimCBool) ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CBools2", structConstr = "MkCBools2", structFields = ("cBools2_x",HsPrimType HsPrimCBool) ::: ("cBools2_y",HsPrimType HsPrimCBool) ::: VNil}) (StorableInstance {storableSizeOf = 2, storableAlignment = 1, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CBools2", structConstr = "MkCBools2", structFields = ("cBools2_x",HsPrimType HsPrimCBool) ::: ("cBools2_y",HsPrimType HsPrimCBool) ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 1]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CBools2", structConstr = "MkCBools2", structFields = ("cBools2_x",HsPrimType HsPrimCBool) ::: ("cBools2_y",HsPrimType HsPrimCBool) ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 1 1])))}))
-DeclData (Struct {structName = "CBools3", structConstr = "MkCBools3", structFields = ("cBools3_x",HsTypRef "CBOOL") ::: ("cBools3_y",HsTypRef "CBOOL") ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CBools3", structConstr = "MkCBools3", structFields = ("cBools3_x",HsTypRef "CBOOL") ::: ("cBools3_y",HsTypRef "CBOOL") ::: VNil}) (StorableInstance {storableSizeOf = 2, storableAlignment = 1, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CBools3", structConstr = "MkCBools3", structFields = ("cBools3_x",HsTypRef "CBOOL") ::: ("cBools3_y",HsTypRef "CBOOL") ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 1]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CBools3", structConstr = "MkCBools3", structFields = ("cBools3_x",HsTypRef "CBOOL") ::: ("cBools3_y",HsTypRef "CBOOL") ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 1 1])))}))
+DeclNewtype (Newtype {newtypeName = "CBOOL", newtypeConstr = "MkCBOOL", newtypeField = Field {fieldName = "unCBOOL", fieldType = HsPrimType HsPrimCBool}})
+DeclData (Struct {structName = "CBools1", structConstr = "MkCBools1", structFields = Field {fieldName = "cBools1_x", fieldType = HsPrimType HsPrimCBool} ::: Field {fieldName = "cBools1_y", fieldType = HsPrimType HsPrimCBool} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CBools1", structConstr = "MkCBools1", structFields = Field {fieldName = "cBools1_x", fieldType = HsPrimType HsPrimCBool} ::: Field {fieldName = "cBools1_y", fieldType = HsPrimType HsPrimCBool} ::: VNil}) (StorableInstance {storableSizeOf = 2, storableAlignment = 1, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CBools1", structConstr = "MkCBools1", structFields = Field {fieldName = "cBools1_x", fieldType = HsPrimType HsPrimCBool} ::: Field {fieldName = "cBools1_y", fieldType = HsPrimType HsPrimCBool} ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 1]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CBools1", structConstr = "MkCBools1", structFields = Field {fieldName = "cBools1_x", fieldType = HsPrimType HsPrimCBool} ::: Field {fieldName = "cBools1_y", fieldType = HsPrimType HsPrimCBool} ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 1 1])))}))
+DeclData (Struct {structName = "CBools2", structConstr = "MkCBools2", structFields = Field {fieldName = "cBools2_x", fieldType = HsPrimType HsPrimCBool} ::: Field {fieldName = "cBools2_y", fieldType = HsPrimType HsPrimCBool} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CBools2", structConstr = "MkCBools2", structFields = Field {fieldName = "cBools2_x", fieldType = HsPrimType HsPrimCBool} ::: Field {fieldName = "cBools2_y", fieldType = HsPrimType HsPrimCBool} ::: VNil}) (StorableInstance {storableSizeOf = 2, storableAlignment = 1, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CBools2", structConstr = "MkCBools2", structFields = Field {fieldName = "cBools2_x", fieldType = HsPrimType HsPrimCBool} ::: Field {fieldName = "cBools2_y", fieldType = HsPrimType HsPrimCBool} ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 1]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CBools2", structConstr = "MkCBools2", structFields = Field {fieldName = "cBools2_x", fieldType = HsPrimType HsPrimCBool} ::: Field {fieldName = "cBools2_y", fieldType = HsPrimType HsPrimCBool} ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 1 1])))}))
+DeclData (Struct {structName = "CBools3", structConstr = "MkCBools3", structFields = Field {fieldName = "cBools3_x", fieldType = HsTypRef "CBOOL"} ::: Field {fieldName = "cBools3_y", fieldType = HsTypRef "CBOOL"} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CBools3", structConstr = "MkCBools3", structFields = Field {fieldName = "cBools3_x", fieldType = HsTypRef "CBOOL"} ::: Field {fieldName = "cBools3_y", fieldType = HsTypRef "CBOOL"} ::: VNil}) (StorableInstance {storableSizeOf = 2, storableAlignment = 1, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CBools3", structConstr = "MkCBools3", structFields = Field {fieldName = "cBools3_x", fieldType = HsTypRef "CBOOL"} ::: Field {fieldName = "cBools3_y", fieldType = HsTypRef "CBOOL"} ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 1]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CBools3", structConstr = "MkCBools3", structFields = Field {fieldName = "cBools3_x", fieldType = HsTypRef "CBOOL"} ::: Field {fieldName = "cBools3_y", fieldType = HsTypRef "CBOOL"} ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 1 1])))}))
diff --git a/hs-bindgen/fixtures/distilled_lib_1.hs b/hs-bindgen/fixtures/distilled_lib_1.hs
index 942c5b2c..2570de8c 100644
--- a/hs-bindgen/fixtures/distilled_lib_1.hs
+++ b/hs-bindgen/fixtures/distilled_lib_1.hs
@@ -6,33 +6,33 @@ DeclVar (VarDecl {varDeclName = "a_DEFINE_1", varDeclType = ForallTy {forallTySi
 DeclVar (VarDecl {varDeclName = "a_DEFINE_2", varDeclType = ForallTy {forallTySize = 1, forallTyBinders = "a" ::: VNil, forallTy = QuantTy {quantTyCts = [ClassTy Integral (TyVarTy 0 ::: VNil)], quantTyBody = TyVarTy 0}}, varDeclBody = VarDeclIntegral 2 HsPrimCInt})
 DeclVar (VarDecl {varDeclName = "tWO_ARGS", varDeclType = ForallTy {forallTySize = 1, forallTyBinders = "a" ::: VNil, forallTy = QuantTy {quantTyCts = [ClassTy Integral (TyVarTy 0 ::: VNil)], quantTyBody = TyVarTy 0}}, varDeclBody = VarDeclIntegral 13398 HsPrimCInt})
 DeclForeignImport (ForeignImportDecl {foreignImportName = "some_fun", foreignImportType = HsFun (HsPtr (HsTypRef "CATypeT")) (HsFun (HsTypRef "CUint32T") (HsFun (HsPrimType HsPrimVoid) (HsIO (HsTypRef "CInt32T")))), foreignImportOrigName = "some_fun", foreignImportHeader = "distilled_lib_1.h"})
-DeclData (Struct {structName = "CAnotherTypedefStructT", structConstr = "MkCAnotherTypedefStructT", structFields = ("cAnotherTypedefStructT_foo",HsPrimType HsPrimCInt) ::: ("cAnotherTypedefStructT_bar",HsPrimType HsPrimCChar) ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CAnotherTypedefStructT", structConstr = "MkCAnotherTypedefStructT", structFields = ("cAnotherTypedefStructT_foo",HsPrimType HsPrimCInt) ::: ("cAnotherTypedefStructT_bar",HsPrimType HsPrimCChar) ::: VNil}) (StorableInstance {storableSizeOf = 8, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CAnotherTypedefStructT", structConstr = "MkCAnotherTypedefStructT", structFields = ("cAnotherTypedefStructT_foo",HsPrimType HsPrimCInt) ::: ("cAnotherTypedefStructT_bar",HsPrimType HsPrimCChar) ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 4]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CAnotherTypedefStructT", structConstr = "MkCAnotherTypedefStructT", structFields = ("cAnotherTypedefStructT_foo",HsPrimType HsPrimCInt) ::: ("cAnotherTypedefStructT_bar",HsPrimType HsPrimCChar) ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 4 1])))}))
-DeclNewtype (Newtype {newtypeName = "CAnotherTypedefEnumE", newtypeConstr = "MkCAnotherTypedefEnumE", newtypeField = "unCAnotherTypedefEnumE", newtypeType = HsPrimType HsPrimCUInt})
-DeclInstance (InstanceStorable (Struct {structName = "CAnotherTypedefEnumE", structConstr = "MkCAnotherTypedefEnumE", structFields = ("unCAnotherTypedefEnumE",HsPrimType HsPrimCUInt) ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CAnotherTypedefEnumE", structConstr = "MkCAnotherTypedefEnumE", structFields = ("unCAnotherTypedefEnumE",HsPrimType HsPrimCUInt) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CAnotherTypedefEnumE", structConstr = "MkCAnotherTypedefEnumE", structFields = ("unCAnotherTypedefEnumE",HsPrimType HsPrimCUInt) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
+DeclData (Struct {structName = "CAnotherTypedefStructT", structConstr = "MkCAnotherTypedefStructT", structFields = Field {fieldName = "cAnotherTypedefStructT_foo", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cAnotherTypedefStructT_bar", fieldType = HsPrimType HsPrimCChar} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CAnotherTypedefStructT", structConstr = "MkCAnotherTypedefStructT", structFields = Field {fieldName = "cAnotherTypedefStructT_foo", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cAnotherTypedefStructT_bar", fieldType = HsPrimType HsPrimCChar} ::: VNil}) (StorableInstance {storableSizeOf = 8, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CAnotherTypedefStructT", structConstr = "MkCAnotherTypedefStructT", structFields = Field {fieldName = "cAnotherTypedefStructT_foo", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cAnotherTypedefStructT_bar", fieldType = HsPrimType HsPrimCChar} ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 4]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CAnotherTypedefStructT", structConstr = "MkCAnotherTypedefStructT", structFields = Field {fieldName = "cAnotherTypedefStructT_foo", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cAnotherTypedefStructT_bar", fieldType = HsPrimType HsPrimCChar} ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 4 1])))}))
+DeclNewtype (Newtype {newtypeName = "CAnotherTypedefEnumE", newtypeConstr = "MkCAnotherTypedefEnumE", newtypeField = Field {fieldName = "unCAnotherTypedefEnumE", fieldType = HsPrimType HsPrimCUInt}})
+DeclInstance (InstanceStorable (Struct {structName = "CAnotherTypedefEnumE", structConstr = "MkCAnotherTypedefEnumE", structFields = Field {fieldName = "unCAnotherTypedefEnumE", fieldType = HsPrimType HsPrimCUInt} ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CAnotherTypedefEnumE", structConstr = "MkCAnotherTypedefEnumE", structFields = Field {fieldName = "unCAnotherTypedefEnumE", fieldType = HsPrimType HsPrimCUInt} ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CAnotherTypedefEnumE", structConstr = "MkCAnotherTypedefEnumE", structFields = Field {fieldName = "unCAnotherTypedefEnumE", fieldType = HsPrimType HsPrimCUInt} ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
 DeclPatSyn (PatSyn {patSynName = "MkCFOO", patSynType = "CAnotherTypedefEnumE", patSynConstr = "MkCAnotherTypedefEnumE", patSynValue = 0})
 DeclPatSyn (PatSyn {patSynName = "MkCBAR", patSynType = "CAnotherTypedefEnumE", patSynConstr = "MkCAnotherTypedefEnumE", patSynValue = 1})
-DeclNewtype (Newtype {newtypeName = "CATypeT", newtypeConstr = "MkCATypeT", newtypeField = "unCATypeT", newtypeType = HsPrimType HsPrimCInt})
+DeclNewtype (Newtype {newtypeName = "CATypeT", newtypeConstr = "MkCATypeT", newtypeField = Field {fieldName = "unCATypeT", fieldType = HsPrimType HsPrimCInt}})
 DeclNewtypeInstance Storable "CATypeT"
-DeclNewtype (Newtype {newtypeName = "CVarT", newtypeConstr = "MkCVarT", newtypeField = "unCVarT", newtypeType = HsPrimType HsPrimCInt})
+DeclNewtype (Newtype {newtypeName = "CVarT", newtypeConstr = "MkCVarT", newtypeField = Field {fieldName = "unCVarT", fieldType = HsPrimType HsPrimCInt}})
 DeclNewtypeInstance Storable "CVarT"
-DeclNewtype (Newtype {newtypeName = "CUint8T", newtypeConstr = "MkCUint8T", newtypeField = "unCUint8T", newtypeType = HsPrimType HsPrimCSChar})
+DeclNewtype (Newtype {newtypeName = "CUint8T", newtypeConstr = "MkCUint8T", newtypeField = Field {fieldName = "unCUint8T", fieldType = HsPrimType HsPrimCSChar}})
 DeclNewtypeInstance Storable "CUint8T"
-DeclNewtype (Newtype {newtypeName = "CUint16T", newtypeConstr = "MkCUint16T", newtypeField = "unCUint16T", newtypeType = HsPrimType HsPrimCUShort})
+DeclNewtype (Newtype {newtypeName = "CUint16T", newtypeConstr = "MkCUint16T", newtypeField = Field {fieldName = "unCUint16T", fieldType = HsPrimType HsPrimCUShort}})
 DeclNewtypeInstance Storable "CUint16T"
-DeclNewtype (Newtype {newtypeName = "CUint32T", newtypeConstr = "MkCUint32T", newtypeField = "unCUint32T", newtypeType = HsPrimType HsPrimCUInt})
+DeclNewtype (Newtype {newtypeName = "CUint32T", newtypeConstr = "MkCUint32T", newtypeField = Field {fieldName = "unCUint32T", fieldType = HsPrimType HsPrimCUInt}})
 DeclNewtypeInstance Storable "CUint32T"
-DeclData (Struct {structName = "CATypedefStruct", structConstr = "MkCATypedefStruct", structFields = ("cATypedefStruct_field_0",HsPrimType HsPrimCBool) ::: ("cATypedefStruct_field_1",HsTypRef "CUint8T") ::: ("cATypedefStruct_field_2",HsTypRef "CUint16T") ::: ("cATypedefStruct_field_3",HsTypRef "CUint32T") ::: ("cATypedefStruct_field_4",HsTypRef "CAnotherTypedefStructT") ::: ("cATypedefStruct_field_5",HsPtr (HsTypRef "CAnotherTypedefStructT")) ::: ("cATypedefStruct_field_6",HsPtr (HsPrimType HsPrimVoid)) ::: ("cATypedefStruct_field_7",HsConstArray 7 (HsTypRef "CUint32T")) ::: ("cATypedefStruct_field_8",HsTypRef "CAnotherTypedefEnumE") ::: ("cATypedefStruct_field_9",HsTypRef "CAnotherTypedefEnumE") ::: ("cATypedefStruct_field_10",HsTypRef "CAnotherTypedefEnumE") ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CATypedefStruct", structConstr = "MkCATypedefStruct", structFields = ("cATypedefStruct_field_0",HsPrimType HsPrimCBool) ::: ("cATypedefStruct_field_1",HsTypRef "CUint8T") ::: ("cATypedefStruct_field_2",HsTypRef "CUint16T") ::: ("cATypedefStruct_field_3",HsTypRef "CUint32T") ::: ("cATypedefStruct_field_4",HsTypRef "CAnotherTypedefStructT") ::: ("cATypedefStruct_field_5",HsPtr (HsTypRef "CAnotherTypedefStructT")) ::: ("cATypedefStruct_field_6",HsPtr (HsPrimType HsPrimVoid)) ::: ("cATypedefStruct_field_7",HsConstArray 7 (HsTypRef "CUint32T")) ::: ("cATypedefStruct_field_8",HsTypRef "CAnotherTypedefEnumE") ::: ("cATypedefStruct_field_9",HsTypRef "CAnotherTypedefEnumE") ::: ("cATypedefStruct_field_10",HsTypRef "CAnotherTypedefEnumE") ::: VNil}) (StorableInstance {storableSizeOf = 140, storableAlignment = 1, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CATypedefStruct", structConstr = "MkCATypedefStruct", structFields = ("cATypedefStruct_field_0",HsPrimType HsPrimCBool) ::: ("cATypedefStruct_field_1",HsTypRef "CUint8T") ::: ("cATypedefStruct_field_2",HsTypRef "CUint16T") ::: ("cATypedefStruct_field_3",HsTypRef "CUint32T") ::: ("cATypedefStruct_field_4",HsTypRef "CAnotherTypedefStructT") ::: ("cATypedefStruct_field_5",HsPtr (HsTypRef "CAnotherTypedefStructT")) ::: ("cATypedefStruct_field_6",HsPtr (HsPrimType HsPrimVoid)) ::: ("cATypedefStruct_field_7",HsConstArray 7 (HsTypRef "CUint32T")) ::: ("cATypedefStruct_field_8",HsTypRef "CAnotherTypedefEnumE") ::: ("cATypedefStruct_field_9",HsTypRef "CAnotherTypedefEnumE") ::: ("cATypedefStruct_field_10",HsTypRef "CAnotherTypedefEnumE") ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 1,PeekByteOff 0 2,PeekByteOff 0 4,PeekByteOff 0 8,PeekByteOff 0 16,PeekByteOff 0 24,PeekByteOff 0 32,PeekByteOff 0 60,PeekByteOff 0 64,PeekByteOff 0 80]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CATypedefStruct", structConstr = "MkCATypedefStruct", structFields = ("cATypedefStruct_field_0",HsPrimType HsPrimCBool) ::: ("cATypedefStruct_field_1",HsTypRef "CUint8T") ::: ("cATypedefStruct_field_2",HsTypRef "CUint16T") ::: ("cATypedefStruct_field_3",HsTypRef "CUint32T") ::: ("cATypedefStruct_field_4",HsTypRef "CAnotherTypedefStructT") ::: ("cATypedefStruct_field_5",HsPtr (HsTypRef "CAnotherTypedefStructT")) ::: ("cATypedefStruct_field_6",HsPtr (HsPrimType HsPrimVoid)) ::: ("cATypedefStruct_field_7",HsConstArray 7 (HsTypRef "CUint32T")) ::: ("cATypedefStruct_field_8",HsTypRef "CAnotherTypedefEnumE") ::: ("cATypedefStruct_field_9",HsTypRef "CAnotherTypedefEnumE") ::: ("cATypedefStruct_field_10",HsTypRef "CAnotherTypedefEnumE") ::: VNil}) 11 (Seq [PokeByteOff 12 0 0,PokeByteOff 12 1 1,PokeByteOff 12 2 2,PokeByteOff 12 4 3,PokeByteOff 12 8 4,PokeByteOff 12 16 5,PokeByteOff 12 24 6,PokeByteOff 12 32 7,PokeByteOff 12 60 8,PokeByteOff 12 64 9,PokeByteOff 12 80 10])))}))
-DeclNewtype (Newtype {newtypeName = "CATypedefStructT", newtypeConstr = "MkCATypedefStructT", newtypeField = "unCATypedefStructT", newtypeType = HsTypRef "CATypedefStruct"})
+DeclData (Struct {structName = "CATypedefStruct", structConstr = "MkCATypedefStruct", structFields = Field {fieldName = "cATypedefStruct_field_0", fieldType = HsPrimType HsPrimCBool} ::: Field {fieldName = "cATypedefStruct_field_1", fieldType = HsTypRef "CUint8T"} ::: Field {fieldName = "cATypedefStruct_field_2", fieldType = HsTypRef "CUint16T"} ::: Field {fieldName = "cATypedefStruct_field_3", fieldType = HsTypRef "CUint32T"} ::: Field {fieldName = "cATypedefStruct_field_4", fieldType = HsTypRef "CAnotherTypedefStructT"} ::: Field {fieldName = "cATypedefStruct_field_5", fieldType = HsPtr (HsTypRef "CAnotherTypedefStructT")} ::: Field {fieldName = "cATypedefStruct_field_6", fieldType = HsPtr (HsPrimType HsPrimVoid)} ::: Field {fieldName = "cATypedefStruct_field_7", fieldType = HsConstArray 7 (HsTypRef "CUint32T")} ::: Field {fieldName = "cATypedefStruct_field_8", fieldType = HsTypRef "CAnotherTypedefEnumE"} ::: Field {fieldName = "cATypedefStruct_field_9", fieldType = HsTypRef "CAnotherTypedefEnumE"} ::: Field {fieldName = "cATypedefStruct_field_10", fieldType = HsTypRef "CAnotherTypedefEnumE"} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CATypedefStruct", structConstr = "MkCATypedefStruct", structFields = Field {fieldName = "cATypedefStruct_field_0", fieldType = HsPrimType HsPrimCBool} ::: Field {fieldName = "cATypedefStruct_field_1", fieldType = HsTypRef "CUint8T"} ::: Field {fieldName = "cATypedefStruct_field_2", fieldType = HsTypRef "CUint16T"} ::: Field {fieldName = "cATypedefStruct_field_3", fieldType = HsTypRef "CUint32T"} ::: Field {fieldName = "cATypedefStruct_field_4", fieldType = HsTypRef "CAnotherTypedefStructT"} ::: Field {fieldName = "cATypedefStruct_field_5", fieldType = HsPtr (HsTypRef "CAnotherTypedefStructT")} ::: Field {fieldName = "cATypedefStruct_field_6", fieldType = HsPtr (HsPrimType HsPrimVoid)} ::: Field {fieldName = "cATypedefStruct_field_7", fieldType = HsConstArray 7 (HsTypRef "CUint32T")} ::: Field {fieldName = "cATypedefStruct_field_8", fieldType = HsTypRef "CAnotherTypedefEnumE"} ::: Field {fieldName = "cATypedefStruct_field_9", fieldType = HsTypRef "CAnotherTypedefEnumE"} ::: Field {fieldName = "cATypedefStruct_field_10", fieldType = HsTypRef "CAnotherTypedefEnumE"} ::: VNil}) (StorableInstance {storableSizeOf = 140, storableAlignment = 1, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CATypedefStruct", structConstr = "MkCATypedefStruct", structFields = Field {fieldName = "cATypedefStruct_field_0", fieldType = HsPrimType HsPrimCBool} ::: Field {fieldName = "cATypedefStruct_field_1", fieldType = HsTypRef "CUint8T"} ::: Field {fieldName = "cATypedefStruct_field_2", fieldType = HsTypRef "CUint16T"} ::: Field {fieldName = "cATypedefStruct_field_3", fieldType = HsTypRef "CUint32T"} ::: Field {fieldName = "cATypedefStruct_field_4", fieldType = HsTypRef "CAnotherTypedefStructT"} ::: Field {fieldName = "cATypedefStruct_field_5", fieldType = HsPtr (HsTypRef "CAnotherTypedefStructT")} ::: Field {fieldName = "cATypedefStruct_field_6", fieldType = HsPtr (HsPrimType HsPrimVoid)} ::: Field {fieldName = "cATypedefStruct_field_7", fieldType = HsConstArray 7 (HsTypRef "CUint32T")} ::: Field {fieldName = "cATypedefStruct_field_8", fieldType = HsTypRef "CAnotherTypedefEnumE"} ::: Field {fieldName = "cATypedefStruct_field_9", fieldType = HsTypRef "CAnotherTypedefEnumE"} ::: Field {fieldName = "cATypedefStruct_field_10", fieldType = HsTypRef "CAnotherTypedefEnumE"} ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 1,PeekByteOff 0 2,PeekByteOff 0 4,PeekByteOff 0 8,PeekByteOff 0 16,PeekByteOff 0 24,PeekByteOff 0 32,PeekByteOff 0 60,PeekByteOff 0 64,PeekByteOff 0 80]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CATypedefStruct", structConstr = "MkCATypedefStruct", structFields = Field {fieldName = "cATypedefStruct_field_0", fieldType = HsPrimType HsPrimCBool} ::: Field {fieldName = "cATypedefStruct_field_1", fieldType = HsTypRef "CUint8T"} ::: Field {fieldName = "cATypedefStruct_field_2", fieldType = HsTypRef "CUint16T"} ::: Field {fieldName = "cATypedefStruct_field_3", fieldType = HsTypRef "CUint32T"} ::: Field {fieldName = "cATypedefStruct_field_4", fieldType = HsTypRef "CAnotherTypedefStructT"} ::: Field {fieldName = "cATypedefStruct_field_5", fieldType = HsPtr (HsTypRef "CAnotherTypedefStructT")} ::: Field {fieldName = "cATypedefStruct_field_6", fieldType = HsPtr (HsPrimType HsPrimVoid)} ::: Field {fieldName = "cATypedefStruct_field_7", fieldType = HsConstArray 7 (HsTypRef "CUint32T")} ::: Field {fieldName = "cATypedefStruct_field_8", fieldType = HsTypRef "CAnotherTypedefEnumE"} ::: Field {fieldName = "cATypedefStruct_field_9", fieldType = HsTypRef "CAnotherTypedefEnumE"} ::: Field {fieldName = "cATypedefStruct_field_10", fieldType = HsTypRef "CAnotherTypedefEnumE"} ::: VNil}) 11 (Seq [PokeByteOff 12 0 0,PokeByteOff 12 1 1,PokeByteOff 12 2 2,PokeByteOff 12 4 3,PokeByteOff 12 8 4,PokeByteOff 12 16 5,PokeByteOff 12 24 6,PokeByteOff 12 32 7,PokeByteOff 12 60 8,PokeByteOff 12 64 9,PokeByteOff 12 80 10])))}))
+DeclNewtype (Newtype {newtypeName = "CATypedefStructT", newtypeConstr = "MkCATypedefStructT", newtypeField = Field {fieldName = "unCATypedefStructT", fieldType = HsTypRef "CATypedefStruct"}})
 DeclNewtypeInstance Storable "CATypedefStructT"
-DeclNewtype (Newtype {newtypeName = "CATypedefEnumE", newtypeConstr = "MkCATypedefEnumE", newtypeField = "unCATypedefEnumE", newtypeType = HsPrimType HsPrimCSChar})
-DeclInstance (InstanceStorable (Struct {structName = "CATypedefEnumE", structConstr = "MkCATypedefEnumE", structFields = ("unCATypedefEnumE",HsPrimType HsPrimCSChar) ::: VNil}) (StorableInstance {storableSizeOf = 1, storableAlignment = 1, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CATypedefEnumE", structConstr = "MkCATypedefEnumE", structFields = ("unCATypedefEnumE",HsPrimType HsPrimCSChar) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CATypedefEnumE", structConstr = "MkCATypedefEnumE", structFields = ("unCATypedefEnumE",HsPrimType HsPrimCSChar) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
+DeclNewtype (Newtype {newtypeName = "CATypedefEnumE", newtypeConstr = "MkCATypedefEnumE", newtypeField = Field {fieldName = "unCATypedefEnumE", fieldType = HsPrimType HsPrimCSChar}})
+DeclInstance (InstanceStorable (Struct {structName = "CATypedefEnumE", structConstr = "MkCATypedefEnumE", structFields = Field {fieldName = "unCATypedefEnumE", fieldType = HsPrimType HsPrimCSChar} ::: VNil}) (StorableInstance {storableSizeOf = 1, storableAlignment = 1, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CATypedefEnumE", structConstr = "MkCATypedefEnumE", structFields = Field {fieldName = "unCATypedefEnumE", fieldType = HsPrimType HsPrimCSChar} ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CATypedefEnumE", structConstr = "MkCATypedefEnumE", structFields = Field {fieldName = "unCATypedefEnumE", fieldType = HsPrimType HsPrimCSChar} ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
 DeclPatSyn (PatSyn {patSynName = "MkCENUMCASE0", patSynType = "CATypedefEnumE", patSynConstr = "MkCATypedefEnumE", patSynValue = 0})
 DeclPatSyn (PatSyn {patSynName = "MkCENUMCASE1", patSynType = "CATypedefEnumE", patSynConstr = "MkCATypedefEnumE", patSynValue = 1})
 DeclPatSyn (PatSyn {patSynName = "MkCENUMCASE2", patSynType = "CATypedefEnumE", patSynConstr = "MkCATypedefEnumE", patSynValue = 2})
 DeclPatSyn (PatSyn {patSynName = "MkCENUMCASE3", patSynType = "CATypedefEnumE", patSynConstr = "MkCATypedefEnumE", patSynValue = 3})
-DeclNewtype (Newtype {newtypeName = "CInt32T", newtypeConstr = "MkCInt32T", newtypeField = "unCInt32T", newtypeType = HsPrimType HsPrimCInt})
+DeclNewtype (Newtype {newtypeName = "CInt32T", newtypeConstr = "MkCInt32T", newtypeField = Field {fieldName = "unCInt32T", fieldType = HsPrimType HsPrimCInt}})
 DeclNewtypeInstance Storable "CInt32T"
-DeclNewtype (Newtype {newtypeName = "CCallbackT", newtypeConstr = "MkCCallbackT", newtypeField = "unCCallbackT", newtypeType = HsFunPtr (HsFun (HsPtr (HsPrimType HsPrimVoid)) (HsFun (HsTypRef "CUint32T") (HsIO (HsTypRef "CUint32T"))))})
+DeclNewtype (Newtype {newtypeName = "CCallbackT", newtypeConstr = "MkCCallbackT", newtypeField = Field {fieldName = "unCCallbackT", fieldType = HsFunPtr (HsFun (HsPtr (HsPrimType HsPrimVoid)) (HsFun (HsTypRef "CUint32T") (HsIO (HsTypRef "CUint32T"))))}})
 DeclNewtypeInstance Storable "CCallbackT"
diff --git a/hs-bindgen/fixtures/enums.hs b/hs-bindgen/fixtures/enums.hs
index b116ba9a..60af5ae0 100644
--- a/hs-bindgen/fixtures/enums.hs
+++ b/hs-bindgen/fixtures/enums.hs
@@ -1,36 +1,36 @@
-DeclNewtype (Newtype {newtypeName = "CFirst", newtypeConstr = "MkCFirst", newtypeField = "unCFirst", newtypeType = HsPrimType HsPrimCUInt})
-DeclInstance (InstanceStorable (Struct {structName = "CFirst", structConstr = "MkCFirst", structFields = ("unCFirst",HsPrimType HsPrimCUInt) ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CFirst", structConstr = "MkCFirst", structFields = ("unCFirst",HsPrimType HsPrimCUInt) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CFirst", structConstr = "MkCFirst", structFields = ("unCFirst",HsPrimType HsPrimCUInt) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
+DeclNewtype (Newtype {newtypeName = "CFirst", newtypeConstr = "MkCFirst", newtypeField = Field {fieldName = "unCFirst", fieldType = HsPrimType HsPrimCUInt}})
+DeclInstance (InstanceStorable (Struct {structName = "CFirst", structConstr = "MkCFirst", structFields = Field {fieldName = "unCFirst", fieldType = HsPrimType HsPrimCUInt} ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CFirst", structConstr = "MkCFirst", structFields = Field {fieldName = "unCFirst", fieldType = HsPrimType HsPrimCUInt} ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CFirst", structConstr = "MkCFirst", structFields = Field {fieldName = "unCFirst", fieldType = HsPrimType HsPrimCUInt} ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
 DeclPatSyn (PatSyn {patSynName = "MkCFIRST1", patSynType = "CFirst", patSynConstr = "MkCFirst", patSynValue = 0})
 DeclPatSyn (PatSyn {patSynName = "MkCFIRST2", patSynType = "CFirst", patSynConstr = "MkCFirst", patSynValue = 1})
-DeclNewtype (Newtype {newtypeName = "CSecond", newtypeConstr = "MkCSecond", newtypeField = "unCSecond", newtypeType = HsPrimType HsPrimCInt})
-DeclInstance (InstanceStorable (Struct {structName = "CSecond", structConstr = "MkCSecond", structFields = ("unCSecond",HsPrimType HsPrimCInt) ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CSecond", structConstr = "MkCSecond", structFields = ("unCSecond",HsPrimType HsPrimCInt) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CSecond", structConstr = "MkCSecond", structFields = ("unCSecond",HsPrimType HsPrimCInt) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
+DeclNewtype (Newtype {newtypeName = "CSecond", newtypeConstr = "MkCSecond", newtypeField = Field {fieldName = "unCSecond", fieldType = HsPrimType HsPrimCInt}})
+DeclInstance (InstanceStorable (Struct {structName = "CSecond", structConstr = "MkCSecond", structFields = Field {fieldName = "unCSecond", fieldType = HsPrimType HsPrimCInt} ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CSecond", structConstr = "MkCSecond", structFields = Field {fieldName = "unCSecond", fieldType = HsPrimType HsPrimCInt} ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CSecond", structConstr = "MkCSecond", structFields = Field {fieldName = "unCSecond", fieldType = HsPrimType HsPrimCInt} ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
 DeclPatSyn (PatSyn {patSynName = "MkCSECONDA", patSynType = "CSecond", patSynConstr = "MkCSecond", patSynValue = -1})
 DeclPatSyn (PatSyn {patSynName = "MkCSECONDB", patSynType = "CSecond", patSynConstr = "MkCSecond", patSynValue = 0})
 DeclPatSyn (PatSyn {patSynName = "MkCSECONDC", patSynType = "CSecond", patSynConstr = "MkCSecond", patSynValue = 1})
-DeclNewtype (Newtype {newtypeName = "CSame", newtypeConstr = "MkCSame", newtypeField = "unCSame", newtypeType = HsPrimType HsPrimCUInt})
-DeclInstance (InstanceStorable (Struct {structName = "CSame", structConstr = "MkCSame", structFields = ("unCSame",HsPrimType HsPrimCUInt) ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CSame", structConstr = "MkCSame", structFields = ("unCSame",HsPrimType HsPrimCUInt) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CSame", structConstr = "MkCSame", structFields = ("unCSame",HsPrimType HsPrimCUInt) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
+DeclNewtype (Newtype {newtypeName = "CSame", newtypeConstr = "MkCSame", newtypeField = Field {fieldName = "unCSame", fieldType = HsPrimType HsPrimCUInt}})
+DeclInstance (InstanceStorable (Struct {structName = "CSame", structConstr = "MkCSame", structFields = Field {fieldName = "unCSame", fieldType = HsPrimType HsPrimCUInt} ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CSame", structConstr = "MkCSame", structFields = Field {fieldName = "unCSame", fieldType = HsPrimType HsPrimCUInt} ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CSame", structConstr = "MkCSame", structFields = Field {fieldName = "unCSame", fieldType = HsPrimType HsPrimCUInt} ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
 DeclPatSyn (PatSyn {patSynName = "MkCSAMEA", patSynType = "CSame", patSynConstr = "MkCSame", patSynValue = 1})
 DeclPatSyn (PatSyn {patSynName = "MkCSAMEB", patSynType = "CSame", patSynConstr = "MkCSame", patSynValue = 1})
-DeclNewtype (Newtype {newtypeName = "CPackad", newtypeConstr = "MkCPackad", newtypeField = "unCPackad", newtypeType = HsPrimType HsPrimCSChar})
-DeclInstance (InstanceStorable (Struct {structName = "CPackad", structConstr = "MkCPackad", structFields = ("unCPackad",HsPrimType HsPrimCSChar) ::: VNil}) (StorableInstance {storableSizeOf = 1, storableAlignment = 1, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CPackad", structConstr = "MkCPackad", structFields = ("unCPackad",HsPrimType HsPrimCSChar) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CPackad", structConstr = "MkCPackad", structFields = ("unCPackad",HsPrimType HsPrimCSChar) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
+DeclNewtype (Newtype {newtypeName = "CPackad", newtypeConstr = "MkCPackad", newtypeField = Field {fieldName = "unCPackad", fieldType = HsPrimType HsPrimCSChar}})
+DeclInstance (InstanceStorable (Struct {structName = "CPackad", structConstr = "MkCPackad", structFields = Field {fieldName = "unCPackad", fieldType = HsPrimType HsPrimCSChar} ::: VNil}) (StorableInstance {storableSizeOf = 1, storableAlignment = 1, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CPackad", structConstr = "MkCPackad", structFields = Field {fieldName = "unCPackad", fieldType = HsPrimType HsPrimCSChar} ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CPackad", structConstr = "MkCPackad", structFields = Field {fieldName = "unCPackad", fieldType = HsPrimType HsPrimCSChar} ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
 DeclPatSyn (PatSyn {patSynName = "MkCPACKEDA", patSynType = "CPackad", patSynConstr = "MkCPackad", patSynValue = 0})
 DeclPatSyn (PatSyn {patSynName = "MkCPACKEDB", patSynType = "CPackad", patSynConstr = "MkCPackad", patSynValue = 1})
 DeclPatSyn (PatSyn {patSynName = "MkCPACKEDC", patSynType = "CPackad", patSynConstr = "MkCPackad", patSynValue = 2})
-DeclNewtype (Newtype {newtypeName = "CEnumA", newtypeConstr = "MkCEnumA", newtypeField = "unCEnumA", newtypeType = HsPrimType HsPrimCUInt})
-DeclInstance (InstanceStorable (Struct {structName = "CEnumA", structConstr = "MkCEnumA", structFields = ("unCEnumA",HsPrimType HsPrimCUInt) ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CEnumA", structConstr = "MkCEnumA", structFields = ("unCEnumA",HsPrimType HsPrimCUInt) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CEnumA", structConstr = "MkCEnumA", structFields = ("unCEnumA",HsPrimType HsPrimCUInt) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
+DeclNewtype (Newtype {newtypeName = "CEnumA", newtypeConstr = "MkCEnumA", newtypeField = Field {fieldName = "unCEnumA", fieldType = HsPrimType HsPrimCUInt}})
+DeclInstance (InstanceStorable (Struct {structName = "CEnumA", structConstr = "MkCEnumA", structFields = Field {fieldName = "unCEnumA", fieldType = HsPrimType HsPrimCUInt} ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CEnumA", structConstr = "MkCEnumA", structFields = Field {fieldName = "unCEnumA", fieldType = HsPrimType HsPrimCUInt} ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CEnumA", structConstr = "MkCEnumA", structFields = Field {fieldName = "unCEnumA", fieldType = HsPrimType HsPrimCUInt} ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
 DeclPatSyn (PatSyn {patSynName = "MkCAFOO", patSynType = "CEnumA", patSynConstr = "MkCEnumA", patSynValue = 0})
 DeclPatSyn (PatSyn {patSynName = "MkCABAR", patSynType = "CEnumA", patSynConstr = "MkCEnumA", patSynValue = 1})
-DeclNewtype (Newtype {newtypeName = "CEnumB", newtypeConstr = "MkCEnumB", newtypeField = "unCEnumB", newtypeType = HsPrimType HsPrimCUInt})
-DeclInstance (InstanceStorable (Struct {structName = "CEnumB", structConstr = "MkCEnumB", structFields = ("unCEnumB",HsPrimType HsPrimCUInt) ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CEnumB", structConstr = "MkCEnumB", structFields = ("unCEnumB",HsPrimType HsPrimCUInt) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CEnumB", structConstr = "MkCEnumB", structFields = ("unCEnumB",HsPrimType HsPrimCUInt) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
+DeclNewtype (Newtype {newtypeName = "CEnumB", newtypeConstr = "MkCEnumB", newtypeField = Field {fieldName = "unCEnumB", fieldType = HsPrimType HsPrimCUInt}})
+DeclInstance (InstanceStorable (Struct {structName = "CEnumB", structConstr = "MkCEnumB", structFields = Field {fieldName = "unCEnumB", fieldType = HsPrimType HsPrimCUInt} ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CEnumB", structConstr = "MkCEnumB", structFields = Field {fieldName = "unCEnumB", fieldType = HsPrimType HsPrimCUInt} ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CEnumB", structConstr = "MkCEnumB", structFields = Field {fieldName = "unCEnumB", fieldType = HsPrimType HsPrimCUInt} ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
 DeclPatSyn (PatSyn {patSynName = "MkCBFOO", patSynType = "CEnumB", patSynConstr = "MkCEnumB", patSynValue = 0})
 DeclPatSyn (PatSyn {patSynName = "MkCBBAR", patSynType = "CEnumB", patSynConstr = "MkCEnumB", patSynValue = 1})
-DeclNewtype (Newtype {newtypeName = "CEnumC", newtypeConstr = "MkCEnumC", newtypeField = "unCEnumC", newtypeType = HsPrimType HsPrimCUInt})
-DeclInstance (InstanceStorable (Struct {structName = "CEnumC", structConstr = "MkCEnumC", structFields = ("unCEnumC",HsPrimType HsPrimCUInt) ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CEnumC", structConstr = "MkCEnumC", structFields = ("unCEnumC",HsPrimType HsPrimCUInt) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CEnumC", structConstr = "MkCEnumC", structFields = ("unCEnumC",HsPrimType HsPrimCUInt) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
+DeclNewtype (Newtype {newtypeName = "CEnumC", newtypeConstr = "MkCEnumC", newtypeField = Field {fieldName = "unCEnumC", fieldType = HsPrimType HsPrimCUInt}})
+DeclInstance (InstanceStorable (Struct {structName = "CEnumC", structConstr = "MkCEnumC", structFields = Field {fieldName = "unCEnumC", fieldType = HsPrimType HsPrimCUInt} ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CEnumC", structConstr = "MkCEnumC", structFields = Field {fieldName = "unCEnumC", fieldType = HsPrimType HsPrimCUInt} ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CEnumC", structConstr = "MkCEnumC", structFields = Field {fieldName = "unCEnumC", fieldType = HsPrimType HsPrimCUInt} ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
 DeclPatSyn (PatSyn {patSynName = "MkCCFOO", patSynType = "CEnumC", patSynConstr = "MkCEnumC", patSynValue = 0})
 DeclPatSyn (PatSyn {patSynName = "MkCCBAR", patSynType = "CEnumC", patSynConstr = "MkCEnumC", patSynValue = 1})
-DeclNewtype (Newtype {newtypeName = "CEnumD", newtypeConstr = "MkCEnumD", newtypeField = "unCEnumD", newtypeType = HsPrimType HsPrimCUInt})
-DeclInstance (InstanceStorable (Struct {structName = "CEnumD", structConstr = "MkCEnumD", structFields = ("unCEnumD",HsPrimType HsPrimCUInt) ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CEnumD", structConstr = "MkCEnumD", structFields = ("unCEnumD",HsPrimType HsPrimCUInt) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CEnumD", structConstr = "MkCEnumD", structFields = ("unCEnumD",HsPrimType HsPrimCUInt) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
+DeclNewtype (Newtype {newtypeName = "CEnumD", newtypeConstr = "MkCEnumD", newtypeField = Field {fieldName = "unCEnumD", fieldType = HsPrimType HsPrimCUInt}})
+DeclInstance (InstanceStorable (Struct {structName = "CEnumD", structConstr = "MkCEnumD", structFields = Field {fieldName = "unCEnumD", fieldType = HsPrimType HsPrimCUInt} ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CEnumD", structConstr = "MkCEnumD", structFields = Field {fieldName = "unCEnumD", fieldType = HsPrimType HsPrimCUInt} ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CEnumD", structConstr = "MkCEnumD", structFields = Field {fieldName = "unCEnumD", fieldType = HsPrimType HsPrimCUInt} ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
 DeclPatSyn (PatSyn {patSynName = "MkCDFOO", patSynType = "CEnumD", patSynConstr = "MkCEnumD", patSynValue = 0})
 DeclPatSyn (PatSyn {patSynName = "MkCDBAR", patSynType = "CEnumD", patSynConstr = "MkCEnumD", patSynValue = 1})
-DeclNewtype (Newtype {newtypeName = "CEnumDT", newtypeConstr = "MkCEnumDT", newtypeField = "unCEnumDT", newtypeType = HsTypRef "CEnumD"})
+DeclNewtype (Newtype {newtypeName = "CEnumDT", newtypeConstr = "MkCEnumDT", newtypeField = Field {fieldName = "unCEnumDT", fieldType = HsTypRef "CEnumD"}})
 DeclNewtypeInstance Storable "CEnumDT"
diff --git a/hs-bindgen/fixtures/fixedarray.hs b/hs-bindgen/fixtures/fixedarray.hs
index e5ba950b..327f7846 100644
--- a/hs-bindgen/fixtures/fixedarray.hs
+++ b/hs-bindgen/fixtures/fixedarray.hs
@@ -1,2 +1,2 @@
-DeclNewtype (Newtype {newtypeName = "CTriple", newtypeConstr = "MkCTriple", newtypeField = "unCTriple", newtypeType = HsConstArray 3 (HsPrimType HsPrimCInt)})
+DeclNewtype (Newtype {newtypeName = "CTriple", newtypeConstr = "MkCTriple", newtypeField = Field {fieldName = "unCTriple", fieldType = HsConstArray 3 (HsPrimType HsPrimCInt)}})
 DeclNewtypeInstance Storable "CTriple"
diff --git a/hs-bindgen/fixtures/fixedwidth.hs b/hs-bindgen/fixtures/fixedwidth.hs
index 572201a5..b78d7216 100644
--- a/hs-bindgen/fixtures/fixedwidth.hs
+++ b/hs-bindgen/fixtures/fixedwidth.hs
@@ -1,6 +1,6 @@
-DeclNewtype (Newtype {newtypeName = "CUint64T", newtypeConstr = "MkCUint64T", newtypeField = "unCUint64T", newtypeType = HsPrimType HsPrimCULong})
+DeclNewtype (Newtype {newtypeName = "CUint64T", newtypeConstr = "MkCUint64T", newtypeField = Field {fieldName = "unCUint64T", fieldType = HsPrimType HsPrimCULong}})
 DeclNewtypeInstance Storable "CUint64T"
-DeclNewtype (Newtype {newtypeName = "CUint32T", newtypeConstr = "MkCUint32T", newtypeField = "unCUint32T", newtypeType = HsPrimType HsPrimCUInt})
+DeclNewtype (Newtype {newtypeName = "CUint32T", newtypeConstr = "MkCUint32T", newtypeField = Field {fieldName = "unCUint32T", fieldType = HsPrimType HsPrimCUInt}})
 DeclNewtypeInstance Storable "CUint32T"
-DeclData (Struct {structName = "CFoo", structConstr = "MkCFoo", structFields = ("cFoo_sixty_four",HsTypRef "CUint64T") ::: ("cFoo_thirty_two",HsTypRef "CUint32T") ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CFoo", structConstr = "MkCFoo", structFields = ("cFoo_sixty_four",HsTypRef "CUint64T") ::: ("cFoo_thirty_two",HsTypRef "CUint32T") ::: VNil}) (StorableInstance {storableSizeOf = 16, storableAlignment = 8, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CFoo", structConstr = "MkCFoo", structFields = ("cFoo_sixty_four",HsTypRef "CUint64T") ::: ("cFoo_thirty_two",HsTypRef "CUint32T") ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 8]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CFoo", structConstr = "MkCFoo", structFields = ("cFoo_sixty_four",HsTypRef "CUint64T") ::: ("cFoo_thirty_two",HsTypRef "CUint32T") ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 8 1])))}))
+DeclData (Struct {structName = "CFoo", structConstr = "MkCFoo", structFields = Field {fieldName = "cFoo_sixty_four", fieldType = HsTypRef "CUint64T"} ::: Field {fieldName = "cFoo_thirty_two", fieldType = HsTypRef "CUint32T"} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CFoo", structConstr = "MkCFoo", structFields = Field {fieldName = "cFoo_sixty_four", fieldType = HsTypRef "CUint64T"} ::: Field {fieldName = "cFoo_thirty_two", fieldType = HsTypRef "CUint32T"} ::: VNil}) (StorableInstance {storableSizeOf = 16, storableAlignment = 8, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CFoo", structConstr = "MkCFoo", structFields = Field {fieldName = "cFoo_sixty_four", fieldType = HsTypRef "CUint64T"} ::: Field {fieldName = "cFoo_thirty_two", fieldType = HsTypRef "CUint32T"} ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 8]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CFoo", structConstr = "MkCFoo", structFields = Field {fieldName = "cFoo_sixty_four", fieldType = HsTypRef "CUint64T"} ::: Field {fieldName = "cFoo_thirty_two", fieldType = HsTypRef "CUint32T"} ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 8 1])))}))
diff --git a/hs-bindgen/fixtures/forward_declaration.hs b/hs-bindgen/fixtures/forward_declaration.hs
index 5409059c..6d85d015 100644
--- a/hs-bindgen/fixtures/forward_declaration.hs
+++ b/hs-bindgen/fixtures/forward_declaration.hs
@@ -1,6 +1,6 @@
-DeclData (Struct {structName = "CS1", structConstr = "MkCS1", structFields = ("cS1_a",HsPrimType HsPrimCInt) ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CS1", structConstr = "MkCS1", structFields = ("cS1_a",HsPrimType HsPrimCInt) ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS1", structConstr = "MkCS1", structFields = ("cS1_a",HsPrimType HsPrimCInt) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS1", structConstr = "MkCS1", structFields = ("cS1_a",HsPrimType HsPrimCInt) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
-DeclNewtype (Newtype {newtypeName = "CS1T", newtypeConstr = "MkCS1T", newtypeField = "unCS1T", newtypeType = HsTypRef "CS1"})
+DeclData (Struct {structName = "CS1", structConstr = "MkCS1", structFields = Field {fieldName = "cS1_a", fieldType = HsPrimType HsPrimCInt} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CS1", structConstr = "MkCS1", structFields = Field {fieldName = "cS1_a", fieldType = HsPrimType HsPrimCInt} ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS1", structConstr = "MkCS1", structFields = Field {fieldName = "cS1_a", fieldType = HsPrimType HsPrimCInt} ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS1", structConstr = "MkCS1", structFields = Field {fieldName = "cS1_a", fieldType = HsPrimType HsPrimCInt} ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
+DeclNewtype (Newtype {newtypeName = "CS1T", newtypeConstr = "MkCS1T", newtypeField = Field {fieldName = "unCS1T", fieldType = HsTypRef "CS1"}})
 DeclNewtypeInstance Storable "CS1T"
-DeclData (Struct {structName = "CS2", structConstr = "MkCS2", structFields = ("cS2_a",HsPrimType HsPrimCInt) ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CS2", structConstr = "MkCS2", structFields = ("cS2_a",HsPrimType HsPrimCInt) ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS2", structConstr = "MkCS2", structFields = ("cS2_a",HsPrimType HsPrimCInt) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS2", structConstr = "MkCS2", structFields = ("cS2_a",HsPrimType HsPrimCInt) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
+DeclData (Struct {structName = "CS2", structConstr = "MkCS2", structFields = Field {fieldName = "cS2_a", fieldType = HsPrimType HsPrimCInt} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CS2", structConstr = "MkCS2", structFields = Field {fieldName = "cS2_a", fieldType = HsPrimType HsPrimCInt} ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS2", structConstr = "MkCS2", structFields = Field {fieldName = "cS2_a", fieldType = HsPrimType HsPrimCInt} ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS2", structConstr = "MkCS2", structFields = Field {fieldName = "cS2_a", fieldType = HsPrimType HsPrimCInt} ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
diff --git a/hs-bindgen/fixtures/nested_types.hs b/hs-bindgen/fixtures/nested_types.hs
index d0d6c48d..8eaab241 100644
--- a/hs-bindgen/fixtures/nested_types.hs
+++ b/hs-bindgen/fixtures/nested_types.hs
@@ -1,4 +1,4 @@
-DeclData (Struct {structName = "CFoo", structConstr = "MkCFoo", structFields = ("cFoo_i",HsPrimType HsPrimCInt) ::: ("cFoo_c",HsPrimType HsPrimCChar) ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CFoo", structConstr = "MkCFoo", structFields = ("cFoo_i",HsPrimType HsPrimCInt) ::: ("cFoo_c",HsPrimType HsPrimCChar) ::: VNil}) (StorableInstance {storableSizeOf = 8, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CFoo", structConstr = "MkCFoo", structFields = ("cFoo_i",HsPrimType HsPrimCInt) ::: ("cFoo_c",HsPrimType HsPrimCChar) ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 4]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CFoo", structConstr = "MkCFoo", structFields = ("cFoo_i",HsPrimType HsPrimCInt) ::: ("cFoo_c",HsPrimType HsPrimCChar) ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 4 1])))}))
-DeclData (Struct {structName = "CBar", structConstr = "MkCBar", structFields = ("cBar_foo1",HsTypRef "CFoo") ::: ("cBar_foo2",HsTypRef "CFoo") ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CBar", structConstr = "MkCBar", structFields = ("cBar_foo1",HsTypRef "CFoo") ::: ("cBar_foo2",HsTypRef "CFoo") ::: VNil}) (StorableInstance {storableSizeOf = 16, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CBar", structConstr = "MkCBar", structFields = ("cBar_foo1",HsTypRef "CFoo") ::: ("cBar_foo2",HsTypRef "CFoo") ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 8]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CBar", structConstr = "MkCBar", structFields = ("cBar_foo1",HsTypRef "CFoo") ::: ("cBar_foo2",HsTypRef "CFoo") ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 8 1])))}))
+DeclData (Struct {structName = "CFoo", structConstr = "MkCFoo", structFields = Field {fieldName = "cFoo_i", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cFoo_c", fieldType = HsPrimType HsPrimCChar} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CFoo", structConstr = "MkCFoo", structFields = Field {fieldName = "cFoo_i", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cFoo_c", fieldType = HsPrimType HsPrimCChar} ::: VNil}) (StorableInstance {storableSizeOf = 8, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CFoo", structConstr = "MkCFoo", structFields = Field {fieldName = "cFoo_i", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cFoo_c", fieldType = HsPrimType HsPrimCChar} ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 4]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CFoo", structConstr = "MkCFoo", structFields = Field {fieldName = "cFoo_i", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cFoo_c", fieldType = HsPrimType HsPrimCChar} ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 4 1])))}))
+DeclData (Struct {structName = "CBar", structConstr = "MkCBar", structFields = Field {fieldName = "cBar_foo1", fieldType = HsTypRef "CFoo"} ::: Field {fieldName = "cBar_foo2", fieldType = HsTypRef "CFoo"} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CBar", structConstr = "MkCBar", structFields = Field {fieldName = "cBar_foo1", fieldType = HsTypRef "CFoo"} ::: Field {fieldName = "cBar_foo2", fieldType = HsTypRef "CFoo"} ::: VNil}) (StorableInstance {storableSizeOf = 16, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CBar", structConstr = "MkCBar", structFields = Field {fieldName = "cBar_foo1", fieldType = HsTypRef "CFoo"} ::: Field {fieldName = "cBar_foo2", fieldType = HsTypRef "CFoo"} ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 8]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CBar", structConstr = "MkCBar", structFields = Field {fieldName = "cBar_foo1", fieldType = HsTypRef "CFoo"} ::: Field {fieldName = "cBar_foo2", fieldType = HsTypRef "CFoo"} ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 8 1])))}))
diff --git a/hs-bindgen/fixtures/opaque_declaration.hs b/hs-bindgen/fixtures/opaque_declaration.hs
index ecf70fdc..551d52fa 100644
--- a/hs-bindgen/fixtures/opaque_declaration.hs
+++ b/hs-bindgen/fixtures/opaque_declaration.hs
@@ -1,6 +1,6 @@
 DeclEmpty "CFoo"
-DeclData (Struct {structName = "CBar", structConstr = "MkCBar", structFields = ("cBar_ptrA",HsPtr (HsTypRef "CFoo")) ::: ("cBar_ptrB",HsPtr (HsTypRef "CBar")) ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CBar", structConstr = "MkCBar", structFields = ("cBar_ptrA",HsPtr (HsTypRef "CFoo")) ::: ("cBar_ptrB",HsPtr (HsTypRef "CBar")) ::: VNil}) (StorableInstance {storableSizeOf = 16, storableAlignment = 8, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CBar", structConstr = "MkCBar", structFields = ("cBar_ptrA",HsPtr (HsTypRef "CFoo")) ::: ("cBar_ptrB",HsPtr (HsTypRef "CBar")) ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 8]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CBar", structConstr = "MkCBar", structFields = ("cBar_ptrA",HsPtr (HsTypRef "CFoo")) ::: ("cBar_ptrB",HsPtr (HsTypRef "CBar")) ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 8 1])))}))
+DeclData (Struct {structName = "CBar", structConstr = "MkCBar", structFields = Field {fieldName = "cBar_ptrA", fieldType = HsPtr (HsTypRef "CFoo")} ::: Field {fieldName = "cBar_ptrB", fieldType = HsPtr (HsTypRef "CBar")} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CBar", structConstr = "MkCBar", structFields = Field {fieldName = "cBar_ptrA", fieldType = HsPtr (HsTypRef "CFoo")} ::: Field {fieldName = "cBar_ptrB", fieldType = HsPtr (HsTypRef "CBar")} ::: VNil}) (StorableInstance {storableSizeOf = 16, storableAlignment = 8, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CBar", structConstr = "MkCBar", structFields = Field {fieldName = "cBar_ptrA", fieldType = HsPtr (HsTypRef "CFoo")} ::: Field {fieldName = "cBar_ptrB", fieldType = HsPtr (HsTypRef "CBar")} ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 8]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CBar", structConstr = "MkCBar", structFields = Field {fieldName = "cBar_ptrA", fieldType = HsPtr (HsTypRef "CFoo")} ::: Field {fieldName = "cBar_ptrB", fieldType = HsPtr (HsTypRef "CBar")} ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 8 1])))}))
 DeclData (Struct {structName = "CBaz", structConstr = "MkCBaz", structFields = VNil})
 DeclInstance (InstanceStorable (Struct {structName = "CBaz", structConstr = "MkCBaz", structFields = VNil}) (StorableInstance {storableSizeOf = 0, storableAlignment = 1, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CBaz", structConstr = "MkCBaz", structFields = VNil})) []), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CBaz", structConstr = "MkCBaz", structFields = VNil}) 0 (Seq [])))}))
 DeclEmpty "CQuu"
diff --git a/hs-bindgen/fixtures/primitive_types.hs b/hs-bindgen/fixtures/primitive_types.hs
index 44652d04..8758a497 100644
--- a/hs-bindgen/fixtures/primitive_types.hs
+++ b/hs-bindgen/fixtures/primitive_types.hs
@@ -1,2 +1,2 @@
-DeclData (Struct {structName = "CPrimitive", structConstr = "MkCPrimitive", structFields = ("cPrimitive_c",HsPrimType HsPrimCChar) ::: ("cPrimitive_sc",HsPrimType HsPrimCSChar) ::: ("cPrimitive_uc",HsPrimType HsPrimCSChar) ::: ("cPrimitive_s",HsPrimType HsPrimCShort) ::: ("cPrimitive_si",HsPrimType HsPrimCShort) ::: ("cPrimitive_ss",HsPrimType HsPrimCShort) ::: ("cPrimitive_ssi",HsPrimType HsPrimCShort) ::: ("cPrimitive_us",HsPrimType HsPrimCUShort) ::: ("cPrimitive_usi",HsPrimType HsPrimCUShort) ::: ("cPrimitive_i",HsPrimType HsPrimCInt) ::: ("cPrimitive_s2",HsPrimType HsPrimCInt) ::: ("cPrimitive_si2",HsPrimType HsPrimCInt) ::: ("cPrimitive_u",HsPrimType HsPrimCUInt) ::: ("cPrimitive_ui",HsPrimType HsPrimCUInt) ::: ("cPrimitive_l",HsPrimType HsPrimCLong) ::: ("cPrimitive_li",HsPrimType HsPrimCLong) ::: ("cPrimitive_sl",HsPrimType HsPrimCLong) ::: ("cPrimitive_sli",HsPrimType HsPrimCLong) ::: ("cPrimitive_ul",HsPrimType HsPrimCULong) ::: ("cPrimitive_uli",HsPrimType HsPrimCULong) ::: ("cPrimitive_ll",HsPrimType HsPrimCLLong) ::: ("cPrimitive_lli",HsPrimType HsPrimCLLong) ::: ("cPrimitive_sll",HsPrimType HsPrimCLLong) ::: ("cPrimitive_slli",HsPrimType HsPrimCLLong) ::: ("cPrimitive_ull",HsPrimType HsPrimCULLong) ::: ("cPrimitive_ulli",HsPrimType HsPrimCULLong) ::: ("cPrimitive_f",HsPrimType HsPrimCFloat) ::: ("cPrimitive_d",HsPrimType HsPrimCDouble) ::: ("cPrimitive_ld",HsPrimType HsPrimCDouble) ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CPrimitive", structConstr = "MkCPrimitive", structFields = ("cPrimitive_c",HsPrimType HsPrimCChar) ::: ("cPrimitive_sc",HsPrimType HsPrimCSChar) ::: ("cPrimitive_uc",HsPrimType HsPrimCSChar) ::: ("cPrimitive_s",HsPrimType HsPrimCShort) ::: ("cPrimitive_si",HsPrimType HsPrimCShort) ::: ("cPrimitive_ss",HsPrimType HsPrimCShort) ::: ("cPrimitive_ssi",HsPrimType HsPrimCShort) ::: ("cPrimitive_us",HsPrimType HsPrimCUShort) ::: ("cPrimitive_usi",HsPrimType HsPrimCUShort) ::: ("cPrimitive_i",HsPrimType HsPrimCInt) ::: ("cPrimitive_s2",HsPrimType HsPrimCInt) ::: ("cPrimitive_si2",HsPrimType HsPrimCInt) ::: ("cPrimitive_u",HsPrimType HsPrimCUInt) ::: ("cPrimitive_ui",HsPrimType HsPrimCUInt) ::: ("cPrimitive_l",HsPrimType HsPrimCLong) ::: ("cPrimitive_li",HsPrimType HsPrimCLong) ::: ("cPrimitive_sl",HsPrimType HsPrimCLong) ::: ("cPrimitive_sli",HsPrimType HsPrimCLong) ::: ("cPrimitive_ul",HsPrimType HsPrimCULong) ::: ("cPrimitive_uli",HsPrimType HsPrimCULong) ::: ("cPrimitive_ll",HsPrimType HsPrimCLLong) ::: ("cPrimitive_lli",HsPrimType HsPrimCLLong) ::: ("cPrimitive_sll",HsPrimType HsPrimCLLong) ::: ("cPrimitive_slli",HsPrimType HsPrimCLLong) ::: ("cPrimitive_ull",HsPrimType HsPrimCULLong) ::: ("cPrimitive_ulli",HsPrimType HsPrimCULLong) ::: ("cPrimitive_f",HsPrimType HsPrimCFloat) ::: ("cPrimitive_d",HsPrimType HsPrimCDouble) ::: ("cPrimitive_ld",HsPrimType HsPrimCDouble) ::: VNil}) (StorableInstance {storableSizeOf = 176, storableAlignment = 16, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CPrimitive", structConstr = "MkCPrimitive", structFields = ("cPrimitive_c",HsPrimType HsPrimCChar) ::: ("cPrimitive_sc",HsPrimType HsPrimCSChar) ::: ("cPrimitive_uc",HsPrimType HsPrimCSChar) ::: ("cPrimitive_s",HsPrimType HsPrimCShort) ::: ("cPrimitive_si",HsPrimType HsPrimCShort) ::: ("cPrimitive_ss",HsPrimType HsPrimCShort) ::: ("cPrimitive_ssi",HsPrimType HsPrimCShort) ::: ("cPrimitive_us",HsPrimType HsPrimCUShort) ::: ("cPrimitive_usi",HsPrimType HsPrimCUShort) ::: ("cPrimitive_i",HsPrimType HsPrimCInt) ::: ("cPrimitive_s2",HsPrimType HsPrimCInt) ::: ("cPrimitive_si2",HsPrimType HsPrimCInt) ::: ("cPrimitive_u",HsPrimType HsPrimCUInt) ::: ("cPrimitive_ui",HsPrimType HsPrimCUInt) ::: ("cPrimitive_l",HsPrimType HsPrimCLong) ::: ("cPrimitive_li",HsPrimType HsPrimCLong) ::: ("cPrimitive_sl",HsPrimType HsPrimCLong) ::: ("cPrimitive_sli",HsPrimType HsPrimCLong) ::: ("cPrimitive_ul",HsPrimType HsPrimCULong) ::: ("cPrimitive_uli",HsPrimType HsPrimCULong) ::: ("cPrimitive_ll",HsPrimType HsPrimCLLong) ::: ("cPrimitive_lli",HsPrimType HsPrimCLLong) ::: ("cPrimitive_sll",HsPrimType HsPrimCLLong) ::: ("cPrimitive_slli",HsPrimType HsPrimCLLong) ::: ("cPrimitive_ull",HsPrimType HsPrimCULLong) ::: ("cPrimitive_ulli",HsPrimType HsPrimCULLong) ::: ("cPrimitive_f",HsPrimType HsPrimCFloat) ::: ("cPrimitive_d",HsPrimType HsPrimCDouble) ::: ("cPrimitive_ld",HsPrimType HsPrimCDouble) ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 1,PeekByteOff 0 2,PeekByteOff 0 4,PeekByteOff 0 6,PeekByteOff 0 8,PeekByteOff 0 10,PeekByteOff 0 12,PeekByteOff 0 14,PeekByteOff 0 16,PeekByteOff 0 20,PeekByteOff 0 24,PeekByteOff 0 28,PeekByteOff 0 32,PeekByteOff 0 40,PeekByteOff 0 48,PeekByteOff 0 56,PeekByteOff 0 64,PeekByteOff 0 72,PeekByteOff 0 80,PeekByteOff 0 88,PeekByteOff 0 96,PeekByteOff 0 104,PeekByteOff 0 112,PeekByteOff 0 120,PeekByteOff 0 128,PeekByteOff 0 136,PeekByteOff 0 144,PeekByteOff 0 160]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CPrimitive", structConstr = "MkCPrimitive", structFields = ("cPrimitive_c",HsPrimType HsPrimCChar) ::: ("cPrimitive_sc",HsPrimType HsPrimCSChar) ::: ("cPrimitive_uc",HsPrimType HsPrimCSChar) ::: ("cPrimitive_s",HsPrimType HsPrimCShort) ::: ("cPrimitive_si",HsPrimType HsPrimCShort) ::: ("cPrimitive_ss",HsPrimType HsPrimCShort) ::: ("cPrimitive_ssi",HsPrimType HsPrimCShort) ::: ("cPrimitive_us",HsPrimType HsPrimCUShort) ::: ("cPrimitive_usi",HsPrimType HsPrimCUShort) ::: ("cPrimitive_i",HsPrimType HsPrimCInt) ::: ("cPrimitive_s2",HsPrimType HsPrimCInt) ::: ("cPrimitive_si2",HsPrimType HsPrimCInt) ::: ("cPrimitive_u",HsPrimType HsPrimCUInt) ::: ("cPrimitive_ui",HsPrimType HsPrimCUInt) ::: ("cPrimitive_l",HsPrimType HsPrimCLong) ::: ("cPrimitive_li",HsPrimType HsPrimCLong) ::: ("cPrimitive_sl",HsPrimType HsPrimCLong) ::: ("cPrimitive_sli",HsPrimType HsPrimCLong) ::: ("cPrimitive_ul",HsPrimType HsPrimCULong) ::: ("cPrimitive_uli",HsPrimType HsPrimCULong) ::: ("cPrimitive_ll",HsPrimType HsPrimCLLong) ::: ("cPrimitive_lli",HsPrimType HsPrimCLLong) ::: ("cPrimitive_sll",HsPrimType HsPrimCLLong) ::: ("cPrimitive_slli",HsPrimType HsPrimCLLong) ::: ("cPrimitive_ull",HsPrimType HsPrimCULLong) ::: ("cPrimitive_ulli",HsPrimType HsPrimCULLong) ::: ("cPrimitive_f",HsPrimType HsPrimCFloat) ::: ("cPrimitive_d",HsPrimType HsPrimCDouble) ::: ("cPrimitive_ld",HsPrimType HsPrimCDouble) ::: VNil}) 29 (Seq [PokeByteOff 30 0 0,PokeByteOff 30 1 1,PokeByteOff 30 2 2,PokeByteOff 30 4 3,PokeByteOff 30 6 4,PokeByteOff 30 8 5,PokeByteOff 30 10 6,PokeByteOff 30 12 7,PokeByteOff 30 14 8,PokeByteOff 30 16 9,PokeByteOff 30 20 10,PokeByteOff 30 24 11,PokeByteOff 30 28 12,PokeByteOff 30 32 13,PokeByteOff 30 40 14,PokeByteOff 30 48 15,PokeByteOff 30 56 16,PokeByteOff 30 64 17,PokeByteOff 30 72 18,PokeByteOff 30 80 19,PokeByteOff 30 88 20,PokeByteOff 30 96 21,PokeByteOff 30 104 22,PokeByteOff 30 112 23,PokeByteOff 30 120 24,PokeByteOff 30 128 25,PokeByteOff 30 136 26,PokeByteOff 30 144 27,PokeByteOff 30 160 28])))}))
+DeclData (Struct {structName = "CPrimitive", structConstr = "MkCPrimitive", structFields = Field {fieldName = "cPrimitive_c", fieldType = HsPrimType HsPrimCChar} ::: Field {fieldName = "cPrimitive_sc", fieldType = HsPrimType HsPrimCSChar} ::: Field {fieldName = "cPrimitive_uc", fieldType = HsPrimType HsPrimCSChar} ::: Field {fieldName = "cPrimitive_s", fieldType = HsPrimType HsPrimCShort} ::: Field {fieldName = "cPrimitive_si", fieldType = HsPrimType HsPrimCShort} ::: Field {fieldName = "cPrimitive_ss", fieldType = HsPrimType HsPrimCShort} ::: Field {fieldName = "cPrimitive_ssi", fieldType = HsPrimType HsPrimCShort} ::: Field {fieldName = "cPrimitive_us", fieldType = HsPrimType HsPrimCUShort} ::: Field {fieldName = "cPrimitive_usi", fieldType = HsPrimType HsPrimCUShort} ::: Field {fieldName = "cPrimitive_i", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cPrimitive_s2", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cPrimitive_si2", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cPrimitive_u", fieldType = HsPrimType HsPrimCUInt} ::: Field {fieldName = "cPrimitive_ui", fieldType = HsPrimType HsPrimCUInt} ::: Field {fieldName = "cPrimitive_l", fieldType = HsPrimType HsPrimCLong} ::: Field {fieldName = "cPrimitive_li", fieldType = HsPrimType HsPrimCLong} ::: Field {fieldName = "cPrimitive_sl", fieldType = HsPrimType HsPrimCLong} ::: Field {fieldName = "cPrimitive_sli", fieldType = HsPrimType HsPrimCLong} ::: Field {fieldName = "cPrimitive_ul", fieldType = HsPrimType HsPrimCULong} ::: Field {fieldName = "cPrimitive_uli", fieldType = HsPrimType HsPrimCULong} ::: Field {fieldName = "cPrimitive_ll", fieldType = HsPrimType HsPrimCLLong} ::: Field {fieldName = "cPrimitive_lli", fieldType = HsPrimType HsPrimCLLong} ::: Field {fieldName = "cPrimitive_sll", fieldType = HsPrimType HsPrimCLLong} ::: Field {fieldName = "cPrimitive_slli", fieldType = HsPrimType HsPrimCLLong} ::: Field {fieldName = "cPrimitive_ull", fieldType = HsPrimType HsPrimCULLong} ::: Field {fieldName = "cPrimitive_ulli", fieldType = HsPrimType HsPrimCULLong} ::: Field {fieldName = "cPrimitive_f", fieldType = HsPrimType HsPrimCFloat} ::: Field {fieldName = "cPrimitive_d", fieldType = HsPrimType HsPrimCDouble} ::: Field {fieldName = "cPrimitive_ld", fieldType = HsPrimType HsPrimCDouble} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CPrimitive", structConstr = "MkCPrimitive", structFields = Field {fieldName = "cPrimitive_c", fieldType = HsPrimType HsPrimCChar} ::: Field {fieldName = "cPrimitive_sc", fieldType = HsPrimType HsPrimCSChar} ::: Field {fieldName = "cPrimitive_uc", fieldType = HsPrimType HsPrimCSChar} ::: Field {fieldName = "cPrimitive_s", fieldType = HsPrimType HsPrimCShort} ::: Field {fieldName = "cPrimitive_si", fieldType = HsPrimType HsPrimCShort} ::: Field {fieldName = "cPrimitive_ss", fieldType = HsPrimType HsPrimCShort} ::: Field {fieldName = "cPrimitive_ssi", fieldType = HsPrimType HsPrimCShort} ::: Field {fieldName = "cPrimitive_us", fieldType = HsPrimType HsPrimCUShort} ::: Field {fieldName = "cPrimitive_usi", fieldType = HsPrimType HsPrimCUShort} ::: Field {fieldName = "cPrimitive_i", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cPrimitive_s2", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cPrimitive_si2", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cPrimitive_u", fieldType = HsPrimType HsPrimCUInt} ::: Field {fieldName = "cPrimitive_ui", fieldType = HsPrimType HsPrimCUInt} ::: Field {fieldName = "cPrimitive_l", fieldType = HsPrimType HsPrimCLong} ::: Field {fieldName = "cPrimitive_li", fieldType = HsPrimType HsPrimCLong} ::: Field {fieldName = "cPrimitive_sl", fieldType = HsPrimType HsPrimCLong} ::: Field {fieldName = "cPrimitive_sli", fieldType = HsPrimType HsPrimCLong} ::: Field {fieldName = "cPrimitive_ul", fieldType = HsPrimType HsPrimCULong} ::: Field {fieldName = "cPrimitive_uli", fieldType = HsPrimType HsPrimCULong} ::: Field {fieldName = "cPrimitive_ll", fieldType = HsPrimType HsPrimCLLong} ::: Field {fieldName = "cPrimitive_lli", fieldType = HsPrimType HsPrimCLLong} ::: Field {fieldName = "cPrimitive_sll", fieldType = HsPrimType HsPrimCLLong} ::: Field {fieldName = "cPrimitive_slli", fieldType = HsPrimType HsPrimCLLong} ::: Field {fieldName = "cPrimitive_ull", fieldType = HsPrimType HsPrimCULLong} ::: Field {fieldName = "cPrimitive_ulli", fieldType = HsPrimType HsPrimCULLong} ::: Field {fieldName = "cPrimitive_f", fieldType = HsPrimType HsPrimCFloat} ::: Field {fieldName = "cPrimitive_d", fieldType = HsPrimType HsPrimCDouble} ::: Field {fieldName = "cPrimitive_ld", fieldType = HsPrimType HsPrimCDouble} ::: VNil}) (StorableInstance {storableSizeOf = 176, storableAlignment = 16, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CPrimitive", structConstr = "MkCPrimitive", structFields = Field {fieldName = "cPrimitive_c", fieldType = HsPrimType HsPrimCChar} ::: Field {fieldName = "cPrimitive_sc", fieldType = HsPrimType HsPrimCSChar} ::: Field {fieldName = "cPrimitive_uc", fieldType = HsPrimType HsPrimCSChar} ::: Field {fieldName = "cPrimitive_s", fieldType = HsPrimType HsPrimCShort} ::: Field {fieldName = "cPrimitive_si", fieldType = HsPrimType HsPrimCShort} ::: Field {fieldName = "cPrimitive_ss", fieldType = HsPrimType HsPrimCShort} ::: Field {fieldName = "cPrimitive_ssi", fieldType = HsPrimType HsPrimCShort} ::: Field {fieldName = "cPrimitive_us", fieldType = HsPrimType HsPrimCUShort} ::: Field {fieldName = "cPrimitive_usi", fieldType = HsPrimType HsPrimCUShort} ::: Field {fieldName = "cPrimitive_i", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cPrimitive_s2", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cPrimitive_si2", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cPrimitive_u", fieldType = HsPrimType HsPrimCUInt} ::: Field {fieldName = "cPrimitive_ui", fieldType = HsPrimType HsPrimCUInt} ::: Field {fieldName = "cPrimitive_l", fieldType = HsPrimType HsPrimCLong} ::: Field {fieldName = "cPrimitive_li", fieldType = HsPrimType HsPrimCLong} ::: Field {fieldName = "cPrimitive_sl", fieldType = HsPrimType HsPrimCLong} ::: Field {fieldName = "cPrimitive_sli", fieldType = HsPrimType HsPrimCLong} ::: Field {fieldName = "cPrimitive_ul", fieldType = HsPrimType HsPrimCULong} ::: Field {fieldName = "cPrimitive_uli", fieldType = HsPrimType HsPrimCULong} ::: Field {fieldName = "cPrimitive_ll", fieldType = HsPrimType HsPrimCLLong} ::: Field {fieldName = "cPrimitive_lli", fieldType = HsPrimType HsPrimCLLong} ::: Field {fieldName = "cPrimitive_sll", fieldType = HsPrimType HsPrimCLLong} ::: Field {fieldName = "cPrimitive_slli", fieldType = HsPrimType HsPrimCLLong} ::: Field {fieldName = "cPrimitive_ull", fieldType = HsPrimType HsPrimCULLong} ::: Field {fieldName = "cPrimitive_ulli", fieldType = HsPrimType HsPrimCULLong} ::: Field {fieldName = "cPrimitive_f", fieldType = HsPrimType HsPrimCFloat} ::: Field {fieldName = "cPrimitive_d", fieldType = HsPrimType HsPrimCDouble} ::: Field {fieldName = "cPrimitive_ld", fieldType = HsPrimType HsPrimCDouble} ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 1,PeekByteOff 0 2,PeekByteOff 0 4,PeekByteOff 0 6,PeekByteOff 0 8,PeekByteOff 0 10,PeekByteOff 0 12,PeekByteOff 0 14,PeekByteOff 0 16,PeekByteOff 0 20,PeekByteOff 0 24,PeekByteOff 0 28,PeekByteOff 0 32,PeekByteOff 0 40,PeekByteOff 0 48,PeekByteOff 0 56,PeekByteOff 0 64,PeekByteOff 0 72,PeekByteOff 0 80,PeekByteOff 0 88,PeekByteOff 0 96,PeekByteOff 0 104,PeekByteOff 0 112,PeekByteOff 0 120,PeekByteOff 0 128,PeekByteOff 0 136,PeekByteOff 0 144,PeekByteOff 0 160]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CPrimitive", structConstr = "MkCPrimitive", structFields = Field {fieldName = "cPrimitive_c", fieldType = HsPrimType HsPrimCChar} ::: Field {fieldName = "cPrimitive_sc", fieldType = HsPrimType HsPrimCSChar} ::: Field {fieldName = "cPrimitive_uc", fieldType = HsPrimType HsPrimCSChar} ::: Field {fieldName = "cPrimitive_s", fieldType = HsPrimType HsPrimCShort} ::: Field {fieldName = "cPrimitive_si", fieldType = HsPrimType HsPrimCShort} ::: Field {fieldName = "cPrimitive_ss", fieldType = HsPrimType HsPrimCShort} ::: Field {fieldName = "cPrimitive_ssi", fieldType = HsPrimType HsPrimCShort} ::: Field {fieldName = "cPrimitive_us", fieldType = HsPrimType HsPrimCUShort} ::: Field {fieldName = "cPrimitive_usi", fieldType = HsPrimType HsPrimCUShort} ::: Field {fieldName = "cPrimitive_i", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cPrimitive_s2", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cPrimitive_si2", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cPrimitive_u", fieldType = HsPrimType HsPrimCUInt} ::: Field {fieldName = "cPrimitive_ui", fieldType = HsPrimType HsPrimCUInt} ::: Field {fieldName = "cPrimitive_l", fieldType = HsPrimType HsPrimCLong} ::: Field {fieldName = "cPrimitive_li", fieldType = HsPrimType HsPrimCLong} ::: Field {fieldName = "cPrimitive_sl", fieldType = HsPrimType HsPrimCLong} ::: Field {fieldName = "cPrimitive_sli", fieldType = HsPrimType HsPrimCLong} ::: Field {fieldName = "cPrimitive_ul", fieldType = HsPrimType HsPrimCULong} ::: Field {fieldName = "cPrimitive_uli", fieldType = HsPrimType HsPrimCULong} ::: Field {fieldName = "cPrimitive_ll", fieldType = HsPrimType HsPrimCLLong} ::: Field {fieldName = "cPrimitive_lli", fieldType = HsPrimType HsPrimCLLong} ::: Field {fieldName = "cPrimitive_sll", fieldType = HsPrimType HsPrimCLLong} ::: Field {fieldName = "cPrimitive_slli", fieldType = HsPrimType HsPrimCLLong} ::: Field {fieldName = "cPrimitive_ull", fieldType = HsPrimType HsPrimCULLong} ::: Field {fieldName = "cPrimitive_ulli", fieldType = HsPrimType HsPrimCULLong} ::: Field {fieldName = "cPrimitive_f", fieldType = HsPrimType HsPrimCFloat} ::: Field {fieldName = "cPrimitive_d", fieldType = HsPrimType HsPrimCDouble} ::: Field {fieldName = "cPrimitive_ld", fieldType = HsPrimType HsPrimCDouble} ::: VNil}) 29 (Seq [PokeByteOff 30 0 0,PokeByteOff 30 1 1,PokeByteOff 30 2 2,PokeByteOff 30 4 3,PokeByteOff 30 6 4,PokeByteOff 30 8 5,PokeByteOff 30 10 6,PokeByteOff 30 12 7,PokeByteOff 30 14 8,PokeByteOff 30 16 9,PokeByteOff 30 20 10,PokeByteOff 30 24 11,PokeByteOff 30 28 12,PokeByteOff 30 32 13,PokeByteOff 30 40 14,PokeByteOff 30 48 15,PokeByteOff 30 56 16,PokeByteOff 30 64 17,PokeByteOff 30 72 18,PokeByteOff 30 80 19,PokeByteOff 30 88 20,PokeByteOff 30 96 21,PokeByteOff 30 104 22,PokeByteOff 30 112 23,PokeByteOff 30 120 24,PokeByteOff 30 128 25,PokeByteOff 30 136 26,PokeByteOff 30 144 27,PokeByteOff 30 160 28])))}))
diff --git a/hs-bindgen/fixtures/recursive_struct.hs b/hs-bindgen/fixtures/recursive_struct.hs
index e2203ae6..2c8f5256 100644
--- a/hs-bindgen/fixtures/recursive_struct.hs
+++ b/hs-bindgen/fixtures/recursive_struct.hs
@@ -1,6 +1,6 @@
-DeclData (Struct {structName = "CLinkedListAS", structConstr = "MkCLinkedListAS", structFields = ("cLinkedListAS_x",HsPrimType HsPrimCInt) ::: ("cLinkedListAS_next",HsPtr (HsTypRef "CLinkedListAS")) ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CLinkedListAS", structConstr = "MkCLinkedListAS", structFields = ("cLinkedListAS_x",HsPrimType HsPrimCInt) ::: ("cLinkedListAS_next",HsPtr (HsTypRef "CLinkedListAS")) ::: VNil}) (StorableInstance {storableSizeOf = 16, storableAlignment = 8, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CLinkedListAS", structConstr = "MkCLinkedListAS", structFields = ("cLinkedListAS_x",HsPrimType HsPrimCInt) ::: ("cLinkedListAS_next",HsPtr (HsTypRef "CLinkedListAS")) ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 8]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CLinkedListAS", structConstr = "MkCLinkedListAS", structFields = ("cLinkedListAS_x",HsPrimType HsPrimCInt) ::: ("cLinkedListAS_next",HsPtr (HsTypRef "CLinkedListAS")) ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 8 1])))}))
-DeclNewtype (Newtype {newtypeName = "CLinkedListAT", newtypeConstr = "MkCLinkedListAT", newtypeField = "unCLinkedListAT", newtypeType = HsTypRef "CLinkedListAS"})
+DeclData (Struct {structName = "CLinkedListAS", structConstr = "MkCLinkedListAS", structFields = Field {fieldName = "cLinkedListAS_x", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cLinkedListAS_next", fieldType = HsPtr (HsTypRef "CLinkedListAS")} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CLinkedListAS", structConstr = "MkCLinkedListAS", structFields = Field {fieldName = "cLinkedListAS_x", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cLinkedListAS_next", fieldType = HsPtr (HsTypRef "CLinkedListAS")} ::: VNil}) (StorableInstance {storableSizeOf = 16, storableAlignment = 8, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CLinkedListAS", structConstr = "MkCLinkedListAS", structFields = Field {fieldName = "cLinkedListAS_x", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cLinkedListAS_next", fieldType = HsPtr (HsTypRef "CLinkedListAS")} ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 8]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CLinkedListAS", structConstr = "MkCLinkedListAS", structFields = Field {fieldName = "cLinkedListAS_x", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cLinkedListAS_next", fieldType = HsPtr (HsTypRef "CLinkedListAS")} ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 8 1])))}))
+DeclNewtype (Newtype {newtypeName = "CLinkedListAT", newtypeConstr = "MkCLinkedListAT", newtypeField = Field {fieldName = "unCLinkedListAT", fieldType = HsTypRef "CLinkedListAS"}})
 DeclNewtypeInstance Storable "CLinkedListAT"
-DeclData (Struct {structName = "CLinkedListBT", structConstr = "MkCLinkedListBT", structFields = ("cLinkedListBT_x",HsPrimType HsPrimCInt) ::: ("cLinkedListBT_next",HsPtr (HsTypRef "CLinkedListBT")) ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CLinkedListBT", structConstr = "MkCLinkedListBT", structFields = ("cLinkedListBT_x",HsPrimType HsPrimCInt) ::: ("cLinkedListBT_next",HsPtr (HsTypRef "CLinkedListBT")) ::: VNil}) (StorableInstance {storableSizeOf = 16, storableAlignment = 8, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CLinkedListBT", structConstr = "MkCLinkedListBT", structFields = ("cLinkedListBT_x",HsPrimType HsPrimCInt) ::: ("cLinkedListBT_next",HsPtr (HsTypRef "CLinkedListBT")) ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 8]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CLinkedListBT", structConstr = "MkCLinkedListBT", structFields = ("cLinkedListBT_x",HsPrimType HsPrimCInt) ::: ("cLinkedListBT_next",HsPtr (HsTypRef "CLinkedListBT")) ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 8 1])))}))
+DeclData (Struct {structName = "CLinkedListBT", structConstr = "MkCLinkedListBT", structFields = Field {fieldName = "cLinkedListBT_x", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cLinkedListBT_next", fieldType = HsPtr (HsTypRef "CLinkedListBT")} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CLinkedListBT", structConstr = "MkCLinkedListBT", structFields = Field {fieldName = "cLinkedListBT_x", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cLinkedListBT_next", fieldType = HsPtr (HsTypRef "CLinkedListBT")} ::: VNil}) (StorableInstance {storableSizeOf = 16, storableAlignment = 8, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CLinkedListBT", structConstr = "MkCLinkedListBT", structFields = Field {fieldName = "cLinkedListBT_x", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cLinkedListBT_next", fieldType = HsPtr (HsTypRef "CLinkedListBT")} ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 8]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CLinkedListBT", structConstr = "MkCLinkedListBT", structFields = Field {fieldName = "cLinkedListBT_x", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cLinkedListBT_next", fieldType = HsPtr (HsTypRef "CLinkedListBT")} ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 8 1])))}))
diff --git a/hs-bindgen/fixtures/simple_structs.hs b/hs-bindgen/fixtures/simple_structs.hs
index afc1ab7b..31b23462 100644
--- a/hs-bindgen/fixtures/simple_structs.hs
+++ b/hs-bindgen/fixtures/simple_structs.hs
@@ -1,14 +1,14 @@
-DeclData (Struct {structName = "CS1", structConstr = "MkCS1", structFields = ("cS1_a",HsPrimType HsPrimCInt) ::: ("cS1_b",HsPrimType HsPrimCChar) ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CS1", structConstr = "MkCS1", structFields = ("cS1_a",HsPrimType HsPrimCInt) ::: ("cS1_b",HsPrimType HsPrimCChar) ::: VNil}) (StorableInstance {storableSizeOf = 8, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS1", structConstr = "MkCS1", structFields = ("cS1_a",HsPrimType HsPrimCInt) ::: ("cS1_b",HsPrimType HsPrimCChar) ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 4]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS1", structConstr = "MkCS1", structFields = ("cS1_a",HsPrimType HsPrimCInt) ::: ("cS1_b",HsPrimType HsPrimCChar) ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 4 1])))}))
-DeclData (Struct {structName = "CS2", structConstr = "MkCS2", structFields = ("cS2_a",HsPrimType HsPrimCChar) ::: ("cS2_b",HsPrimType HsPrimCInt) ::: ("cS2_c",HsPrimType HsPrimCFloat) ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CS2", structConstr = "MkCS2", structFields = ("cS2_a",HsPrimType HsPrimCChar) ::: ("cS2_b",HsPrimType HsPrimCInt) ::: ("cS2_c",HsPrimType HsPrimCFloat) ::: VNil}) (StorableInstance {storableSizeOf = 12, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS2", structConstr = "MkCS2", structFields = ("cS2_a",HsPrimType HsPrimCChar) ::: ("cS2_b",HsPrimType HsPrimCInt) ::: ("cS2_c",HsPrimType HsPrimCFloat) ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 4,PeekByteOff 0 8]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS2", structConstr = "MkCS2", structFields = ("cS2_a",HsPrimType HsPrimCChar) ::: ("cS2_b",HsPrimType HsPrimCInt) ::: ("cS2_c",HsPrimType HsPrimCFloat) ::: VNil}) 3 (Seq [PokeByteOff 4 0 0,PokeByteOff 4 4 1,PokeByteOff 4 8 2])))}))
-DeclNewtype (Newtype {newtypeName = "CS2T", newtypeConstr = "MkCS2T", newtypeField = "unCS2T", newtypeType = HsTypRef "CS2"})
+DeclData (Struct {structName = "CS1", structConstr = "MkCS1", structFields = Field {fieldName = "cS1_a", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cS1_b", fieldType = HsPrimType HsPrimCChar} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CS1", structConstr = "MkCS1", structFields = Field {fieldName = "cS1_a", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cS1_b", fieldType = HsPrimType HsPrimCChar} ::: VNil}) (StorableInstance {storableSizeOf = 8, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS1", structConstr = "MkCS1", structFields = Field {fieldName = "cS1_a", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cS1_b", fieldType = HsPrimType HsPrimCChar} ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 4]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS1", structConstr = "MkCS1", structFields = Field {fieldName = "cS1_a", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cS1_b", fieldType = HsPrimType HsPrimCChar} ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 4 1])))}))
+DeclData (Struct {structName = "CS2", structConstr = "MkCS2", structFields = Field {fieldName = "cS2_a", fieldType = HsPrimType HsPrimCChar} ::: Field {fieldName = "cS2_b", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cS2_c", fieldType = HsPrimType HsPrimCFloat} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CS2", structConstr = "MkCS2", structFields = Field {fieldName = "cS2_a", fieldType = HsPrimType HsPrimCChar} ::: Field {fieldName = "cS2_b", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cS2_c", fieldType = HsPrimType HsPrimCFloat} ::: VNil}) (StorableInstance {storableSizeOf = 12, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS2", structConstr = "MkCS2", structFields = Field {fieldName = "cS2_a", fieldType = HsPrimType HsPrimCChar} ::: Field {fieldName = "cS2_b", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cS2_c", fieldType = HsPrimType HsPrimCFloat} ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 4,PeekByteOff 0 8]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS2", structConstr = "MkCS2", structFields = Field {fieldName = "cS2_a", fieldType = HsPrimType HsPrimCChar} ::: Field {fieldName = "cS2_b", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cS2_c", fieldType = HsPrimType HsPrimCFloat} ::: VNil}) 3 (Seq [PokeByteOff 4 0 0,PokeByteOff 4 4 1,PokeByteOff 4 8 2])))}))
+DeclNewtype (Newtype {newtypeName = "CS2T", newtypeConstr = "MkCS2T", newtypeField = Field {fieldName = "unCS2T", fieldType = HsTypRef "CS2"}})
 DeclNewtypeInstance Storable "CS2T"
-DeclData (Struct {structName = "CS3T", structConstr = "MkCS3T", structFields = ("cS3T_a",HsPrimType HsPrimCChar) ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CS3T", structConstr = "MkCS3T", structFields = ("cS3T_a",HsPrimType HsPrimCChar) ::: VNil}) (StorableInstance {storableSizeOf = 1, storableAlignment = 1, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS3T", structConstr = "MkCS3T", structFields = ("cS3T_a",HsPrimType HsPrimCChar) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS3T", structConstr = "MkCS3T", structFields = ("cS3T_a",HsPrimType HsPrimCChar) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
-DeclData (Struct {structName = "CS4", structConstr = "MkCS4", structFields = ("cS4_b",HsPrimType HsPrimCChar) ::: ("cS4_a",HsPrimType HsPrimCInt) ::: ("cS4_c",HsPtr (HsPrimType HsPrimCInt)) ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CS4", structConstr = "MkCS4", structFields = ("cS4_b",HsPrimType HsPrimCChar) ::: ("cS4_a",HsPrimType HsPrimCInt) ::: ("cS4_c",HsPtr (HsPrimType HsPrimCInt)) ::: VNil}) (StorableInstance {storableSizeOf = 16, storableAlignment = 8, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS4", structConstr = "MkCS4", structFields = ("cS4_b",HsPrimType HsPrimCChar) ::: ("cS4_a",HsPrimType HsPrimCInt) ::: ("cS4_c",HsPtr (HsPrimType HsPrimCInt)) ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 4,PeekByteOff 0 8]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS4", structConstr = "MkCS4", structFields = ("cS4_b",HsPrimType HsPrimCChar) ::: ("cS4_a",HsPrimType HsPrimCInt) ::: ("cS4_c",HsPtr (HsPrimType HsPrimCInt)) ::: VNil}) 3 (Seq [PokeByteOff 4 0 0,PokeByteOff 4 4 1,PokeByteOff 4 8 2])))}))
-DeclData (Struct {structName = "CS5", structConstr = "MkCS5", structFields = ("cS5_a",HsPrimType HsPrimCChar) ::: ("cS5_b",HsPrimType HsPrimCInt) ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CS5", structConstr = "MkCS5", structFields = ("cS5_a",HsPrimType HsPrimCChar) ::: ("cS5_b",HsPrimType HsPrimCInt) ::: VNil}) (StorableInstance {storableSizeOf = 8, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS5", structConstr = "MkCS5", structFields = ("cS5_a",HsPrimType HsPrimCChar) ::: ("cS5_b",HsPrimType HsPrimCInt) ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 4]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS5", structConstr = "MkCS5", structFields = ("cS5_a",HsPrimType HsPrimCChar) ::: ("cS5_b",HsPrimType HsPrimCInt) ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 4 1])))}))
-DeclData (Struct {structName = "CS6", structConstr = "MkCS6", structFields = ("cS6_a",HsPrimType HsPrimCChar) ::: ("cS6_b",HsPrimType HsPrimCInt) ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CS6", structConstr = "MkCS6", structFields = ("cS6_a",HsPrimType HsPrimCChar) ::: ("cS6_b",HsPrimType HsPrimCInt) ::: VNil}) (StorableInstance {storableSizeOf = 8, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS6", structConstr = "MkCS6", structFields = ("cS6_a",HsPrimType HsPrimCChar) ::: ("cS6_b",HsPrimType HsPrimCInt) ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 4]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS6", structConstr = "MkCS6", structFields = ("cS6_a",HsPrimType HsPrimCChar) ::: ("cS6_b",HsPrimType HsPrimCInt) ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 4 1])))}))
+DeclData (Struct {structName = "CS3T", structConstr = "MkCS3T", structFields = Field {fieldName = "cS3T_a", fieldType = HsPrimType HsPrimCChar} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CS3T", structConstr = "MkCS3T", structFields = Field {fieldName = "cS3T_a", fieldType = HsPrimType HsPrimCChar} ::: VNil}) (StorableInstance {storableSizeOf = 1, storableAlignment = 1, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS3T", structConstr = "MkCS3T", structFields = Field {fieldName = "cS3T_a", fieldType = HsPrimType HsPrimCChar} ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS3T", structConstr = "MkCS3T", structFields = Field {fieldName = "cS3T_a", fieldType = HsPrimType HsPrimCChar} ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
+DeclData (Struct {structName = "CS4", structConstr = "MkCS4", structFields = Field {fieldName = "cS4_b", fieldType = HsPrimType HsPrimCChar} ::: Field {fieldName = "cS4_a", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cS4_c", fieldType = HsPtr (HsPrimType HsPrimCInt)} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CS4", structConstr = "MkCS4", structFields = Field {fieldName = "cS4_b", fieldType = HsPrimType HsPrimCChar} ::: Field {fieldName = "cS4_a", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cS4_c", fieldType = HsPtr (HsPrimType HsPrimCInt)} ::: VNil}) (StorableInstance {storableSizeOf = 16, storableAlignment = 8, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS4", structConstr = "MkCS4", structFields = Field {fieldName = "cS4_b", fieldType = HsPrimType HsPrimCChar} ::: Field {fieldName = "cS4_a", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cS4_c", fieldType = HsPtr (HsPrimType HsPrimCInt)} ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 4,PeekByteOff 0 8]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS4", structConstr = "MkCS4", structFields = Field {fieldName = "cS4_b", fieldType = HsPrimType HsPrimCChar} ::: Field {fieldName = "cS4_a", fieldType = HsPrimType HsPrimCInt} ::: Field {fieldName = "cS4_c", fieldType = HsPtr (HsPrimType HsPrimCInt)} ::: VNil}) 3 (Seq [PokeByteOff 4 0 0,PokeByteOff 4 4 1,PokeByteOff 4 8 2])))}))
+DeclData (Struct {structName = "CS5", structConstr = "MkCS5", structFields = Field {fieldName = "cS5_a", fieldType = HsPrimType HsPrimCChar} ::: Field {fieldName = "cS5_b", fieldType = HsPrimType HsPrimCInt} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CS5", structConstr = "MkCS5", structFields = Field {fieldName = "cS5_a", fieldType = HsPrimType HsPrimCChar} ::: Field {fieldName = "cS5_b", fieldType = HsPrimType HsPrimCInt} ::: VNil}) (StorableInstance {storableSizeOf = 8, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS5", structConstr = "MkCS5", structFields = Field {fieldName = "cS5_a", fieldType = HsPrimType HsPrimCChar} ::: Field {fieldName = "cS5_b", fieldType = HsPrimType HsPrimCInt} ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 4]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS5", structConstr = "MkCS5", structFields = Field {fieldName = "cS5_a", fieldType = HsPrimType HsPrimCChar} ::: Field {fieldName = "cS5_b", fieldType = HsPrimType HsPrimCInt} ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 4 1])))}))
+DeclData (Struct {structName = "CS6", structConstr = "MkCS6", structFields = Field {fieldName = "cS6_a", fieldType = HsPrimType HsPrimCChar} ::: Field {fieldName = "cS6_b", fieldType = HsPrimType HsPrimCInt} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CS6", structConstr = "MkCS6", structFields = Field {fieldName = "cS6_a", fieldType = HsPrimType HsPrimCChar} ::: Field {fieldName = "cS6_b", fieldType = HsPrimType HsPrimCInt} ::: VNil}) (StorableInstance {storableSizeOf = 8, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CS6", structConstr = "MkCS6", structFields = Field {fieldName = "cS6_a", fieldType = HsPrimType HsPrimCChar} ::: Field {fieldName = "cS6_b", fieldType = HsPrimType HsPrimCInt} ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 4]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CS6", structConstr = "MkCS6", structFields = Field {fieldName = "cS6_a", fieldType = HsPrimType HsPrimCChar} ::: Field {fieldName = "cS6_b", fieldType = HsPrimType HsPrimCInt} ::: VNil}) 2 (Seq [PokeByteOff 3 0 0,PokeByteOff 3 4 1])))}))
diff --git a/hs-bindgen/fixtures/typedef_vs_macro.hs b/hs-bindgen/fixtures/typedef_vs_macro.hs
index ab69fda3..9fa0af78 100644
--- a/hs-bindgen/fixtures/typedef_vs_macro.hs
+++ b/hs-bindgen/fixtures/typedef_vs_macro.hs
@@ -1,8 +1,8 @@
-DeclNewtype (Newtype {newtypeName = "CM1", newtypeConstr = "MkCM1", newtypeField = "unCM1", newtypeType = HsPrimType HsPrimCInt})
-DeclNewtype (Newtype {newtypeName = "CM2", newtypeConstr = "MkCM2", newtypeField = "unCM2", newtypeType = HsPrimType HsPrimCChar})
-DeclNewtype (Newtype {newtypeName = "CT1", newtypeConstr = "MkCT1", newtypeField = "unCT1", newtypeType = HsPrimType HsPrimCInt})
+DeclNewtype (Newtype {newtypeName = "CM1", newtypeConstr = "MkCM1", newtypeField = Field {fieldName = "unCM1", fieldType = HsPrimType HsPrimCInt}})
+DeclNewtype (Newtype {newtypeName = "CM2", newtypeConstr = "MkCM2", newtypeField = Field {fieldName = "unCM2", fieldType = HsPrimType HsPrimCChar}})
+DeclNewtype (Newtype {newtypeName = "CT1", newtypeConstr = "MkCT1", newtypeField = Field {fieldName = "unCT1", fieldType = HsPrimType HsPrimCInt}})
 DeclNewtypeInstance Storable "CT1"
-DeclNewtype (Newtype {newtypeName = "CT2", newtypeConstr = "MkCT2", newtypeField = "unCT2", newtypeType = HsPrimType HsPrimCChar})
+DeclNewtype (Newtype {newtypeName = "CT2", newtypeConstr = "MkCT2", newtypeField = Field {fieldName = "unCT2", fieldType = HsPrimType HsPrimCChar}})
 DeclNewtypeInstance Storable "CT2"
-DeclData (Struct {structName = "CExampleStruct", structConstr = "MkCExampleStruct", structFields = ("cExampleStruct_t1",HsTypRef "CT1") ::: ("cExampleStruct_t2",HsTypRef "CT2") ::: ("cExampleStruct_m1",HsTypRef "CM1") ::: ("cExampleStruct_m2",HsTypRef "CM2") ::: VNil})
-DeclInstance (InstanceStorable (Struct {structName = "CExampleStruct", structConstr = "MkCExampleStruct", structFields = ("cExampleStruct_t1",HsTypRef "CT1") ::: ("cExampleStruct_t2",HsTypRef "CT2") ::: ("cExampleStruct_m1",HsTypRef "CM1") ::: ("cExampleStruct_m2",HsTypRef "CM2") ::: VNil}) (StorableInstance {storableSizeOf = 16, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CExampleStruct", structConstr = "MkCExampleStruct", structFields = ("cExampleStruct_t1",HsTypRef "CT1") ::: ("cExampleStruct_t2",HsTypRef "CT2") ::: ("cExampleStruct_m1",HsTypRef "CM1") ::: ("cExampleStruct_m2",HsTypRef "CM2") ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 4,PeekByteOff 0 8,PeekByteOff 0 12]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CExampleStruct", structConstr = "MkCExampleStruct", structFields = ("cExampleStruct_t1",HsTypRef "CT1") ::: ("cExampleStruct_t2",HsTypRef "CT2") ::: ("cExampleStruct_m1",HsTypRef "CM1") ::: ("cExampleStruct_m2",HsTypRef "CM2") ::: VNil}) 4 (Seq [PokeByteOff 5 0 0,PokeByteOff 5 4 1,PokeByteOff 5 8 2,PokeByteOff 5 12 3])))}))
+DeclData (Struct {structName = "CExampleStruct", structConstr = "MkCExampleStruct", structFields = Field {fieldName = "cExampleStruct_t1", fieldType = HsTypRef "CT1"} ::: Field {fieldName = "cExampleStruct_t2", fieldType = HsTypRef "CT2"} ::: Field {fieldName = "cExampleStruct_m1", fieldType = HsTypRef "CM1"} ::: Field {fieldName = "cExampleStruct_m2", fieldType = HsTypRef "CM2"} ::: VNil})
+DeclInstance (InstanceStorable (Struct {structName = "CExampleStruct", structConstr = "MkCExampleStruct", structFields = Field {fieldName = "cExampleStruct_t1", fieldType = HsTypRef "CT1"} ::: Field {fieldName = "cExampleStruct_t2", fieldType = HsTypRef "CT2"} ::: Field {fieldName = "cExampleStruct_m1", fieldType = HsTypRef "CM1"} ::: Field {fieldName = "cExampleStruct_m2", fieldType = HsTypRef "CM2"} ::: VNil}) (StorableInstance {storableSizeOf = 16, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CExampleStruct", structConstr = "MkCExampleStruct", structFields = Field {fieldName = "cExampleStruct_t1", fieldType = HsTypRef "CT1"} ::: Field {fieldName = "cExampleStruct_t2", fieldType = HsTypRef "CT2"} ::: Field {fieldName = "cExampleStruct_m1", fieldType = HsTypRef "CM1"} ::: Field {fieldName = "cExampleStruct_m2", fieldType = HsTypRef "CM2"} ::: VNil})) [PeekByteOff 0 0,PeekByteOff 0 4,PeekByteOff 0 8,PeekByteOff 0 12]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CExampleStruct", structConstr = "MkCExampleStruct", structFields = Field {fieldName = "cExampleStruct_t1", fieldType = HsTypRef "CT1"} ::: Field {fieldName = "cExampleStruct_t2", fieldType = HsTypRef "CT2"} ::: Field {fieldName = "cExampleStruct_m1", fieldType = HsTypRef "CM1"} ::: Field {fieldName = "cExampleStruct_m2", fieldType = HsTypRef "CM2"} ::: VNil}) 4 (Seq [PokeByteOff 5 0 0,PokeByteOff 5 4 1,PokeByteOff 5 8 2,PokeByteOff 5 12 3])))}))
diff --git a/hs-bindgen/fixtures/typedefs.hs b/hs-bindgen/fixtures/typedefs.hs
index f28afa55..102d9c03 100644
--- a/hs-bindgen/fixtures/typedefs.hs
+++ b/hs-bindgen/fixtures/typedefs.hs
@@ -1,4 +1,4 @@
-DeclNewtype (Newtype {newtypeName = "CMyint", newtypeConstr = "MkCMyint", newtypeField = "unCMyint", newtypeType = HsPrimType HsPrimCInt})
+DeclNewtype (Newtype {newtypeName = "CMyint", newtypeConstr = "MkCMyint", newtypeField = Field {fieldName = "unCMyint", fieldType = HsPrimType HsPrimCInt}})
 DeclNewtypeInstance Storable "CMyint"
-DeclNewtype (Newtype {newtypeName = "CIntptr", newtypeConstr = "MkCIntptr", newtypeField = "unCIntptr", newtypeType = HsPtr (HsPrimType HsPrimCInt)})
+DeclNewtype (Newtype {newtypeName = "CIntptr", newtypeConstr = "MkCIntptr", newtypeField = Field {fieldName = "unCIntptr", fieldType = HsPtr (HsPrimType HsPrimCInt)}})
 DeclNewtypeInstance Storable "CIntptr"
diff --git a/hs-bindgen/fixtures/typenames.hs b/hs-bindgen/fixtures/typenames.hs
index 40351355..c8ccf5ad 100644
--- a/hs-bindgen/fixtures/typenames.hs
+++ b/hs-bindgen/fixtures/typenames.hs
@@ -1,6 +1,6 @@
-DeclNewtype (Newtype {newtypeName = "CFoo", newtypeConstr = "MkCFoo", newtypeField = "unCFoo", newtypeType = HsPrimType HsPrimCUInt})
-DeclInstance (InstanceStorable (Struct {structName = "CFoo", structConstr = "MkCFoo", structFields = ("unCFoo",HsPrimType HsPrimCUInt) ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CFoo", structConstr = "MkCFoo", structFields = ("unCFoo",HsPrimType HsPrimCUInt) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CFoo", structConstr = "MkCFoo", structFields = ("unCFoo",HsPrimType HsPrimCUInt) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
+DeclNewtype (Newtype {newtypeName = "CFoo", newtypeConstr = "MkCFoo", newtypeField = Field {fieldName = "unCFoo", fieldType = HsPrimType HsPrimCUInt}})
+DeclInstance (InstanceStorable (Struct {structName = "CFoo", structConstr = "MkCFoo", structFields = Field {fieldName = "unCFoo", fieldType = HsPrimType HsPrimCUInt} ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CFoo", structConstr = "MkCFoo", structFields = Field {fieldName = "unCFoo", fieldType = HsPrimType HsPrimCUInt} ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CFoo", structConstr = "MkCFoo", structFields = Field {fieldName = "unCFoo", fieldType = HsPrimType HsPrimCUInt} ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
 DeclPatSyn (PatSyn {patSynName = "MkCFOO1", patSynType = "CFoo", patSynConstr = "MkCFoo", patSynValue = 0})
 DeclPatSyn (PatSyn {patSynName = "MkCFOO2", patSynType = "CFoo", patSynConstr = "MkCFoo", patSynValue = 1})
-DeclNewtype (Newtype {newtypeName = "CFoo", newtypeConstr = "MkCFoo", newtypeField = "unCFoo", newtypeType = HsPrimType HsPrimCDouble})
+DeclNewtype (Newtype {newtypeName = "CFoo", newtypeConstr = "MkCFoo", newtypeField = Field {fieldName = "unCFoo", fieldType = HsPrimType HsPrimCDouble}})
 DeclNewtypeInstance Storable "CFoo"
diff --git a/hs-bindgen/fixtures/uses_utf8.hs b/hs-bindgen/fixtures/uses_utf8.hs
index 59c3106d..eda12f55 100644
--- a/hs-bindgen/fixtures/uses_utf8.hs
+++ b/hs-bindgen/fixtures/uses_utf8.hs
@@ -1,4 +1,4 @@
-DeclNewtype (Newtype {newtypeName = "CMyEnum", newtypeConstr = "MkCMyEnum", newtypeField = "unCMyEnum", newtypeType = HsPrimType HsPrimCUInt})
-DeclInstance (InstanceStorable (Struct {structName = "CMyEnum", structConstr = "MkCMyEnum", structFields = ("unCMyEnum",HsPrimType HsPrimCUInt) ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CMyEnum", structConstr = "MkCMyEnum", structFields = ("unCMyEnum",HsPrimType HsPrimCUInt) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CMyEnum", structConstr = "MkCMyEnum", structFields = ("unCMyEnum",HsPrimType HsPrimCUInt) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
+DeclNewtype (Newtype {newtypeName = "CMyEnum", newtypeConstr = "MkCMyEnum", newtypeField = Field {fieldName = "unCMyEnum", fieldType = HsPrimType HsPrimCUInt}})
+DeclInstance (InstanceStorable (Struct {structName = "CMyEnum", structConstr = "MkCMyEnum", structFields = Field {fieldName = "unCMyEnum", fieldType = HsPrimType HsPrimCUInt} ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CMyEnum", structConstr = "MkCMyEnum", structFields = Field {fieldName = "unCMyEnum", fieldType = HsPrimType HsPrimCUInt} ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CMyEnum", structConstr = "MkCMyEnum", structFields = Field {fieldName = "unCMyEnum", fieldType = HsPrimType HsPrimCUInt} ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))}))
 DeclPatSyn (PatSyn {patSynName = "MkCSay\20320\22909", patSynType = "CMyEnum", patSynConstr = "MkCMyEnum", patSynValue = 0})
 DeclPatSyn (PatSyn {patSynName = "MkCSay\25308\25308", patSynType = "CMyEnum", patSynConstr = "MkCMyEnum", patSynValue = 1})
diff --git a/hs-bindgen/src/HsBindgen/Backend/PP/Render.hs b/hs-bindgen/src/HsBindgen/Backend/PP/Render.hs
index 13cd24c8..8a7485a3 100644
--- a/hs-bindgen/src/HsBindgen/Backend/PP/Render.hs
+++ b/hs-bindgen/src/HsBindgen/Backend/PP/Render.hs
@@ -118,8 +118,8 @@ instance Pretty SDecl where
     DRecord Record{..} ->
       let d = hsep ["data", pretty dataType, char '=', pretty dataCon]
       in  hang d 2 $ vlist '{' '}'
-            [ hsep [pretty fld, "::", pretty typ]
-            | (fld, typ) <- dataFields
+            [ hsep [pretty (fieldName f), "::", pretty (fieldType f)]
+            | f <- dataFields
             ]
 
     DEmptyData n ->
@@ -128,7 +128,11 @@ instance Pretty SDecl where
     DNewtype Newtype{..} ->
       let d = hsep ["newtype", pretty newtypeName, char '=', pretty newtypeCon]
       in  hang d 2 $ vlist '{' '}'
-            [ hsep [pretty newtypeField, "::", pretty newtypeType]
+            [ hsep
+                [ pretty (fieldName newtypeField)
+                , "::"
+                , pretty (fieldType newtypeField)
+                ]
             ]
 
     DForeignImport ForeignImport{..} ->
diff --git a/hs-bindgen/src/HsBindgen/Backend/PP/Translation.hs b/hs-bindgen/src/HsBindgen/Backend/PP/Translation.hs
index 7cb81809..005ca6d7 100644
--- a/hs-bindgen/src/HsBindgen/Backend/PP/Translation.hs
+++ b/hs-bindgen/src/HsBindgen/Backend/PP/Translation.hs
@@ -151,9 +151,9 @@ resolveDeclImports = \case
       : map (resolveGlobalImports . fst) instanceDecs
       ++ map (resolveExprImports . snd) instanceDecs
     DRecord Record{..} -> mconcat $
-      map (resolveTypeImports . snd) dataFields
+      map (resolveTypeImports . fieldType) dataFields
     DEmptyData _name -> mempty
-    DNewtype Newtype{..} -> resolveTypeImports newtypeType
+    DNewtype Newtype{..} -> resolveTypeImports $ fieldType newtypeField
     DDerivingNewtypeInstance ty -> resolveTypeImports ty
     DForeignImport ForeignImport {..} -> resolveTypeImports foreignImportType
     DPatternSynonym PatternSynonym {..} ->
diff --git a/hs-bindgen/src/HsBindgen/Backend/TH.hs b/hs-bindgen/src/HsBindgen/Backend/TH.hs
index d57afb12..f64c047c 100644
--- a/hs-bindgen/src/HsBindgen/Backend/TH.hs
+++ b/hs-bindgen/src/HsBindgen/Backend/TH.hs
@@ -227,8 +227,11 @@ mkDecl = \case
       DRecord d ->
         let fields :: [q TH.VarBangType]
             fields =
-              [ TH.varBangType (hsNameToTH n) $ TH.bangType (TH.bang TH.noSourceUnpackedness TH.noSourceStrictness) (mkType EmptyEnv t)
-              | (n, t) <- dataFields d
+              [ TH.varBangType (hsNameToTH (fieldName f)) $
+                  TH.bangType
+                    (TH.bang TH.noSourceUnpackedness TH.noSourceStrictness)
+                    (mkType EmptyEnv (fieldType f))
+              | f <- dataFields d
               ]
         in singleton <$>
           TH.dataD (TH.cxt []) (hsNameToTH $ dataType d) [] Nothing [TH.recC (hsNameToTH (dataCon d)) fields] []
@@ -238,7 +241,10 @@ mkDecl = \case
 
       DNewtype n ->
         let field :: q TH.VarBangType
-            field = TH.varBangType (hsNameToTH (newtypeField n)) $ TH.bangType (TH.bang TH.noSourceUnpackedness TH.noSourceStrictness) (mkType EmptyEnv (newtypeType n))
+            field = TH.varBangType (hsNameToTH (fieldName (newtypeField n))) $
+              TH.bangType
+                (TH.bang TH.noSourceUnpackedness TH.noSourceStrictness)
+                (mkType EmptyEnv (fieldType (newtypeField n)))
         in singleton <$> TH.newtypeD (TH.cxt []) (hsNameToTH $ newtypeName n) [] Nothing (TH.recC (hsNameToTH (newtypeCon n)) [field]) []
 
       DDerivingNewtypeInstance ty ->
diff --git a/hs-bindgen/src/HsBindgen/Hs/AST.hs b/hs-bindgen/src/HsBindgen/Hs/AST.hs
index 4b702a43..8b4a2f4b 100644
--- a/hs-bindgen/src/HsBindgen/Hs/AST.hs
+++ b/hs-bindgen/src/HsBindgen/Hs/AST.hs
@@ -19,7 +19,8 @@
 -- > import HsBindgen.Hs.AST qualified as Hs
 module HsBindgen.Hs.AST (
     -- * Information about generated code
-    Struct(..)
+    Field(..)
+  , Struct(..)
   , Newtype(..)
     -- * Types
   , HsType(..)
@@ -71,10 +72,17 @@ import DeBruijn
   Information about generated code
 -------------------------------------------------------------------------------}
 
+data Field = Field {
+      fieldName :: HsName NsVar
+    , fieldType :: HsType
+    }
+
+deriving stock instance Show Field
+
 data Struct (n :: Nat) = Struct {
       structName   :: HsName NsTypeConstr
     , structConstr :: HsName NsConstr
-    , structFields :: Vec n (HsName NsVar, HsType)
+    , structFields :: Vec n Field
     }
 
 deriving stock instance Show (Struct n)
@@ -82,8 +90,7 @@ deriving stock instance Show (Struct n)
 data Newtype = Newtype {
       newtypeName   :: HsName NsTypeConstr
     , newtypeConstr :: HsName NsConstr
-    , newtypeField  :: HsName NsVar
-    , newtypeType   :: HsType
+    , newtypeField  :: Field
     }
 
 deriving stock instance Show Newtype
diff --git a/hs-bindgen/src/HsBindgen/Hs/Translation.hs b/hs-bindgen/src/HsBindgen/Hs/Translation.hs
index f9a198ae..d40c4c60 100644
--- a/hs-bindgen/src/HsBindgen/Hs/Translation.hs
+++ b/hs-bindgen/src/HsBindgen/Hs/Translation.hs
@@ -96,11 +96,11 @@ structDecs struct fields =
           typeConstrCtx = TypeConstrContext cStructName
           structName = mangleTypeConstrName typeConstrCtx
           structConstr = mangleConstrName $ ConstrContext typeConstrCtx
-          mkField f =
-            ( mangleVarName $ FieldVarContext typeConstrCtx True (C.fieldName f)
-            , typ nm (C.fieldType f)
-            )
-          structFields = Vec.map mkField fields
+          structFields = flip Vec.map fields $ \f -> Hs.Field {
+              fieldName = mangleVarName $
+                FieldVarContext typeConstrCtx True (C.fieldName f)
+            , fieldType = typ nm (C.fieldType f)
+            }
       in  Hs.Struct{..}
 
     storable :: Hs.StorableInstance
@@ -146,7 +146,7 @@ opaqueStructDecs cname =
 
 enumDecs :: C.Enu -> [Hs.Decl]
 enumDecs e = [
-      Hs.DeclNewtype newtype_
+      Hs.DeclNewtype Hs.Newtype{..}
     , Hs.DeclInstance $ Hs.InstanceStorable hs storable
     ] ++ valueDecls
   where
@@ -155,21 +155,19 @@ enumDecs e = [
     typeConstrCtx      = TypeConstrContext cEnumName
     newtypeName        = mangleTypeConstrName typeConstrCtx
     newtypeConstr      = mangleConstrName $ ConstrContext typeConstrCtx
-    newtypeType        = typ nm (C.enumType e)
-
-    newtype_ :: Hs.Newtype
-    newtype_ =
-      let newtypeField = mangleVarName $ EnumVarContext typeConstrCtx
-      in Hs.Newtype {..}
+    newtypeField       = Hs.Field {
+        fieldName = mangleVarName $ EnumVarContext typeConstrCtx
+      , fieldType = typ nm (C.enumType e)
+      }
 
     hs :: Hs.Struct (S Z)
     hs =
       let structName = mangleTypeConstrName typeConstrCtx
           structConstr = mangleConstrName $ ConstrContext typeConstrCtx
-          structFields = Vec.singleton
-            ( mangleVarName $ EnumVarContext typeConstrCtx
-            , typ nm (C.enumType e)
-            )
+          structFields = Vec.singleton $ Hs.Field {
+              fieldName = mangleVarName $ EnumVarContext typeConstrCtx
+            , fieldType = typ nm (C.enumType e)
+            }
       in  Hs.Struct{..}
 
     storable :: Hs.StorableInstance
@@ -206,7 +204,7 @@ enumDecs e = [
 
 typedefDecs :: C.Typedef -> [Hs.Decl]
 typedefDecs d = [
-      Hs.DeclNewtype newtype_
+      Hs.DeclNewtype Hs.Newtype{..}
     , Hs.DeclNewtypeInstance Hs.Storable newtypeName
     ]
   where
@@ -214,13 +212,11 @@ typedefDecs d = [
     nm@NameMangler{..} = defaultNameMangler
     typeConstrCtx      = TypeConstrContext cName
     newtypeName        = mangleTypeConstrName typeConstrCtx
-
-    newtype_ :: Hs.Newtype
-    newtype_ = Hs.Newtype {..}
-      where
-        newtypeConstr = mangleConstrName $ ConstrContext typeConstrCtx
-        newtypeField  = mangleVarName $ EnumVarContext typeConstrCtx
-        newtypeType   = typ nm (C.typedefType d)
+    newtypeConstr      = mangleConstrName $ ConstrContext typeConstrCtx
+    newtypeField       = Hs.Field {
+        fieldName = mangleVarName $ EnumVarContext typeConstrCtx
+      , fieldType = typ nm (C.typedefType d)
+      }
 
 
 
@@ -243,24 +239,22 @@ macroDecs C.MacroTcError {}      = []
 
 macroDecsTypedef :: C.Macro -> [Hs.Decl]
 macroDecsTypedef m = [
-        Hs.DeclNewtype newtype_
-      ]
+      Hs.DeclNewtype Hs.Newtype{..}
+    ]
   where
-    newtype_ :: Hs.Newtype
-    newtype_ =
-      let cName = C.macroName m
-          nm@NameMangler{..} = defaultNameMangler
-          typeConstrCtx = TypeConstrContext cName
-          newtypeName = mangleTypeConstrName typeConstrCtx
-          newtypeConstr = mangleConstrName $ ConstrContext typeConstrCtx
-          newtypeField = mangleVarName $ EnumVarContext typeConstrCtx
-
+    cName = C.macroName m
+    nm@NameMangler{..} = defaultNameMangler
+    typeConstrCtx = TypeConstrContext cName
+    newtypeName = mangleTypeConstrName typeConstrCtx
+    newtypeConstr = mangleConstrName $ ConstrContext typeConstrCtx
+    newtypeField = Hs.Field {
+        fieldName = mangleVarName $ EnumVarContext typeConstrCtx
+      , fieldType =
           -- TODO: this type conversion is very simple, but works for now.
-          newtypeType    = typ nm $ case C.macroBody m of
-              C.MTerm (C.MType pt) -> C.TypePrim pt
-              _                    -> C.TypePrim C.PrimVoid --
-
-      in Hs.Newtype {..}
+          typ nm $ case C.macroBody m of
+            C.MTerm (C.MType pt) -> C.TypePrim pt
+            _                    -> C.TypePrim C.PrimVoid
+      }
 
 {-------------------------------------------------------------------------------
   Types
diff --git a/hs-bindgen/src/HsBindgen/SHs/AST.hs b/hs-bindgen/src/HsBindgen/SHs/AST.hs
index 1042e936..840b0c0b 100644
--- a/hs-bindgen/src/HsBindgen/SHs/AST.hs
+++ b/hs-bindgen/src/HsBindgen/SHs/AST.hs
@@ -9,6 +9,7 @@ module HsBindgen.SHs.AST (
     ClosedType,
     SType (..),
     Instance (..),
+    Field (..),
     Record (..),
     Newtype (..),
     ForeignImport (..),
@@ -150,18 +151,23 @@ data Instance  = Instance {
     }
   deriving stock (Show)
 
+data Field = Field {
+      fieldName :: HsName NsVar
+    , fieldType :: ClosedType
+    }
+  deriving stock (Show)
+
 data Record = Record {
       dataType   :: HsName NsTypeConstr
     , dataCon    :: HsName NsConstr
-    , dataFields :: [(HsName NsVar, ClosedType)]
+    , dataFields :: [Field]
     }
   deriving stock (Show)
 
 data Newtype = Newtype {
       newtypeName   :: HsName NsTypeConstr
     , newtypeCon    :: HsName NsConstr
-    , newtypeField  :: HsName NsVar
-    , newtypeType   :: ClosedType
+    , newtypeField  :: Field
     }
   deriving stock (Show)
 
diff --git a/hs-bindgen/src/HsBindgen/SHs/Translation.hs b/hs-bindgen/src/HsBindgen/SHs/Translation.hs
index db28d0ba..f3e6f53c 100644
--- a/hs-bindgen/src/HsBindgen/SHs/Translation.hs
+++ b/hs-bindgen/src/HsBindgen/SHs/Translation.hs
@@ -42,8 +42,11 @@ translateDeclData struct = DRecord $ Record
     { dataType = Hs.structName struct
     , dataCon  = Hs.structConstr struct
     , dataFields =
-        [ (n, translateType t)
-        | (n, t) <- toList $ Hs.structFields struct
+        [ Field {
+              fieldName = Hs.fieldName f
+            , fieldType = translateType $ Hs.fieldType f
+            }
+        | f <- toList $ Hs.structFields struct
         ]
     }
 
@@ -54,8 +57,10 @@ translateNewtype :: Hs.Newtype -> SDecl
 translateNewtype n = DNewtype $ Newtype
     { newtypeName  = Hs.newtypeName n
     , newtypeCon   = Hs.newtypeConstr n
-    , newtypeField = Hs.newtypeField n
-    , newtypeType  = translateType (Hs.newtypeType n)
+    , newtypeField = Field {
+          fieldName = Hs.fieldName $ Hs.newtypeField n
+        , fieldType = translateType . Hs.fieldType $ Hs.newtypeField n
+        }
     }
 
 translateNewtypeInstance :: Hs.TypeClass -> HsName NsTypeConstr -> SDecl
@@ -219,7 +224,7 @@ translateElimStruct f (Hs.ElimStruct x struct add k) = ECase
     (EBound x)
     [SAlt (Hs.structConstr struct) add hints (f k)]
   where
-    hints = fmap (toNameHint . fst) $ Hs.structFields struct
+    hints = fmap (toNameHint . Hs.fieldName) $ Hs.structFields struct
 
 toNameHint :: HsName 'NsVar -> NameHint
 toNameHint (HsName t) = NameHint (T.unpack t)