diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,21 @@
+# 0.10.0.0
+
+* The parametrization of messages has been reworked. Most things that
+  per parametrized over a message type are now parametrized over a
+  type parameter of kind `Mutability` (defined in `Capnp.Message`).
+  * The Message type class has been replaced with a type `Message` of
+    kind `Mutability -> *`, and a type class `MonadReadMessage` for
+    operations that can work on any Message.
+* Message.fromByteString/toByteString:
+  * are now stand-alone functions, rather than methods on the class
+  * only operate on immutable segments.
+  * are pure functions, rather than monadic ones.
+* Some functions that were derivative of
+  `toByteString`/`fromByteString`, e.g. `Untyped.rawBytes`, also only
+  work on immutable messages now, and may be pure functions where before
+  they were monadic.
+* The types defined in `Capnp.Basics` now have `Thaw` instances.
+
 # 0.9.0.0
 
 * Significant performance improvements. A few low level APIs have been
diff --git a/capnp.cabal b/capnp.cabal
--- a/capnp.cabal
+++ b/capnp.cabal
@@ -1,6 +1,6 @@
 cabal-version:            2.2
 name:                     capnp
-version:                  0.9.0.0
+version:                  0.10.0.0
 category:                 Data, Serialization, Network, Rpc
 copyright:                2016-2020 haskell-capnp contributors (see CONTRIBUTORS file).
 author:                   Ian Denhardt
diff --git a/cmd/capnpc-haskell/IR/Haskell.hs b/cmd/capnpc-haskell/IR/Haskell.hs
--- a/cmd/capnpc-haskell/IR/Haskell.hs
+++ b/cmd/capnpc-haskell/IR/Haskell.hs
@@ -157,6 +157,7 @@
     | TCtx [Type] Type
     | TPrim Common.PrimWord
     | TUnit
+    | TKindAnnotated Type Type
     deriving(Show, Read, Eq)
 
 data Exp
diff --git a/cmd/capnpc-haskell/Trans/HaskellToText.hs b/cmd/capnpc-haskell/Trans/HaskellToText.hs
--- a/cmd/capnpc-haskell/Trans/HaskellToText.hs
+++ b/cmd/capnpc-haskell/Trans/HaskellToText.hs
@@ -45,6 +45,7 @@
         , "{-# OPTIONS_GHC -Wno-dodgy-exports #-}"
         , "{-# OPTIONS_GHC -Wno-unused-matches #-}"
         , "{-# OPTIONS_GHC -Wno-orphans #-}"
+        , "{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}"
         , hcat
             [ "module "
             , PP.textStrict $ mconcat $ intersperse "." $ map Name.renderUnQ modName
@@ -264,6 +265,8 @@
         PP.tupled (map format constraints) <> " => " <> format ty
     format (TPrim ty) = format ty
     format TUnit = "()"
+    format (TKindAnnotated ty kind) =
+        "(" <> format ty <> " :: " <> format kind <> ")"
 
 instance Format Name.GlobalQ where
     format Name.GlobalQ{local, globalNS=Name.NS parts} =
diff --git a/cmd/capnpc-haskell/Trans/PureToHaskell.hs b/cmd/capnpc-haskell/Trans/PureToHaskell.hs
--- a/cmd/capnpc-haskell/Trans/PureToHaskell.hs
+++ b/cmd/capnpc-haskell/Trans/PureToHaskell.hs
@@ -85,7 +85,8 @@
     fixImports $ Module
         { modName = ["Capnp", "Gen"] ++ makeModName fileName ++ ["Pure"]
         , modLangPragmas =
-            [ "DeriveGeneric"
+            [ "DataKinds"
+            , "DeriveGeneric"
             , "DuplicateRecordFields"
             , "FlexibleContexts"
             , "FlexibleInstances"
@@ -214,15 +215,15 @@
 typeParamsDecerializeCtx typeParams =
     let
         vars = typeParamVars typeParams
-        constMsg = tgName ["Message"] "ConstMsg"
+        tConst = tgName ["Message"] "Const"
         cerial msg v = TApp (tgName ["Classes"] "Cerial") [msg, v]
     in
     concat
         [ [ TApp (tgName ["Classes"] "Decerialize") [v]
           , TApp
             (tgName ["Classes"] "FromPtr")
-            [ constMsg
-            , cerial constMsg v
+            [ tConst
+            , cerial tConst v
             ]
           ]
         | v <- vars
@@ -235,7 +236,7 @@
           , TApp (tgName ["Classes"] "ToPtr")
                [ tuName "s"
                , TApp (tgName ["Classes"] "Cerial")
-                   [ TApp (tgName ["Message"] "MutMsg") [tuName "s"]
+                   [ TApp (tgName ["Message"] "Mut") [tuName "s"]
                    , v
                    ]
                ]
@@ -251,7 +252,7 @@
     [ instance_ ctx ["Default"] "Default" [typ]
         [ iValue "def" [] (egName ["GenHelpersPure"] "defaultStruct")
         ]
-    , instance_ ctx ["Classes"] "FromStruct" [tgName ["Message"] "ConstMsg", typ]
+    , instance_ ctx ["Classes"] "FromStruct" [tgName ["Message"] "Const", typ]
         [ iValue "fromStruct" [PVar "struct"] $ EBind
             (EApp (egName ["Classes"] "fromStruct") [euName "struct"])
             (egName ["Classes"] "decerialize")
diff --git a/cmd/capnpc-haskell/Trans/RawToHaskell.hs b/cmd/capnpc-haskell/Trans/RawToHaskell.hs
--- a/cmd/capnpc-haskell/Trans/RawToHaskell.hs
+++ b/cmd/capnpc-haskell/Trans/RawToHaskell.hs
@@ -22,11 +22,11 @@
 import qualified IR.Name   as Name
 import qualified IR.Raw    as Raw
 
-tMutMsg :: Type
-tMutMsg = TApp (tgName ["Message"] "MutMsg" ) [TVar "s"]
+tMut :: Type
+tMut = TApp (tgName ["Message"] "Mut") [TVar "s"]
 
-tConstMsg :: Type
-tConstMsg = tgName ["Message"] "ConstMsg"
+tConst :: Type
+tConst = tgName ["Message"] "Const"
 
 fileToModules :: Raw.File -> [Module]
 fileToModules file =
@@ -55,6 +55,7 @@
             , "MultiParamTypeClasses"
             , "TypeFamilies"
             , "DeriveGeneric"
+            , "DataKinds"
             , "OverloadedStrings"
             ]
         , modExports = Nothing
@@ -87,7 +88,7 @@
     [ DcData Data
         { dataName = Name.localToUnQ typeCtor
         , dataNewtype = False
-        , typeArgs = typeParamNames ++ [TVar "msg"]
+        , typeArgs = typeParamNames ++ [TKindAnnotated (TVar "mut") (tgName ["Message"] "Mutability")]
         , dataVariants =
             [ DataVariant
                 { dvCtorName = Name.localToUnQ dataCtor
@@ -96,7 +97,7 @@
                         C.VoidField ->
                             []
                         _ ->
-                            [ typeToType thisMod (C.fieldType locType) (TVar "msg") ]
+                            [ typeToType thisMod (C.fieldType locType) (TVar "mut") ]
                 }
             | Raw.Variant{name=dataCtor, locType} <- unionDataCtors
             ]
@@ -109,11 +110,11 @@
         , derives = []
         }
     , let ctx =
-            [ TApp (tgName ["Classes"] "FromPtr") [TVar "msg", v]
+            [ TApp (tgName ["Classes"] "FromPtr") [TVar "mut", v]
             | v <- typeParamNames
             ]
       in
-      instance_ ctx ["Classes"] "FromStruct" [TVar "msg", containerTypeType (TVar "msg")]
+      instance_ ctx ["Classes"] "FromStruct" [TVar "mut", containerTypeType (TVar "mut")]
         [ iValue "fromStruct" [PVar "struct"] $ EDo
             [ DoBind "tag"
                 (EApp
@@ -219,11 +220,11 @@
                 ]
         ]
     -- lists:
-    , instance_ [] ["Basics"] "ListElem" [TVar "msg", TLName typeCtor]
+    , instance_ [] ["Basics"] "ListElem" [TVar "mut", TLName typeCtor]
         [ IdData Data
             { dataName = "List"
             , typeArgs =
-                [ TVar "msg"
+                [ TVar "mut"
                 , TLName typeCtor
                 ]
             , dataVariants =
@@ -232,7 +233,7 @@
                     , dvArgs = APos
                         [ TApp
                             (tgName ["Untyped"] "ListOf")
-                            [ TVar "msg"
+                            [ TVar "mut"
                             , tStd_ "Word16"
                             ]
                         ]
@@ -308,7 +309,7 @@
     , wrapperFromPtr typeCtor typeParams dataCtor
     , instance_ [] ["Classes"] "ToPtr"
         [ TVar "s"
-        , containerTypeToType typeCtor typeParams (TApp (tgName ["Message"] "MutMsg") [TVar "s"])
+        , containerTypeToType typeCtor typeParams tMut
         ]
         [ iValue "toPtr" [PVar "msg", PLCtor dataCtor [PGCtor (std_ "Nothing") []]]
             (EApp (eStd_ "pure") [eStd_ "Nothing"])
@@ -343,15 +344,11 @@
         [ iValue "toStruct" [PLCtor dataCtor [PVar "struct"]]
             (ELName "struct")
         ]
-    , instance_ [] ["Untyped"] "HasMessage" [containerTypeType (TVar "msg")]
-        [ IdType $ TypeAlias
-            "InMessage"
-            [ containerTypeType (TVar "msg") ]
-            (TVar "msg")
-        , iValue "message" [PLCtor dataCtor [PVar "struct"]]
+    , instance_ [] ["Untyped"] "HasMessage" [containerTypeType (TVar "mut"), TVar "mut"]
+        [ iValue "message" [PLCtor dataCtor [PVar "struct"]]
             (EApp (egName ["Untyped"] "message") [ELName "struct"])
         ]
-    , instance_ [] ["Untyped"] "MessageDefault" [containerTypeType (TVar "msg")]
+    , instance_ [] ["Untyped"] "MessageDefault" [containerTypeType (TVar "mut"), TVar "mut"]
         [ iValue "messageDefault" [PVar "msg"] $ EFApp
             (ELName dataCtor)
             [ EApp
@@ -368,7 +365,7 @@
     [ wrapperFromPtr typeCtor typeParams dataCtor
     , instance_ [] ["Classes"] "ToPtr"
         [ TVar "s"
-        , containerTypeType $ TApp (tgName ["Message"] "MutMsg") [TVar "s"]
+        , containerTypeType tMut
         ]
         [ iValue
             "toPtr"
@@ -382,7 +379,7 @@
         ]
     , instance_ [] ["Classes"] "Allocate"
         [ TVar "s"
-        , containerTypeType $ TApp (tgName ["Message"] "MutMsg") [TVar "s"]
+        , containerTypeType tMut
         ]
         [ iValue "new" [PVar "msg"] $ EFApp
             (ELName dataCtor)
@@ -395,14 +392,14 @@
             ]
         ]
     , instance_ [] ["Basics"] "ListElem"
-        [ TVar "msg"
-        , containerTypeType $ TVar "msg"
+        [ TVar "mut"
+        , containerTypeType $ TVar "mut"
         ]
         [ IdData Data
             { dataName = "List"
             , typeArgs =
-                [ TVar "msg"
-                , containerTypeType (TVar "msg")
+                [ TVar "mut"
+                , containerTypeType (TVar "mut")
                 ]
             , dataVariants =
                 [ DataVariant
@@ -410,10 +407,10 @@
                     , dvArgs = APos
                         [ TApp
                             (tgName ["Untyped"] "ListOf")
-                            [ TVar "msg"
+                            [ TVar "mut"
                             , TApp
                                 (tgName ["Untyped"] "Struct")
-                                [TVar "msg"]
+                                [TVar "mut"]
                             ]
                         ]
                     }
@@ -447,7 +444,7 @@
         ]
     , instance_ [] ["Basics"] "MutListElem"
         [ TVar "s"
-        , containerTypeType $ TApp (tgName ["Message"] "MutMsg") [TVar "s"]
+        , containerTypeType tMut
         ]
         [ iValue "setIndex"
             [ PLCtor dataCtor [PVar "elt"]
@@ -548,12 +545,12 @@
         fieldType = typeToType
             thisMod
             (C.fieldType fieldLocType)
-            tMutMsg
+            tMut
         isPtrType = case C.fieldType fieldLocType of
             C.PtrType _       -> True
             C.CompositeType _ -> True
             _                 -> False
-        containerTypeType = containerTypeToType containerType typeParams tMutMsg
+        containerTypeType = containerTypeToType containerType typeParams tMut
     in
     [ DcValue
         { typ = TCtx
@@ -562,7 +559,7 @@
                     then
                         [ case fieldLocType of
                             C.HereField _ ->
-                                TApp (tgName ["Classes"] "FromStruct") [tMutMsg, fieldType]
+                                TApp (tgName ["Classes"] "FromStruct") [tMut, fieldType]
                             _ ->
                                 TApp (tgName ["Classes"] "ToPtr") [TVar "s", fieldType]
                         ]
@@ -639,8 +636,8 @@
     let fieldType = typeToType
             thisMod
             (C.fieldType fieldLocType)
-            tMutMsg
-        containerTypeType = containerTypeToType containerType typeParams tMutMsg
+            tMut
+        containerTypeType = containerTypeToType containerType typeParams tMut
     in
     [ DcValue
         { typ = TCtx
@@ -690,7 +687,7 @@
     ]
 declToDecls thisMod Raw.Constant{ name, value=C.WordValue ty val } =
     [ DcValue
-        { typ = typeToType thisMod (C.WordType ty) tConstMsg
+        { typ = typeToType thisMod (C.WordType ty) tConst
         , def = DfValue
             { name = Name.localToUnQ name
             , params = []
@@ -702,7 +699,7 @@
     ]
 declToDecls thisMod Raw.Constant{ name, value=C.PtrValue ty val } =
     [ DcValue
-        { typ = typeToType thisMod (C.PtrType ty) tConstMsg
+        { typ = typeToType thisMod (C.PtrType ty) tConst
         , def = DfValue
             { name = Name.localToUnQ name
             , params = []
diff --git a/examples/gen/lib/Capnp/Gen/ById/X85150b117366d14b.hs b/examples/gen/lib/Capnp/Gen/ById/X85150b117366d14b.hs
--- a/examples/gen/lib/Capnp/Gen/ById/X85150b117366d14b.hs
+++ b/examples/gen/lib/Capnp/Gen/ById/X85150b117366d14b.hs
@@ -2,6 +2,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.ById.X85150b117366d14b(module Capnp.Gen.Calculator) where
 import Capnp.Gen.Calculator
 import qualified Prelude as Std_
diff --git a/examples/gen/lib/Capnp/Gen/ById/X85150b117366d14b/Pure.hs b/examples/gen/lib/Capnp/Gen/ById/X85150b117366d14b/Pure.hs
--- a/examples/gen/lib/Capnp/Gen/ById/X85150b117366d14b/Pure.hs
+++ b/examples/gen/lib/Capnp/Gen/ById/X85150b117366d14b/Pure.hs
@@ -2,6 +2,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.ById.X85150b117366d14b.Pure(module Capnp.Gen.Calculator.Pure) where
 import Capnp.Gen.Calculator.Pure
 import qualified Prelude as Std_
diff --git a/examples/gen/lib/Capnp/Gen/ById/Xd0a87f36fa0182f5.hs b/examples/gen/lib/Capnp/Gen/ById/Xd0a87f36fa0182f5.hs
--- a/examples/gen/lib/Capnp/Gen/ById/Xd0a87f36fa0182f5.hs
+++ b/examples/gen/lib/Capnp/Gen/ById/Xd0a87f36fa0182f5.hs
@@ -2,6 +2,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.ById.Xd0a87f36fa0182f5(module Capnp.Gen.Echo) where
 import Capnp.Gen.Echo
 import qualified Prelude as Std_
diff --git a/examples/gen/lib/Capnp/Gen/ById/Xd0a87f36fa0182f5/Pure.hs b/examples/gen/lib/Capnp/Gen/ById/Xd0a87f36fa0182f5/Pure.hs
--- a/examples/gen/lib/Capnp/Gen/ById/Xd0a87f36fa0182f5/Pure.hs
+++ b/examples/gen/lib/Capnp/Gen/ById/Xd0a87f36fa0182f5/Pure.hs
@@ -2,6 +2,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.ById.Xd0a87f36fa0182f5.Pure(module Capnp.Gen.Echo.Pure) where
 import Capnp.Gen.Echo.Pure
 import qualified Prelude as Std_
diff --git a/examples/gen/lib/Capnp/Gen/Calculator.hs b/examples/gen/lib/Capnp/Gen/Calculator.hs
--- a/examples/gen/lib/Capnp/Gen/Calculator.hs
+++ b/examples/gen/lib/Capnp/Gen/Calculator.hs
@@ -3,11 +3,13 @@
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE DataKinds #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# OPTIONS_GHC -Wno-unused-imports #-}
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.Calculator where
 import qualified Capnp.Message as Message
 import qualified Capnp.Untyped as Untyped
@@ -26,7 +28,7 @@
     = Calculator'newtype_ (Std_.Maybe (Untyped.Cap msg))
 instance (Classes.FromPtr msg (Calculator msg)) where
     fromPtr msg ptr = (Calculator'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Calculator (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Calculator (Message.Mut s))) where
     toPtr msg (Calculator'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
     toPtr msg (Calculator'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
 newtype Calculator'evaluate'params msg
@@ -35,20 +37,19 @@
     fromStruct struct = (Std_.pure (Calculator'evaluate'params'newtype_ struct))
 instance (Classes.ToStruct msg (Calculator'evaluate'params msg)) where
     toStruct (Calculator'evaluate'params'newtype_ struct) = struct
-instance (Untyped.HasMessage (Calculator'evaluate'params msg)) where
-    type InMessage (Calculator'evaluate'params msg) = msg
+instance (Untyped.HasMessage (Calculator'evaluate'params mut) mut) where
     message (Calculator'evaluate'params'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Calculator'evaluate'params msg)) where
+instance (Untyped.MessageDefault (Calculator'evaluate'params mut) mut) where
     messageDefault msg = (Calculator'evaluate'params'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Calculator'evaluate'params msg)) where
     fromPtr msg ptr = (Calculator'evaluate'params'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Calculator'evaluate'params (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Calculator'evaluate'params (Message.Mut s))) where
     toPtr msg (Calculator'evaluate'params'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Calculator'evaluate'params (Message.MutMsg s))) where
+instance (Classes.Allocate s (Calculator'evaluate'params (Message.Mut s))) where
     new msg = (Calculator'evaluate'params'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Calculator'evaluate'params msg)) where
-    newtype List msg (Calculator'evaluate'params msg)
-        = Calculator'evaluate'params'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Calculator'evaluate'params mut)) where
+    newtype List mut (Calculator'evaluate'params mut)
+        = Calculator'evaluate'params'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Calculator'evaluate'params'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Calculator'evaluate'params'List_ l) = (Untyped.ListStruct l)
     length (Calculator'evaluate'params'List_ l) = (Untyped.length l)
@@ -56,7 +57,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Calculator'evaluate'params (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Calculator'evaluate'params (Message.Mut s))) where
     setIndex (Calculator'evaluate'params'newtype_ elt) i (Calculator'evaluate'params'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Calculator'evaluate'params'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
 get_Calculator'evaluate'params'expression :: ((Untyped.ReadCtx m msg)
@@ -66,14 +67,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Calculator'evaluate'params'expression :: ((Untyped.RWCtx m s)
-                                             ,(Classes.ToPtr s (Expression (Message.MutMsg s)))) => (Calculator'evaluate'params (Message.MutMsg s)) -> (Expression (Message.MutMsg s)) -> (m ())
+                                             ,(Classes.ToPtr s (Expression (Message.Mut s)))) => (Calculator'evaluate'params (Message.Mut s)) -> (Expression (Message.Mut s)) -> (m ())
 set_Calculator'evaluate'params'expression (Calculator'evaluate'params'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Calculator'evaluate'params'expression :: ((Untyped.ReadCtx m msg)) => (Calculator'evaluate'params msg) -> (m Std_.Bool)
 has_Calculator'evaluate'params'expression (Calculator'evaluate'params'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Calculator'evaluate'params'expression :: ((Untyped.RWCtx m s)) => (Calculator'evaluate'params (Message.MutMsg s)) -> (m (Expression (Message.MutMsg s)))
+new_Calculator'evaluate'params'expression :: ((Untyped.RWCtx m s)) => (Calculator'evaluate'params (Message.Mut s)) -> (m (Expression (Message.Mut s)))
 new_Calculator'evaluate'params'expression struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Calculator'evaluate'params'expression struct result)
@@ -85,20 +86,19 @@
     fromStruct struct = (Std_.pure (Calculator'evaluate'results'newtype_ struct))
 instance (Classes.ToStruct msg (Calculator'evaluate'results msg)) where
     toStruct (Calculator'evaluate'results'newtype_ struct) = struct
-instance (Untyped.HasMessage (Calculator'evaluate'results msg)) where
-    type InMessage (Calculator'evaluate'results msg) = msg
+instance (Untyped.HasMessage (Calculator'evaluate'results mut) mut) where
     message (Calculator'evaluate'results'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Calculator'evaluate'results msg)) where
+instance (Untyped.MessageDefault (Calculator'evaluate'results mut) mut) where
     messageDefault msg = (Calculator'evaluate'results'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Calculator'evaluate'results msg)) where
     fromPtr msg ptr = (Calculator'evaluate'results'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Calculator'evaluate'results (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Calculator'evaluate'results (Message.Mut s))) where
     toPtr msg (Calculator'evaluate'results'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Calculator'evaluate'results (Message.MutMsg s))) where
+instance (Classes.Allocate s (Calculator'evaluate'results (Message.Mut s))) where
     new msg = (Calculator'evaluate'results'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Calculator'evaluate'results msg)) where
-    newtype List msg (Calculator'evaluate'results msg)
-        = Calculator'evaluate'results'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Calculator'evaluate'results mut)) where
+    newtype List mut (Calculator'evaluate'results mut)
+        = Calculator'evaluate'results'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Calculator'evaluate'results'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Calculator'evaluate'results'List_ l) = (Untyped.ListStruct l)
     length (Calculator'evaluate'results'List_ l) = (Untyped.length l)
@@ -106,7 +106,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Calculator'evaluate'results (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Calculator'evaluate'results (Message.Mut s))) where
     setIndex (Calculator'evaluate'results'newtype_ elt) i (Calculator'evaluate'results'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Calculator'evaluate'results'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
 get_Calculator'evaluate'results'value :: ((Untyped.ReadCtx m msg)
@@ -116,7 +116,7 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Calculator'evaluate'results'value :: ((Untyped.RWCtx m s)
-                                         ,(Classes.ToPtr s (Value (Message.MutMsg s)))) => (Calculator'evaluate'results (Message.MutMsg s)) -> (Value (Message.MutMsg s)) -> (m ())
+                                         ,(Classes.ToPtr s (Value (Message.Mut s)))) => (Calculator'evaluate'results (Message.Mut s)) -> (Value (Message.Mut s)) -> (m ())
 set_Calculator'evaluate'results'value (Calculator'evaluate'results'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
@@ -129,20 +129,19 @@
     fromStruct struct = (Std_.pure (Calculator'defFunction'params'newtype_ struct))
 instance (Classes.ToStruct msg (Calculator'defFunction'params msg)) where
     toStruct (Calculator'defFunction'params'newtype_ struct) = struct
-instance (Untyped.HasMessage (Calculator'defFunction'params msg)) where
-    type InMessage (Calculator'defFunction'params msg) = msg
+instance (Untyped.HasMessage (Calculator'defFunction'params mut) mut) where
     message (Calculator'defFunction'params'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Calculator'defFunction'params msg)) where
+instance (Untyped.MessageDefault (Calculator'defFunction'params mut) mut) where
     messageDefault msg = (Calculator'defFunction'params'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Calculator'defFunction'params msg)) where
     fromPtr msg ptr = (Calculator'defFunction'params'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Calculator'defFunction'params (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Calculator'defFunction'params (Message.Mut s))) where
     toPtr msg (Calculator'defFunction'params'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Calculator'defFunction'params (Message.MutMsg s))) where
+instance (Classes.Allocate s (Calculator'defFunction'params (Message.Mut s))) where
     new msg = (Calculator'defFunction'params'newtype_ <$> (Untyped.allocStruct msg 1 1))
-instance (Basics.ListElem msg (Calculator'defFunction'params msg)) where
-    newtype List msg (Calculator'defFunction'params msg)
-        = Calculator'defFunction'params'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Calculator'defFunction'params mut)) where
+    newtype List mut (Calculator'defFunction'params mut)
+        = Calculator'defFunction'params'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Calculator'defFunction'params'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Calculator'defFunction'params'List_ l) = (Untyped.ListStruct l)
     length (Calculator'defFunction'params'List_ l) = (Untyped.length l)
@@ -150,12 +149,12 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Calculator'defFunction'params (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Calculator'defFunction'params (Message.Mut s))) where
     setIndex (Calculator'defFunction'params'newtype_ elt) i (Calculator'defFunction'params'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Calculator'defFunction'params'List_ <$> (Untyped.allocCompositeList msg 1 1 len))
 get_Calculator'defFunction'params'paramCount :: ((Untyped.ReadCtx m msg)) => (Calculator'defFunction'params msg) -> (m Std_.Int32)
 get_Calculator'defFunction'params'paramCount (Calculator'defFunction'params'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Calculator'defFunction'params'paramCount :: ((Untyped.RWCtx m s)) => (Calculator'defFunction'params (Message.MutMsg s)) -> Std_.Int32 -> (m ())
+set_Calculator'defFunction'params'paramCount :: ((Untyped.RWCtx m s)) => (Calculator'defFunction'params (Message.Mut s)) -> Std_.Int32 -> (m ())
 set_Calculator'defFunction'params'paramCount (Calculator'defFunction'params'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
 get_Calculator'defFunction'params'body :: ((Untyped.ReadCtx m msg)
                                           ,(Classes.FromPtr msg (Expression msg))) => (Calculator'defFunction'params msg) -> (m (Expression msg))
@@ -164,14 +163,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Calculator'defFunction'params'body :: ((Untyped.RWCtx m s)
-                                          ,(Classes.ToPtr s (Expression (Message.MutMsg s)))) => (Calculator'defFunction'params (Message.MutMsg s)) -> (Expression (Message.MutMsg s)) -> (m ())
+                                          ,(Classes.ToPtr s (Expression (Message.Mut s)))) => (Calculator'defFunction'params (Message.Mut s)) -> (Expression (Message.Mut s)) -> (m ())
 set_Calculator'defFunction'params'body (Calculator'defFunction'params'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Calculator'defFunction'params'body :: ((Untyped.ReadCtx m msg)) => (Calculator'defFunction'params msg) -> (m Std_.Bool)
 has_Calculator'defFunction'params'body (Calculator'defFunction'params'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Calculator'defFunction'params'body :: ((Untyped.RWCtx m s)) => (Calculator'defFunction'params (Message.MutMsg s)) -> (m (Expression (Message.MutMsg s)))
+new_Calculator'defFunction'params'body :: ((Untyped.RWCtx m s)) => (Calculator'defFunction'params (Message.Mut s)) -> (m (Expression (Message.Mut s)))
 new_Calculator'defFunction'params'body struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Calculator'defFunction'params'body struct result)
@@ -183,20 +182,19 @@
     fromStruct struct = (Std_.pure (Calculator'defFunction'results'newtype_ struct))
 instance (Classes.ToStruct msg (Calculator'defFunction'results msg)) where
     toStruct (Calculator'defFunction'results'newtype_ struct) = struct
-instance (Untyped.HasMessage (Calculator'defFunction'results msg)) where
-    type InMessage (Calculator'defFunction'results msg) = msg
+instance (Untyped.HasMessage (Calculator'defFunction'results mut) mut) where
     message (Calculator'defFunction'results'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Calculator'defFunction'results msg)) where
+instance (Untyped.MessageDefault (Calculator'defFunction'results mut) mut) where
     messageDefault msg = (Calculator'defFunction'results'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Calculator'defFunction'results msg)) where
     fromPtr msg ptr = (Calculator'defFunction'results'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Calculator'defFunction'results (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Calculator'defFunction'results (Message.Mut s))) where
     toPtr msg (Calculator'defFunction'results'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Calculator'defFunction'results (Message.MutMsg s))) where
+instance (Classes.Allocate s (Calculator'defFunction'results (Message.Mut s))) where
     new msg = (Calculator'defFunction'results'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Calculator'defFunction'results msg)) where
-    newtype List msg (Calculator'defFunction'results msg)
-        = Calculator'defFunction'results'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Calculator'defFunction'results mut)) where
+    newtype List mut (Calculator'defFunction'results mut)
+        = Calculator'defFunction'results'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Calculator'defFunction'results'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Calculator'defFunction'results'List_ l) = (Untyped.ListStruct l)
     length (Calculator'defFunction'results'List_ l) = (Untyped.length l)
@@ -204,7 +202,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Calculator'defFunction'results (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Calculator'defFunction'results (Message.Mut s))) where
     setIndex (Calculator'defFunction'results'newtype_ elt) i (Calculator'defFunction'results'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Calculator'defFunction'results'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
 get_Calculator'defFunction'results'func :: ((Untyped.ReadCtx m msg)
@@ -214,7 +212,7 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Calculator'defFunction'results'func :: ((Untyped.RWCtx m s)
-                                           ,(Classes.ToPtr s (Function (Message.MutMsg s)))) => (Calculator'defFunction'results (Message.MutMsg s)) -> (Function (Message.MutMsg s)) -> (m ())
+                                           ,(Classes.ToPtr s (Function (Message.Mut s)))) => (Calculator'defFunction'results (Message.Mut s)) -> (Function (Message.Mut s)) -> (m ())
 set_Calculator'defFunction'results'func (Calculator'defFunction'results'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
@@ -227,20 +225,19 @@
     fromStruct struct = (Std_.pure (Calculator'getOperator'params'newtype_ struct))
 instance (Classes.ToStruct msg (Calculator'getOperator'params msg)) where
     toStruct (Calculator'getOperator'params'newtype_ struct) = struct
-instance (Untyped.HasMessage (Calculator'getOperator'params msg)) where
-    type InMessage (Calculator'getOperator'params msg) = msg
+instance (Untyped.HasMessage (Calculator'getOperator'params mut) mut) where
     message (Calculator'getOperator'params'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Calculator'getOperator'params msg)) where
+instance (Untyped.MessageDefault (Calculator'getOperator'params mut) mut) where
     messageDefault msg = (Calculator'getOperator'params'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Calculator'getOperator'params msg)) where
     fromPtr msg ptr = (Calculator'getOperator'params'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Calculator'getOperator'params (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Calculator'getOperator'params (Message.Mut s))) where
     toPtr msg (Calculator'getOperator'params'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Calculator'getOperator'params (Message.MutMsg s))) where
+instance (Classes.Allocate s (Calculator'getOperator'params (Message.Mut s))) where
     new msg = (Calculator'getOperator'params'newtype_ <$> (Untyped.allocStruct msg 1 0))
-instance (Basics.ListElem msg (Calculator'getOperator'params msg)) where
-    newtype List msg (Calculator'getOperator'params msg)
-        = Calculator'getOperator'params'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Calculator'getOperator'params mut)) where
+    newtype List mut (Calculator'getOperator'params mut)
+        = Calculator'getOperator'params'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Calculator'getOperator'params'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Calculator'getOperator'params'List_ l) = (Untyped.ListStruct l)
     length (Calculator'getOperator'params'List_ l) = (Untyped.length l)
@@ -248,12 +245,12 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Calculator'getOperator'params (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Calculator'getOperator'params (Message.Mut s))) where
     setIndex (Calculator'getOperator'params'newtype_ elt) i (Calculator'getOperator'params'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Calculator'getOperator'params'List_ <$> (Untyped.allocCompositeList msg 1 0 len))
 get_Calculator'getOperator'params'op :: ((Untyped.ReadCtx m msg)) => (Calculator'getOperator'params msg) -> (m Operator)
 get_Calculator'getOperator'params'op (Calculator'getOperator'params'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Calculator'getOperator'params'op :: ((Untyped.RWCtx m s)) => (Calculator'getOperator'params (Message.MutMsg s)) -> Operator -> (m ())
+set_Calculator'getOperator'params'op :: ((Untyped.RWCtx m s)) => (Calculator'getOperator'params (Message.Mut s)) -> Operator -> (m ())
 set_Calculator'getOperator'params'op (Calculator'getOperator'params'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
 newtype Calculator'getOperator'results msg
     = Calculator'getOperator'results'newtype_ (Untyped.Struct msg)
@@ -261,20 +258,19 @@
     fromStruct struct = (Std_.pure (Calculator'getOperator'results'newtype_ struct))
 instance (Classes.ToStruct msg (Calculator'getOperator'results msg)) where
     toStruct (Calculator'getOperator'results'newtype_ struct) = struct
-instance (Untyped.HasMessage (Calculator'getOperator'results msg)) where
-    type InMessage (Calculator'getOperator'results msg) = msg
+instance (Untyped.HasMessage (Calculator'getOperator'results mut) mut) where
     message (Calculator'getOperator'results'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Calculator'getOperator'results msg)) where
+instance (Untyped.MessageDefault (Calculator'getOperator'results mut) mut) where
     messageDefault msg = (Calculator'getOperator'results'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Calculator'getOperator'results msg)) where
     fromPtr msg ptr = (Calculator'getOperator'results'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Calculator'getOperator'results (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Calculator'getOperator'results (Message.Mut s))) where
     toPtr msg (Calculator'getOperator'results'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Calculator'getOperator'results (Message.MutMsg s))) where
+instance (Classes.Allocate s (Calculator'getOperator'results (Message.Mut s))) where
     new msg = (Calculator'getOperator'results'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Calculator'getOperator'results msg)) where
-    newtype List msg (Calculator'getOperator'results msg)
-        = Calculator'getOperator'results'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Calculator'getOperator'results mut)) where
+    newtype List mut (Calculator'getOperator'results mut)
+        = Calculator'getOperator'results'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Calculator'getOperator'results'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Calculator'getOperator'results'List_ l) = (Untyped.ListStruct l)
     length (Calculator'getOperator'results'List_ l) = (Untyped.length l)
@@ -282,7 +278,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Calculator'getOperator'results (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Calculator'getOperator'results (Message.Mut s))) where
     setIndex (Calculator'getOperator'results'newtype_ elt) i (Calculator'getOperator'results'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Calculator'getOperator'results'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
 get_Calculator'getOperator'results'func :: ((Untyped.ReadCtx m msg)
@@ -292,7 +288,7 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Calculator'getOperator'results'func :: ((Untyped.RWCtx m s)
-                                           ,(Classes.ToPtr s (Function (Message.MutMsg s)))) => (Calculator'getOperator'results (Message.MutMsg s)) -> (Function (Message.MutMsg s)) -> (m ())
+                                           ,(Classes.ToPtr s (Function (Message.Mut s)))) => (Calculator'getOperator'results (Message.Mut s)) -> (Function (Message.Mut s)) -> (m ())
 set_Calculator'getOperator'results'func (Calculator'getOperator'results'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
@@ -305,20 +301,19 @@
     fromStruct struct = (Std_.pure (Expression'newtype_ struct))
 instance (Classes.ToStruct msg (Expression msg)) where
     toStruct (Expression'newtype_ struct) = struct
-instance (Untyped.HasMessage (Expression msg)) where
-    type InMessage (Expression msg) = msg
+instance (Untyped.HasMessage (Expression mut) mut) where
     message (Expression'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Expression msg)) where
+instance (Untyped.MessageDefault (Expression mut) mut) where
     messageDefault msg = (Expression'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Expression msg)) where
     fromPtr msg ptr = (Expression'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Expression (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Expression (Message.Mut s))) where
     toPtr msg (Expression'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Expression (Message.MutMsg s))) where
+instance (Classes.Allocate s (Expression (Message.Mut s))) where
     new msg = (Expression'newtype_ <$> (Untyped.allocStruct msg 2 2))
-instance (Basics.ListElem msg (Expression msg)) where
-    newtype List msg (Expression msg)
-        = Expression'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Expression mut)) where
+    newtype List mut (Expression mut)
+        = Expression'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Expression'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Expression'List_ l) = (Untyped.ListStruct l)
     length (Expression'List_ l) = (Untyped.length l)
@@ -326,16 +321,16 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Expression (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Expression (Message.Mut s))) where
     setIndex (Expression'newtype_ elt) i (Expression'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Expression'List_ <$> (Untyped.allocCompositeList msg 2 2 len))
-data Expression' msg
+data Expression' (mut :: Message.Mutability)
     = Expression'literal Std_.Double
-    | Expression'previousResult (Value msg)
+    | Expression'previousResult (Value mut)
     | Expression'parameter Std_.Word32
-    | Expression'call (Expression'call msg)
+    | Expression'call (Expression'call mut)
     | Expression'unknown' Std_.Word16
-instance (Classes.FromStruct msg (Expression' msg)) where
+instance (Classes.FromStruct mut (Expression' mut)) where
     fromStruct struct = (do
         tag <- (GenHelpers.getTag struct 4)
         case tag of
@@ -356,13 +351,13 @@
 get_Expression' :: ((Untyped.ReadCtx m msg)
                    ,(Classes.FromStruct msg (Expression' msg))) => (Expression msg) -> (m (Expression' msg))
 get_Expression' (Expression'newtype_ struct) = (Classes.fromStruct struct)
-set_Expression'literal :: ((Untyped.RWCtx m s)) => (Expression (Message.MutMsg s)) -> Std_.Double -> (m ())
+set_Expression'literal :: ((Untyped.RWCtx m s)) => (Expression (Message.Mut s)) -> Std_.Double -> (m ())
 set_Expression'literal (Expression'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (0 :: Std_.Word16) 1 0 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 0 0 0)
     )
 set_Expression'previousResult :: ((Untyped.RWCtx m s)
-                                 ,(Classes.ToPtr s (Value (Message.MutMsg s)))) => (Expression (Message.MutMsg s)) -> (Value (Message.MutMsg s)) -> (m ())
+                                 ,(Classes.ToPtr s (Value (Message.Mut s)))) => (Expression (Message.Mut s)) -> (Value (Message.Mut s)) -> (m ())
 set_Expression'previousResult (Expression'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (1 :: Std_.Word16) 1 0 0)
     (do
@@ -370,18 +365,18 @@
         (Untyped.setPtr ptr 0 struct)
         )
     )
-set_Expression'parameter :: ((Untyped.RWCtx m s)) => (Expression (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_Expression'parameter :: ((Untyped.RWCtx m s)) => (Expression (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_Expression'parameter (Expression'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (2 :: Std_.Word16) 1 0 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
     )
 set_Expression'call :: ((Untyped.RWCtx m s)
-                       ,(Classes.FromStruct (Message.MutMsg s) (Expression'call (Message.MutMsg s)))) => (Expression (Message.MutMsg s)) -> (m (Expression'call (Message.MutMsg s)))
+                       ,(Classes.FromStruct (Message.Mut s) (Expression'call (Message.Mut s)))) => (Expression (Message.Mut s)) -> (m (Expression'call (Message.Mut s)))
 set_Expression'call (Expression'newtype_ struct) = (do
     (GenHelpers.setWordField struct (3 :: Std_.Word16) 1 0 0)
     (Classes.fromStruct struct)
     )
-set_Expression'unknown' :: ((Untyped.RWCtx m s)) => (Expression (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Expression'unknown' :: ((Untyped.RWCtx m s)) => (Expression (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Expression'unknown' (Expression'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 1 0 0)
 newtype Expression'call msg
     = Expression'call'newtype_ (Untyped.Struct msg)
@@ -389,10 +384,9 @@
     fromStruct struct = (Std_.pure (Expression'call'newtype_ struct))
 instance (Classes.ToStruct msg (Expression'call msg)) where
     toStruct (Expression'call'newtype_ struct) = struct
-instance (Untyped.HasMessage (Expression'call msg)) where
-    type InMessage (Expression'call msg) = msg
+instance (Untyped.HasMessage (Expression'call mut) mut) where
     message (Expression'call'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Expression'call msg)) where
+instance (Untyped.MessageDefault (Expression'call mut) mut) where
     messageDefault msg = (Expression'call'newtype_ <$> (Untyped.messageDefault msg))
 get_Expression'call'function :: ((Untyped.ReadCtx m msg)
                                 ,(Classes.FromPtr msg (Function msg))) => (Expression'call msg) -> (m (Function msg))
@@ -401,7 +395,7 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Expression'call'function :: ((Untyped.RWCtx m s)
-                                ,(Classes.ToPtr s (Function (Message.MutMsg s)))) => (Expression'call (Message.MutMsg s)) -> (Function (Message.MutMsg s)) -> (m ())
+                                ,(Classes.ToPtr s (Function (Message.Mut s)))) => (Expression'call (Message.Mut s)) -> (Function (Message.Mut s)) -> (m ())
 set_Expression'call'function (Expression'call'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
@@ -415,14 +409,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Expression'call'params :: ((Untyped.RWCtx m s)
-                              ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Expression (Message.MutMsg s))))) => (Expression'call (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Expression (Message.MutMsg s))) -> (m ())
+                              ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Expression (Message.Mut s))))) => (Expression'call (Message.Mut s)) -> (Basics.List (Message.Mut s) (Expression (Message.Mut s))) -> (m ())
 set_Expression'call'params (Expression'call'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 1 struct)
     )
 has_Expression'call'params :: ((Untyped.ReadCtx m msg)) => (Expression'call msg) -> (m Std_.Bool)
 has_Expression'call'params (Expression'call'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_Expression'call'params :: ((Untyped.RWCtx m s)) => Std_.Int -> (Expression'call (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Expression (Message.MutMsg s))))
+new_Expression'call'params :: ((Untyped.RWCtx m s)) => Std_.Int -> (Expression'call (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Expression (Message.Mut s))))
 new_Expression'call'params len struct = (do
     result <- (Classes.newList (Untyped.message struct) len)
     (set_Expression'call'params struct result)
@@ -432,7 +426,7 @@
     = Value'newtype_ (Std_.Maybe (Untyped.Cap msg))
 instance (Classes.FromPtr msg (Value msg)) where
     fromPtr msg ptr = (Value'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Value (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Value (Message.Mut s))) where
     toPtr msg (Value'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
     toPtr msg (Value'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
 newtype Value'read'params msg
@@ -441,20 +435,19 @@
     fromStruct struct = (Std_.pure (Value'read'params'newtype_ struct))
 instance (Classes.ToStruct msg (Value'read'params msg)) where
     toStruct (Value'read'params'newtype_ struct) = struct
-instance (Untyped.HasMessage (Value'read'params msg)) where
-    type InMessage (Value'read'params msg) = msg
+instance (Untyped.HasMessage (Value'read'params mut) mut) where
     message (Value'read'params'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Value'read'params msg)) where
+instance (Untyped.MessageDefault (Value'read'params mut) mut) where
     messageDefault msg = (Value'read'params'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Value'read'params msg)) where
     fromPtr msg ptr = (Value'read'params'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Value'read'params (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Value'read'params (Message.Mut s))) where
     toPtr msg (Value'read'params'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Value'read'params (Message.MutMsg s))) where
+instance (Classes.Allocate s (Value'read'params (Message.Mut s))) where
     new msg = (Value'read'params'newtype_ <$> (Untyped.allocStruct msg 0 0))
-instance (Basics.ListElem msg (Value'read'params msg)) where
-    newtype List msg (Value'read'params msg)
-        = Value'read'params'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Value'read'params mut)) where
+    newtype List mut (Value'read'params mut)
+        = Value'read'params'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Value'read'params'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Value'read'params'List_ l) = (Untyped.ListStruct l)
     length (Value'read'params'List_ l) = (Untyped.length l)
@@ -462,7 +455,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Value'read'params (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Value'read'params (Message.Mut s))) where
     setIndex (Value'read'params'newtype_ elt) i (Value'read'params'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Value'read'params'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
 newtype Value'read'results msg
@@ -471,20 +464,19 @@
     fromStruct struct = (Std_.pure (Value'read'results'newtype_ struct))
 instance (Classes.ToStruct msg (Value'read'results msg)) where
     toStruct (Value'read'results'newtype_ struct) = struct
-instance (Untyped.HasMessage (Value'read'results msg)) where
-    type InMessage (Value'read'results msg) = msg
+instance (Untyped.HasMessage (Value'read'results mut) mut) where
     message (Value'read'results'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Value'read'results msg)) where
+instance (Untyped.MessageDefault (Value'read'results mut) mut) where
     messageDefault msg = (Value'read'results'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Value'read'results msg)) where
     fromPtr msg ptr = (Value'read'results'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Value'read'results (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Value'read'results (Message.Mut s))) where
     toPtr msg (Value'read'results'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Value'read'results (Message.MutMsg s))) where
+instance (Classes.Allocate s (Value'read'results (Message.Mut s))) where
     new msg = (Value'read'results'newtype_ <$> (Untyped.allocStruct msg 1 0))
-instance (Basics.ListElem msg (Value'read'results msg)) where
-    newtype List msg (Value'read'results msg)
-        = Value'read'results'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Value'read'results mut)) where
+    newtype List mut (Value'read'results mut)
+        = Value'read'results'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Value'read'results'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Value'read'results'List_ l) = (Untyped.ListStruct l)
     length (Value'read'results'List_ l) = (Untyped.length l)
@@ -492,18 +484,18 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Value'read'results (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Value'read'results (Message.Mut s))) where
     setIndex (Value'read'results'newtype_ elt) i (Value'read'results'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Value'read'results'List_ <$> (Untyped.allocCompositeList msg 1 0 len))
 get_Value'read'results'value :: ((Untyped.ReadCtx m msg)) => (Value'read'results msg) -> (m Std_.Double)
 get_Value'read'results'value (Value'read'results'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Value'read'results'value :: ((Untyped.RWCtx m s)) => (Value'read'results (Message.MutMsg s)) -> Std_.Double -> (m ())
+set_Value'read'results'value :: ((Untyped.RWCtx m s)) => (Value'read'results (Message.Mut s)) -> Std_.Double -> (m ())
 set_Value'read'results'value (Value'read'results'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 0 0 0)
 newtype Function msg
     = Function'newtype_ (Std_.Maybe (Untyped.Cap msg))
 instance (Classes.FromPtr msg (Function msg)) where
     fromPtr msg ptr = (Function'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Function (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Function (Message.Mut s))) where
     toPtr msg (Function'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
     toPtr msg (Function'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
 newtype Function'call'params msg
@@ -512,20 +504,19 @@
     fromStruct struct = (Std_.pure (Function'call'params'newtype_ struct))
 instance (Classes.ToStruct msg (Function'call'params msg)) where
     toStruct (Function'call'params'newtype_ struct) = struct
-instance (Untyped.HasMessage (Function'call'params msg)) where
-    type InMessage (Function'call'params msg) = msg
+instance (Untyped.HasMessage (Function'call'params mut) mut) where
     message (Function'call'params'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Function'call'params msg)) where
+instance (Untyped.MessageDefault (Function'call'params mut) mut) where
     messageDefault msg = (Function'call'params'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Function'call'params msg)) where
     fromPtr msg ptr = (Function'call'params'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Function'call'params (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Function'call'params (Message.Mut s))) where
     toPtr msg (Function'call'params'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Function'call'params (Message.MutMsg s))) where
+instance (Classes.Allocate s (Function'call'params (Message.Mut s))) where
     new msg = (Function'call'params'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Function'call'params msg)) where
-    newtype List msg (Function'call'params msg)
-        = Function'call'params'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Function'call'params mut)) where
+    newtype List mut (Function'call'params mut)
+        = Function'call'params'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Function'call'params'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Function'call'params'List_ l) = (Untyped.ListStruct l)
     length (Function'call'params'List_ l) = (Untyped.length l)
@@ -533,7 +524,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Function'call'params (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Function'call'params (Message.Mut s))) where
     setIndex (Function'call'params'newtype_ elt) i (Function'call'params'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Function'call'params'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
 get_Function'call'params'params :: ((Untyped.ReadCtx m msg)
@@ -543,14 +534,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Function'call'params'params :: ((Untyped.RWCtx m s)
-                                   ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) Std_.Double))) => (Function'call'params (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) Std_.Double) -> (m ())
+                                   ,(Classes.ToPtr s (Basics.List (Message.Mut s) Std_.Double))) => (Function'call'params (Message.Mut s)) -> (Basics.List (Message.Mut s) Std_.Double) -> (m ())
 set_Function'call'params'params (Function'call'params'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Function'call'params'params :: ((Untyped.ReadCtx m msg)) => (Function'call'params msg) -> (m Std_.Bool)
 has_Function'call'params'params (Function'call'params'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Function'call'params'params :: ((Untyped.RWCtx m s)) => Std_.Int -> (Function'call'params (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) Std_.Double))
+new_Function'call'params'params :: ((Untyped.RWCtx m s)) => Std_.Int -> (Function'call'params (Message.Mut s)) -> (m (Basics.List (Message.Mut s) Std_.Double))
 new_Function'call'params'params len struct = (do
     result <- (Classes.newList (Untyped.message struct) len)
     (set_Function'call'params'params struct result)
@@ -562,20 +553,19 @@
     fromStruct struct = (Std_.pure (Function'call'results'newtype_ struct))
 instance (Classes.ToStruct msg (Function'call'results msg)) where
     toStruct (Function'call'results'newtype_ struct) = struct
-instance (Untyped.HasMessage (Function'call'results msg)) where
-    type InMessage (Function'call'results msg) = msg
+instance (Untyped.HasMessage (Function'call'results mut) mut) where
     message (Function'call'results'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Function'call'results msg)) where
+instance (Untyped.MessageDefault (Function'call'results mut) mut) where
     messageDefault msg = (Function'call'results'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Function'call'results msg)) where
     fromPtr msg ptr = (Function'call'results'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Function'call'results (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Function'call'results (Message.Mut s))) where
     toPtr msg (Function'call'results'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Function'call'results (Message.MutMsg s))) where
+instance (Classes.Allocate s (Function'call'results (Message.Mut s))) where
     new msg = (Function'call'results'newtype_ <$> (Untyped.allocStruct msg 1 0))
-instance (Basics.ListElem msg (Function'call'results msg)) where
-    newtype List msg (Function'call'results msg)
-        = Function'call'results'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Function'call'results mut)) where
+    newtype List mut (Function'call'results mut)
+        = Function'call'results'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Function'call'results'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Function'call'results'List_ l) = (Untyped.ListStruct l)
     length (Function'call'results'List_ l) = (Untyped.length l)
@@ -583,12 +573,12 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Function'call'results (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Function'call'results (Message.Mut s))) where
     setIndex (Function'call'results'newtype_ elt) i (Function'call'results'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Function'call'results'List_ <$> (Untyped.allocCompositeList msg 1 0 len))
 get_Function'call'results'value :: ((Untyped.ReadCtx m msg)) => (Function'call'results msg) -> (m Std_.Double)
 get_Function'call'results'value (Function'call'results'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Function'call'results'value :: ((Untyped.RWCtx m s)) => (Function'call'results (Message.MutMsg s)) -> Std_.Double -> (m ())
+set_Function'call'results'value :: ((Untyped.RWCtx m s)) => (Function'call'results (Message.Mut s)) -> Std_.Double -> (m ())
 set_Function'call'results'value (Function'call'results'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 0 0 0)
 data Operator 
     = Operator'add 
@@ -620,9 +610,9 @@
 instance (Std_.Enum Operator) where
     fromEnum x = (Std_.fromIntegral (Classes.toWord x))
     toEnum x = (Classes.fromWord (Std_.fromIntegral x))
-instance (Basics.ListElem msg Operator) where
-    newtype List msg Operator
-        = Operator'List_ (Untyped.ListOf msg Std_.Word16)
+instance (Basics.ListElem mut Operator) where
+    newtype List mut Operator
+        = Operator'List_ (Untyped.ListOf mut Std_.Word16)
     index i (Operator'List_ l) = (Classes.fromWord <$> (Std_.fromIntegral <$> (Untyped.index i l)))
     listFromPtr msg ptr = (Operator'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Operator'List_ l) = (Untyped.List16 l)
diff --git a/examples/gen/lib/Capnp/Gen/Calculator/Pure.hs b/examples/gen/lib/Capnp/Gen/Calculator/Pure.hs
--- a/examples/gen/lib/Capnp/Gen/Calculator/Pure.hs
+++ b/examples/gen/lib/Capnp/Gen/Calculator/Pure.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds #-}
 {-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE DuplicateRecordFields #-}
 {-# LANGUAGE FlexibleContexts #-}
@@ -11,6 +12,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.Calculator.Pure(Capnp.Gen.ById.X85150b117366d14b.Operator(..)
                                 ,Calculator(..)
                                 ,Calculator'server_(..)
@@ -116,7 +118,7 @@
             ,Generics.Generic)
 instance (Default.Default (Calculator'evaluate'params)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Calculator'evaluate'params)) where
+instance (Classes.FromStruct Message.Const (Calculator'evaluate'params)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Calculator'evaluate'params)) where
     type Cerial msg (Calculator'evaluate'params) = (Capnp.Gen.ById.X85150b117366d14b.Calculator'evaluate'params msg)
@@ -151,7 +153,7 @@
             ,Generics.Generic)
 instance (Default.Default (Calculator'evaluate'results)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Calculator'evaluate'results)) where
+instance (Classes.FromStruct Message.Const (Calculator'evaluate'results)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Calculator'evaluate'results)) where
     type Cerial msg (Calculator'evaluate'results) = (Capnp.Gen.ById.X85150b117366d14b.Calculator'evaluate'results msg)
@@ -187,7 +189,7 @@
             ,Generics.Generic)
 instance (Default.Default (Calculator'defFunction'params)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Calculator'defFunction'params)) where
+instance (Classes.FromStruct Message.Const (Calculator'defFunction'params)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Calculator'defFunction'params)) where
     type Cerial msg (Calculator'defFunction'params) = (Capnp.Gen.ById.X85150b117366d14b.Calculator'defFunction'params msg)
@@ -224,7 +226,7 @@
             ,Generics.Generic)
 instance (Default.Default (Calculator'defFunction'results)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Calculator'defFunction'results)) where
+instance (Classes.FromStruct Message.Const (Calculator'defFunction'results)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Calculator'defFunction'results)) where
     type Cerial msg (Calculator'defFunction'results) = (Capnp.Gen.ById.X85150b117366d14b.Calculator'defFunction'results msg)
@@ -259,7 +261,7 @@
             ,Generics.Generic)
 instance (Default.Default (Calculator'getOperator'params)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Calculator'getOperator'params)) where
+instance (Classes.FromStruct Message.Const (Calculator'getOperator'params)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Calculator'getOperator'params)) where
     type Cerial msg (Calculator'getOperator'params) = (Capnp.Gen.ById.X85150b117366d14b.Calculator'getOperator'params msg)
@@ -294,7 +296,7 @@
             ,Generics.Generic)
 instance (Default.Default (Calculator'getOperator'results)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Calculator'getOperator'results)) where
+instance (Classes.FromStruct Message.Const (Calculator'getOperator'results)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Calculator'getOperator'results)) where
     type Cerial msg (Calculator'getOperator'results) = (Capnp.Gen.ById.X85150b117366d14b.Calculator'getOperator'results msg)
@@ -332,7 +334,7 @@
             ,Generics.Generic)
 instance (Default.Default (Expression)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Expression)) where
+instance (Classes.FromStruct Message.Const (Expression)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Expression)) where
     type Cerial msg (Expression) = (Capnp.Gen.ById.X85150b117366d14b.Expression msg)
@@ -389,7 +391,7 @@
             ,Generics.Generic)
 instance (Default.Default (Expression'call)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Expression'call)) where
+instance (Classes.FromStruct Message.Const (Expression'call)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Expression'call)) where
     type Cerial msg (Expression'call) = (Capnp.Gen.ById.X85150b117366d14b.Expression'call msg)
@@ -453,7 +455,7 @@
             ,Generics.Generic)
 instance (Default.Default (Value'read'params)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Value'read'params)) where
+instance (Classes.FromStruct Message.Const (Value'read'params)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Value'read'params)) where
     type Cerial msg (Value'read'params) = (Capnp.Gen.ById.X85150b117366d14b.Value'read'params msg)
@@ -487,7 +489,7 @@
             ,Generics.Generic)
 instance (Default.Default (Value'read'results)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Value'read'results)) where
+instance (Classes.FromStruct Message.Const (Value'read'results)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Value'read'results)) where
     type Cerial msg (Value'read'results) = (Capnp.Gen.ById.X85150b117366d14b.Value'read'results msg)
@@ -564,7 +566,7 @@
             ,Generics.Generic)
 instance (Default.Default (Function'call'params)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Function'call'params)) where
+instance (Classes.FromStruct Message.Const (Function'call'params)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Function'call'params)) where
     type Cerial msg (Function'call'params) = (Capnp.Gen.ById.X85150b117366d14b.Function'call'params msg)
@@ -599,7 +601,7 @@
             ,Generics.Generic)
 instance (Default.Default (Function'call'results)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Function'call'results)) where
+instance (Classes.FromStruct Message.Const (Function'call'results)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Function'call'results)) where
     type Cerial msg (Function'call'results) = (Capnp.Gen.ById.X85150b117366d14b.Function'call'results msg)
diff --git a/examples/gen/lib/Capnp/Gen/Echo.hs b/examples/gen/lib/Capnp/Gen/Echo.hs
--- a/examples/gen/lib/Capnp/Gen/Echo.hs
+++ b/examples/gen/lib/Capnp/Gen/Echo.hs
@@ -3,11 +3,13 @@
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE DataKinds #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# OPTIONS_GHC -Wno-unused-imports #-}
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.Echo where
 import qualified Capnp.Message as Message
 import qualified Capnp.Untyped as Untyped
@@ -26,7 +28,7 @@
     = Echo'newtype_ (Std_.Maybe (Untyped.Cap msg))
 instance (Classes.FromPtr msg (Echo msg)) where
     fromPtr msg ptr = (Echo'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Echo (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Echo (Message.Mut s))) where
     toPtr msg (Echo'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
     toPtr msg (Echo'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
 newtype Echo'echo'params msg
@@ -35,20 +37,19 @@
     fromStruct struct = (Std_.pure (Echo'echo'params'newtype_ struct))
 instance (Classes.ToStruct msg (Echo'echo'params msg)) where
     toStruct (Echo'echo'params'newtype_ struct) = struct
-instance (Untyped.HasMessage (Echo'echo'params msg)) where
-    type InMessage (Echo'echo'params msg) = msg
+instance (Untyped.HasMessage (Echo'echo'params mut) mut) where
     message (Echo'echo'params'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Echo'echo'params msg)) where
+instance (Untyped.MessageDefault (Echo'echo'params mut) mut) where
     messageDefault msg = (Echo'echo'params'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Echo'echo'params msg)) where
     fromPtr msg ptr = (Echo'echo'params'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Echo'echo'params (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Echo'echo'params (Message.Mut s))) where
     toPtr msg (Echo'echo'params'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Echo'echo'params (Message.MutMsg s))) where
+instance (Classes.Allocate s (Echo'echo'params (Message.Mut s))) where
     new msg = (Echo'echo'params'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Echo'echo'params msg)) where
-    newtype List msg (Echo'echo'params msg)
-        = Echo'echo'params'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Echo'echo'params mut)) where
+    newtype List mut (Echo'echo'params mut)
+        = Echo'echo'params'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Echo'echo'params'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Echo'echo'params'List_ l) = (Untyped.ListStruct l)
     length (Echo'echo'params'List_ l) = (Untyped.length l)
@@ -56,7 +57,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Echo'echo'params (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Echo'echo'params (Message.Mut s))) where
     setIndex (Echo'echo'params'newtype_ elt) i (Echo'echo'params'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Echo'echo'params'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
 get_Echo'echo'params'query :: ((Untyped.ReadCtx m msg)
@@ -66,14 +67,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Echo'echo'params'query :: ((Untyped.RWCtx m s)
-                              ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (Echo'echo'params (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
+                              ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Echo'echo'params (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
 set_Echo'echo'params'query (Echo'echo'params'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Echo'echo'params'query :: ((Untyped.ReadCtx m msg)) => (Echo'echo'params msg) -> (m Std_.Bool)
 has_Echo'echo'params'query (Echo'echo'params'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Echo'echo'params'query :: ((Untyped.RWCtx m s)) => Std_.Int -> (Echo'echo'params (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
+new_Echo'echo'params'query :: ((Untyped.RWCtx m s)) => Std_.Int -> (Echo'echo'params (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
 new_Echo'echo'params'query len struct = (do
     result <- (Basics.newText (Untyped.message struct) len)
     (set_Echo'echo'params'query struct result)
@@ -85,20 +86,19 @@
     fromStruct struct = (Std_.pure (Echo'echo'results'newtype_ struct))
 instance (Classes.ToStruct msg (Echo'echo'results msg)) where
     toStruct (Echo'echo'results'newtype_ struct) = struct
-instance (Untyped.HasMessage (Echo'echo'results msg)) where
-    type InMessage (Echo'echo'results msg) = msg
+instance (Untyped.HasMessage (Echo'echo'results mut) mut) where
     message (Echo'echo'results'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Echo'echo'results msg)) where
+instance (Untyped.MessageDefault (Echo'echo'results mut) mut) where
     messageDefault msg = (Echo'echo'results'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Echo'echo'results msg)) where
     fromPtr msg ptr = (Echo'echo'results'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Echo'echo'results (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Echo'echo'results (Message.Mut s))) where
     toPtr msg (Echo'echo'results'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Echo'echo'results (Message.MutMsg s))) where
+instance (Classes.Allocate s (Echo'echo'results (Message.Mut s))) where
     new msg = (Echo'echo'results'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Echo'echo'results msg)) where
-    newtype List msg (Echo'echo'results msg)
-        = Echo'echo'results'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Echo'echo'results mut)) where
+    newtype List mut (Echo'echo'results mut)
+        = Echo'echo'results'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Echo'echo'results'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Echo'echo'results'List_ l) = (Untyped.ListStruct l)
     length (Echo'echo'results'List_ l) = (Untyped.length l)
@@ -106,7 +106,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Echo'echo'results (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Echo'echo'results (Message.Mut s))) where
     setIndex (Echo'echo'results'newtype_ elt) i (Echo'echo'results'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Echo'echo'results'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
 get_Echo'echo'results'reply :: ((Untyped.ReadCtx m msg)
@@ -116,14 +116,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Echo'echo'results'reply :: ((Untyped.RWCtx m s)
-                               ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (Echo'echo'results (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
+                               ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Echo'echo'results (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
 set_Echo'echo'results'reply (Echo'echo'results'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Echo'echo'results'reply :: ((Untyped.ReadCtx m msg)) => (Echo'echo'results msg) -> (m Std_.Bool)
 has_Echo'echo'results'reply (Echo'echo'results'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Echo'echo'results'reply :: ((Untyped.RWCtx m s)) => Std_.Int -> (Echo'echo'results (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
+new_Echo'echo'results'reply :: ((Untyped.RWCtx m s)) => Std_.Int -> (Echo'echo'results (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
 new_Echo'echo'results'reply len struct = (do
     result <- (Basics.newText (Untyped.message struct) len)
     (set_Echo'echo'results'reply struct result)
diff --git a/examples/gen/lib/Capnp/Gen/Echo/Pure.hs b/examples/gen/lib/Capnp/Gen/Echo/Pure.hs
--- a/examples/gen/lib/Capnp/Gen/Echo/Pure.hs
+++ b/examples/gen/lib/Capnp/Gen/Echo/Pure.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds #-}
 {-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE DuplicateRecordFields #-}
 {-# LANGUAGE FlexibleContexts #-}
@@ -11,6 +12,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.Echo.Pure(Echo(..)
                           ,Echo'server_(..)
                           ,export_Echo
@@ -89,7 +91,7 @@
             ,Generics.Generic)
 instance (Default.Default (Echo'echo'params)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Echo'echo'params)) where
+instance (Classes.FromStruct Message.Const (Echo'echo'params)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Echo'echo'params)) where
     type Cerial msg (Echo'echo'params) = (Capnp.Gen.ById.Xd0a87f36fa0182f5.Echo'echo'params msg)
@@ -124,7 +126,7 @@
             ,Generics.Generic)
 instance (Default.Default (Echo'echo'results)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Echo'echo'results)) where
+instance (Classes.FromStruct Message.Const (Echo'echo'results)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Echo'echo'results)) where
     type Cerial msg (Echo'echo'results) = (Capnp.Gen.ById.Xd0a87f36fa0182f5.Echo'echo'results msg)
diff --git a/gen/lib/Capnp/Gen/ById/X86c366a91393f3f8.hs b/gen/lib/Capnp/Gen/ById/X86c366a91393f3f8.hs
--- a/gen/lib/Capnp/Gen/ById/X86c366a91393f3f8.hs
+++ b/gen/lib/Capnp/Gen/ById/X86c366a91393f3f8.hs
@@ -2,6 +2,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.ById.X86c366a91393f3f8(module Capnp.Gen.Capnp.Stream) where
 import Capnp.Gen.Capnp.Stream
 import qualified Prelude as Std_
diff --git a/gen/lib/Capnp/Gen/ById/X86c366a91393f3f8/Pure.hs b/gen/lib/Capnp/Gen/ById/X86c366a91393f3f8/Pure.hs
--- a/gen/lib/Capnp/Gen/ById/X86c366a91393f3f8/Pure.hs
+++ b/gen/lib/Capnp/Gen/ById/X86c366a91393f3f8/Pure.hs
@@ -2,6 +2,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.ById.X86c366a91393f3f8.Pure(module Capnp.Gen.Capnp.Stream.Pure) where
 import Capnp.Gen.Capnp.Stream.Pure
 import qualified Prelude as Std_
diff --git a/gen/lib/Capnp/Gen/ById/X8ef99297a43a5e34.hs b/gen/lib/Capnp/Gen/ById/X8ef99297a43a5e34.hs
--- a/gen/lib/Capnp/Gen/ById/X8ef99297a43a5e34.hs
+++ b/gen/lib/Capnp/Gen/ById/X8ef99297a43a5e34.hs
@@ -2,6 +2,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.ById.X8ef99297a43a5e34(module Capnp.Gen.Capnp.Compat.Json) where
 import Capnp.Gen.Capnp.Compat.Json
 import qualified Prelude as Std_
diff --git a/gen/lib/Capnp/Gen/ById/X8ef99297a43a5e34/Pure.hs b/gen/lib/Capnp/Gen/ById/X8ef99297a43a5e34/Pure.hs
--- a/gen/lib/Capnp/Gen/ById/X8ef99297a43a5e34/Pure.hs
+++ b/gen/lib/Capnp/Gen/ById/X8ef99297a43a5e34/Pure.hs
@@ -2,6 +2,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.ById.X8ef99297a43a5e34.Pure(module Capnp.Gen.Capnp.Compat.Json.Pure) where
 import Capnp.Gen.Capnp.Compat.Json.Pure
 import qualified Prelude as Std_
diff --git a/gen/lib/Capnp/Gen/ById/Xa184c7885cdaf2a1.hs b/gen/lib/Capnp/Gen/ById/Xa184c7885cdaf2a1.hs
--- a/gen/lib/Capnp/Gen/ById/Xa184c7885cdaf2a1.hs
+++ b/gen/lib/Capnp/Gen/ById/Xa184c7885cdaf2a1.hs
@@ -2,6 +2,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.ById.Xa184c7885cdaf2a1(module Capnp.Gen.Capnp.RpcTwoparty) where
 import Capnp.Gen.Capnp.RpcTwoparty
 import qualified Prelude as Std_
diff --git a/gen/lib/Capnp/Gen/ById/Xa184c7885cdaf2a1/Pure.hs b/gen/lib/Capnp/Gen/ById/Xa184c7885cdaf2a1/Pure.hs
--- a/gen/lib/Capnp/Gen/ById/Xa184c7885cdaf2a1/Pure.hs
+++ b/gen/lib/Capnp/Gen/ById/Xa184c7885cdaf2a1/Pure.hs
@@ -2,6 +2,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.ById.Xa184c7885cdaf2a1.Pure(module Capnp.Gen.Capnp.RpcTwoparty.Pure) where
 import Capnp.Gen.Capnp.RpcTwoparty.Pure
 import qualified Prelude as Std_
diff --git a/gen/lib/Capnp/Gen/ById/Xa93fc509624c72d9.hs b/gen/lib/Capnp/Gen/ById/Xa93fc509624c72d9.hs
--- a/gen/lib/Capnp/Gen/ById/Xa93fc509624c72d9.hs
+++ b/gen/lib/Capnp/Gen/ById/Xa93fc509624c72d9.hs
@@ -2,6 +2,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.ById.Xa93fc509624c72d9(module Capnp.Gen.Capnp.Schema) where
 import Capnp.Gen.Capnp.Schema
 import qualified Prelude as Std_
diff --git a/gen/lib/Capnp/Gen/ById/Xa93fc509624c72d9/Pure.hs b/gen/lib/Capnp/Gen/ById/Xa93fc509624c72d9/Pure.hs
--- a/gen/lib/Capnp/Gen/ById/Xa93fc509624c72d9/Pure.hs
+++ b/gen/lib/Capnp/Gen/ById/Xa93fc509624c72d9/Pure.hs
@@ -2,6 +2,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.ById.Xa93fc509624c72d9.Pure(module Capnp.Gen.Capnp.Schema.Pure) where
 import Capnp.Gen.Capnp.Schema.Pure
 import qualified Prelude as Std_
diff --git a/gen/lib/Capnp/Gen/ById/Xb312981b2552a250.hs b/gen/lib/Capnp/Gen/ById/Xb312981b2552a250.hs
--- a/gen/lib/Capnp/Gen/ById/Xb312981b2552a250.hs
+++ b/gen/lib/Capnp/Gen/ById/Xb312981b2552a250.hs
@@ -2,6 +2,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.ById.Xb312981b2552a250(module Capnp.Gen.Capnp.Rpc) where
 import Capnp.Gen.Capnp.Rpc
 import qualified Prelude as Std_
diff --git a/gen/lib/Capnp/Gen/ById/Xb312981b2552a250/Pure.hs b/gen/lib/Capnp/Gen/ById/Xb312981b2552a250/Pure.hs
--- a/gen/lib/Capnp/Gen/ById/Xb312981b2552a250/Pure.hs
+++ b/gen/lib/Capnp/Gen/ById/Xb312981b2552a250/Pure.hs
@@ -2,6 +2,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.ById.Xb312981b2552a250.Pure(module Capnp.Gen.Capnp.Rpc.Pure) where
 import Capnp.Gen.Capnp.Rpc.Pure
 import qualified Prelude as Std_
diff --git a/gen/lib/Capnp/Gen/ById/Xb8630836983feed7.hs b/gen/lib/Capnp/Gen/ById/Xb8630836983feed7.hs
--- a/gen/lib/Capnp/Gen/ById/Xb8630836983feed7.hs
+++ b/gen/lib/Capnp/Gen/ById/Xb8630836983feed7.hs
@@ -2,6 +2,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.ById.Xb8630836983feed7(module Capnp.Gen.Capnp.Persistent) where
 import Capnp.Gen.Capnp.Persistent
 import qualified Prelude as Std_
diff --git a/gen/lib/Capnp/Gen/ById/Xb8630836983feed7/Pure.hs b/gen/lib/Capnp/Gen/ById/Xb8630836983feed7/Pure.hs
--- a/gen/lib/Capnp/Gen/ById/Xb8630836983feed7/Pure.hs
+++ b/gen/lib/Capnp/Gen/ById/Xb8630836983feed7/Pure.hs
@@ -2,6 +2,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.ById.Xb8630836983feed7.Pure(module Capnp.Gen.Capnp.Persistent.Pure) where
 import Capnp.Gen.Capnp.Persistent.Pure
 import qualified Prelude as Std_
diff --git a/gen/lib/Capnp/Gen/ById/Xbdf87d7bb8304e81.hs b/gen/lib/Capnp/Gen/ById/Xbdf87d7bb8304e81.hs
--- a/gen/lib/Capnp/Gen/ById/Xbdf87d7bb8304e81.hs
+++ b/gen/lib/Capnp/Gen/ById/Xbdf87d7bb8304e81.hs
@@ -2,6 +2,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.ById.Xbdf87d7bb8304e81(module Capnp.Gen.Capnp.Cxx) where
 import Capnp.Gen.Capnp.Cxx
 import qualified Prelude as Std_
diff --git a/gen/lib/Capnp/Gen/ById/Xbdf87d7bb8304e81/Pure.hs b/gen/lib/Capnp/Gen/ById/Xbdf87d7bb8304e81/Pure.hs
--- a/gen/lib/Capnp/Gen/ById/Xbdf87d7bb8304e81/Pure.hs
+++ b/gen/lib/Capnp/Gen/ById/Xbdf87d7bb8304e81/Pure.hs
@@ -2,6 +2,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.ById.Xbdf87d7bb8304e81.Pure(module Capnp.Gen.Capnp.Cxx.Pure) where
 import Capnp.Gen.Capnp.Cxx.Pure
 import qualified Prelude as Std_
diff --git a/gen/lib/Capnp/Gen/Capnp/Compat/Json.hs b/gen/lib/Capnp/Gen/Capnp/Compat/Json.hs
--- a/gen/lib/Capnp/Gen/Capnp/Compat/Json.hs
+++ b/gen/lib/Capnp/Gen/Capnp/Compat/Json.hs
@@ -3,11 +3,13 @@
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE DataKinds #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# OPTIONS_GHC -Wno-unused-imports #-}
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.Capnp.Compat.Json where
 import qualified Capnp.Message as Message
 import qualified Capnp.Untyped as Untyped
@@ -28,20 +30,19 @@
     fromStruct struct = (Std_.pure (Value'newtype_ struct))
 instance (Classes.ToStruct msg (Value msg)) where
     toStruct (Value'newtype_ struct) = struct
-instance (Untyped.HasMessage (Value msg)) where
-    type InMessage (Value msg) = msg
+instance (Untyped.HasMessage (Value mut) mut) where
     message (Value'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Value msg)) where
+instance (Untyped.MessageDefault (Value mut) mut) where
     messageDefault msg = (Value'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Value msg)) where
     fromPtr msg ptr = (Value'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Value (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Value (Message.Mut s))) where
     toPtr msg (Value'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Value (Message.MutMsg s))) where
+instance (Classes.Allocate s (Value (Message.Mut s))) where
     new msg = (Value'newtype_ <$> (Untyped.allocStruct msg 2 1))
-instance (Basics.ListElem msg (Value msg)) where
-    newtype List msg (Value msg)
-        = Value'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Value mut)) where
+    newtype List mut (Value mut)
+        = Value'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Value'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Value'List_ l) = (Untyped.ListStruct l)
     length (Value'List_ l) = (Untyped.length l)
@@ -49,19 +50,19 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Value (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Value (Message.Mut s))) where
     setIndex (Value'newtype_ elt) i (Value'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Value'List_ <$> (Untyped.allocCompositeList msg 2 1 len))
-data Value' msg
+data Value' (mut :: Message.Mutability)
     = Value'null 
     | Value'boolean Std_.Bool
     | Value'number Std_.Double
-    | Value'string (Basics.Text msg)
-    | Value'array (Basics.List msg (Value msg))
-    | Value'object (Basics.List msg (Value'Field msg))
-    | Value'call (Value'Call msg)
+    | Value'string (Basics.Text mut)
+    | Value'array (Basics.List mut (Value mut))
+    | Value'object (Basics.List mut (Value'Field mut))
+    | Value'call (Value'Call mut)
     | Value'unknown' Std_.Word16
-instance (Classes.FromStruct msg (Value' msg)) where
+instance (Classes.FromStruct mut (Value' mut)) where
     fromStruct struct = (do
         tag <- (GenHelpers.getTag struct 0)
         case tag of
@@ -97,23 +98,23 @@
 get_Value' :: ((Untyped.ReadCtx m msg)
               ,(Classes.FromStruct msg (Value' msg))) => (Value msg) -> (m (Value' msg))
 get_Value' (Value'newtype_ struct) = (Classes.fromStruct struct)
-set_Value'null :: ((Untyped.RWCtx m s)) => (Value (Message.MutMsg s)) -> (m ())
+set_Value'null :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> (m ())
 set_Value'null (Value'newtype_ struct) = (do
     (GenHelpers.setWordField struct (0 :: Std_.Word16) 0 0 0)
     (Std_.pure ())
     )
-set_Value'boolean :: ((Untyped.RWCtx m s)) => (Value (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_Value'boolean :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Bool -> (m ())
 set_Value'boolean (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (1 :: Std_.Word16) 0 0 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 0 16 0)
     )
-set_Value'number :: ((Untyped.RWCtx m s)) => (Value (Message.MutMsg s)) -> Std_.Double -> (m ())
+set_Value'number :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Double -> (m ())
 set_Value'number (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (2 :: Std_.Word16) 0 0 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
     )
 set_Value'string :: ((Untyped.RWCtx m s)
-                    ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (Value (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
+                    ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Value (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
 set_Value'string (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (3 :: Std_.Word16) 0 0 0)
     (do
@@ -122,7 +123,7 @@
         )
     )
 set_Value'array :: ((Untyped.RWCtx m s)
-                   ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Value (Message.MutMsg s))))) => (Value (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Value (Message.MutMsg s))) -> (m ())
+                   ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Value (Message.Mut s))))) => (Value (Message.Mut s)) -> (Basics.List (Message.Mut s) (Value (Message.Mut s))) -> (m ())
 set_Value'array (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (4 :: Std_.Word16) 0 0 0)
     (do
@@ -131,7 +132,7 @@
         )
     )
 set_Value'object :: ((Untyped.RWCtx m s)
-                    ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Value'Field (Message.MutMsg s))))) => (Value (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Value'Field (Message.MutMsg s))) -> (m ())
+                    ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Value'Field (Message.Mut s))))) => (Value (Message.Mut s)) -> (Basics.List (Message.Mut s) (Value'Field (Message.Mut s))) -> (m ())
 set_Value'object (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (5 :: Std_.Word16) 0 0 0)
     (do
@@ -140,7 +141,7 @@
         )
     )
 set_Value'call :: ((Untyped.RWCtx m s)
-                  ,(Classes.ToPtr s (Value'Call (Message.MutMsg s)))) => (Value (Message.MutMsg s)) -> (Value'Call (Message.MutMsg s)) -> (m ())
+                  ,(Classes.ToPtr s (Value'Call (Message.Mut s)))) => (Value (Message.Mut s)) -> (Value'Call (Message.Mut s)) -> (m ())
 set_Value'call (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (6 :: Std_.Word16) 0 0 0)
     (do
@@ -148,7 +149,7 @@
         (Untyped.setPtr ptr 0 struct)
         )
     )
-set_Value'unknown' :: ((Untyped.RWCtx m s)) => (Value (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Value'unknown' :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Value'unknown' (Value'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
 newtype Value'Field msg
     = Value'Field'newtype_ (Untyped.Struct msg)
@@ -156,20 +157,19 @@
     fromStruct struct = (Std_.pure (Value'Field'newtype_ struct))
 instance (Classes.ToStruct msg (Value'Field msg)) where
     toStruct (Value'Field'newtype_ struct) = struct
-instance (Untyped.HasMessage (Value'Field msg)) where
-    type InMessage (Value'Field msg) = msg
+instance (Untyped.HasMessage (Value'Field mut) mut) where
     message (Value'Field'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Value'Field msg)) where
+instance (Untyped.MessageDefault (Value'Field mut) mut) where
     messageDefault msg = (Value'Field'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Value'Field msg)) where
     fromPtr msg ptr = (Value'Field'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Value'Field (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Value'Field (Message.Mut s))) where
     toPtr msg (Value'Field'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Value'Field (Message.MutMsg s))) where
+instance (Classes.Allocate s (Value'Field (Message.Mut s))) where
     new msg = (Value'Field'newtype_ <$> (Untyped.allocStruct msg 0 2))
-instance (Basics.ListElem msg (Value'Field msg)) where
-    newtype List msg (Value'Field msg)
-        = Value'Field'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Value'Field mut)) where
+    newtype List mut (Value'Field mut)
+        = Value'Field'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Value'Field'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Value'Field'List_ l) = (Untyped.ListStruct l)
     length (Value'Field'List_ l) = (Untyped.length l)
@@ -177,7 +177,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Value'Field (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Value'Field (Message.Mut s))) where
     setIndex (Value'Field'newtype_ elt) i (Value'Field'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Value'Field'List_ <$> (Untyped.allocCompositeList msg 0 2 len))
 get_Value'Field'name :: ((Untyped.ReadCtx m msg)
@@ -187,14 +187,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Value'Field'name :: ((Untyped.RWCtx m s)
-                        ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (Value'Field (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
+                        ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Value'Field (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
 set_Value'Field'name (Value'Field'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Value'Field'name :: ((Untyped.ReadCtx m msg)) => (Value'Field msg) -> (m Std_.Bool)
 has_Value'Field'name (Value'Field'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Value'Field'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (Value'Field (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
+new_Value'Field'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (Value'Field (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
 new_Value'Field'name len struct = (do
     result <- (Basics.newText (Untyped.message struct) len)
     (set_Value'Field'name struct result)
@@ -207,14 +207,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Value'Field'value :: ((Untyped.RWCtx m s)
-                         ,(Classes.ToPtr s (Value (Message.MutMsg s)))) => (Value'Field (Message.MutMsg s)) -> (Value (Message.MutMsg s)) -> (m ())
+                         ,(Classes.ToPtr s (Value (Message.Mut s)))) => (Value'Field (Message.Mut s)) -> (Value (Message.Mut s)) -> (m ())
 set_Value'Field'value (Value'Field'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 1 struct)
     )
 has_Value'Field'value :: ((Untyped.ReadCtx m msg)) => (Value'Field msg) -> (m Std_.Bool)
 has_Value'Field'value (Value'Field'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_Value'Field'value :: ((Untyped.RWCtx m s)) => (Value'Field (Message.MutMsg s)) -> (m (Value (Message.MutMsg s)))
+new_Value'Field'value :: ((Untyped.RWCtx m s)) => (Value'Field (Message.Mut s)) -> (m (Value (Message.Mut s)))
 new_Value'Field'value struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Value'Field'value struct result)
@@ -226,20 +226,19 @@
     fromStruct struct = (Std_.pure (Value'Call'newtype_ struct))
 instance (Classes.ToStruct msg (Value'Call msg)) where
     toStruct (Value'Call'newtype_ struct) = struct
-instance (Untyped.HasMessage (Value'Call msg)) where
-    type InMessage (Value'Call msg) = msg
+instance (Untyped.HasMessage (Value'Call mut) mut) where
     message (Value'Call'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Value'Call msg)) where
+instance (Untyped.MessageDefault (Value'Call mut) mut) where
     messageDefault msg = (Value'Call'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Value'Call msg)) where
     fromPtr msg ptr = (Value'Call'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Value'Call (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Value'Call (Message.Mut s))) where
     toPtr msg (Value'Call'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Value'Call (Message.MutMsg s))) where
+instance (Classes.Allocate s (Value'Call (Message.Mut s))) where
     new msg = (Value'Call'newtype_ <$> (Untyped.allocStruct msg 0 2))
-instance (Basics.ListElem msg (Value'Call msg)) where
-    newtype List msg (Value'Call msg)
-        = Value'Call'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Value'Call mut)) where
+    newtype List mut (Value'Call mut)
+        = Value'Call'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Value'Call'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Value'Call'List_ l) = (Untyped.ListStruct l)
     length (Value'Call'List_ l) = (Untyped.length l)
@@ -247,7 +246,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Value'Call (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Value'Call (Message.Mut s))) where
     setIndex (Value'Call'newtype_ elt) i (Value'Call'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Value'Call'List_ <$> (Untyped.allocCompositeList msg 0 2 len))
 get_Value'Call'function :: ((Untyped.ReadCtx m msg)
@@ -257,14 +256,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Value'Call'function :: ((Untyped.RWCtx m s)
-                           ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (Value'Call (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
+                           ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Value'Call (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
 set_Value'Call'function (Value'Call'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Value'Call'function :: ((Untyped.ReadCtx m msg)) => (Value'Call msg) -> (m Std_.Bool)
 has_Value'Call'function (Value'Call'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Value'Call'function :: ((Untyped.RWCtx m s)) => Std_.Int -> (Value'Call (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
+new_Value'Call'function :: ((Untyped.RWCtx m s)) => Std_.Int -> (Value'Call (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
 new_Value'Call'function len struct = (do
     result <- (Basics.newText (Untyped.message struct) len)
     (set_Value'Call'function struct result)
@@ -277,14 +276,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Value'Call'params :: ((Untyped.RWCtx m s)
-                         ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Value (Message.MutMsg s))))) => (Value'Call (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Value (Message.MutMsg s))) -> (m ())
+                         ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Value (Message.Mut s))))) => (Value'Call (Message.Mut s)) -> (Basics.List (Message.Mut s) (Value (Message.Mut s))) -> (m ())
 set_Value'Call'params (Value'Call'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 1 struct)
     )
 has_Value'Call'params :: ((Untyped.ReadCtx m msg)) => (Value'Call msg) -> (m Std_.Bool)
 has_Value'Call'params (Value'Call'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_Value'Call'params :: ((Untyped.RWCtx m s)) => Std_.Int -> (Value'Call (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Value (Message.MutMsg s))))
+new_Value'Call'params :: ((Untyped.RWCtx m s)) => Std_.Int -> (Value'Call (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Value (Message.Mut s))))
 new_Value'Call'params len struct = (do
     result <- (Classes.newList (Untyped.message struct) len)
     (set_Value'Call'params struct result)
@@ -296,20 +295,19 @@
     fromStruct struct = (Std_.pure (FlattenOptions'newtype_ struct))
 instance (Classes.ToStruct msg (FlattenOptions msg)) where
     toStruct (FlattenOptions'newtype_ struct) = struct
-instance (Untyped.HasMessage (FlattenOptions msg)) where
-    type InMessage (FlattenOptions msg) = msg
+instance (Untyped.HasMessage (FlattenOptions mut) mut) where
     message (FlattenOptions'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (FlattenOptions msg)) where
+instance (Untyped.MessageDefault (FlattenOptions mut) mut) where
     messageDefault msg = (FlattenOptions'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (FlattenOptions msg)) where
     fromPtr msg ptr = (FlattenOptions'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (FlattenOptions (Message.MutMsg s))) where
+instance (Classes.ToPtr s (FlattenOptions (Message.Mut s))) where
     toPtr msg (FlattenOptions'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (FlattenOptions (Message.MutMsg s))) where
+instance (Classes.Allocate s (FlattenOptions (Message.Mut s))) where
     new msg = (FlattenOptions'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (FlattenOptions msg)) where
-    newtype List msg (FlattenOptions msg)
-        = FlattenOptions'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (FlattenOptions mut)) where
+    newtype List mut (FlattenOptions mut)
+        = FlattenOptions'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (FlattenOptions'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (FlattenOptions'List_ l) = (Untyped.ListStruct l)
     length (FlattenOptions'List_ l) = (Untyped.length l)
@@ -317,7 +315,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (FlattenOptions (Message.MutMsg s))) where
+instance (Basics.MutListElem s (FlattenOptions (Message.Mut s))) where
     setIndex (FlattenOptions'newtype_ elt) i (FlattenOptions'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (FlattenOptions'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
 get_FlattenOptions'prefix :: ((Untyped.ReadCtx m msg)
@@ -327,14 +325,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_FlattenOptions'prefix :: ((Untyped.RWCtx m s)
-                             ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (FlattenOptions (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
+                             ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (FlattenOptions (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
 set_FlattenOptions'prefix (FlattenOptions'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_FlattenOptions'prefix :: ((Untyped.ReadCtx m msg)) => (FlattenOptions msg) -> (m Std_.Bool)
 has_FlattenOptions'prefix (FlattenOptions'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_FlattenOptions'prefix :: ((Untyped.RWCtx m s)) => Std_.Int -> (FlattenOptions (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
+new_FlattenOptions'prefix :: ((Untyped.RWCtx m s)) => Std_.Int -> (FlattenOptions (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
 new_FlattenOptions'prefix len struct = (do
     result <- (Basics.newText (Untyped.message struct) len)
     (set_FlattenOptions'prefix struct result)
@@ -346,20 +344,19 @@
     fromStruct struct = (Std_.pure (DiscriminatorOptions'newtype_ struct))
 instance (Classes.ToStruct msg (DiscriminatorOptions msg)) where
     toStruct (DiscriminatorOptions'newtype_ struct) = struct
-instance (Untyped.HasMessage (DiscriminatorOptions msg)) where
-    type InMessage (DiscriminatorOptions msg) = msg
+instance (Untyped.HasMessage (DiscriminatorOptions mut) mut) where
     message (DiscriminatorOptions'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (DiscriminatorOptions msg)) where
+instance (Untyped.MessageDefault (DiscriminatorOptions mut) mut) where
     messageDefault msg = (DiscriminatorOptions'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (DiscriminatorOptions msg)) where
     fromPtr msg ptr = (DiscriminatorOptions'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (DiscriminatorOptions (Message.MutMsg s))) where
+instance (Classes.ToPtr s (DiscriminatorOptions (Message.Mut s))) where
     toPtr msg (DiscriminatorOptions'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (DiscriminatorOptions (Message.MutMsg s))) where
+instance (Classes.Allocate s (DiscriminatorOptions (Message.Mut s))) where
     new msg = (DiscriminatorOptions'newtype_ <$> (Untyped.allocStruct msg 0 2))
-instance (Basics.ListElem msg (DiscriminatorOptions msg)) where
-    newtype List msg (DiscriminatorOptions msg)
-        = DiscriminatorOptions'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (DiscriminatorOptions mut)) where
+    newtype List mut (DiscriminatorOptions mut)
+        = DiscriminatorOptions'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (DiscriminatorOptions'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (DiscriminatorOptions'List_ l) = (Untyped.ListStruct l)
     length (DiscriminatorOptions'List_ l) = (Untyped.length l)
@@ -367,7 +364,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (DiscriminatorOptions (Message.MutMsg s))) where
+instance (Basics.MutListElem s (DiscriminatorOptions (Message.Mut s))) where
     setIndex (DiscriminatorOptions'newtype_ elt) i (DiscriminatorOptions'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (DiscriminatorOptions'List_ <$> (Untyped.allocCompositeList msg 0 2 len))
 get_DiscriminatorOptions'name :: ((Untyped.ReadCtx m msg)
@@ -377,14 +374,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_DiscriminatorOptions'name :: ((Untyped.RWCtx m s)
-                                 ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (DiscriminatorOptions (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
+                                 ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (DiscriminatorOptions (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
 set_DiscriminatorOptions'name (DiscriminatorOptions'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_DiscriminatorOptions'name :: ((Untyped.ReadCtx m msg)) => (DiscriminatorOptions msg) -> (m Std_.Bool)
 has_DiscriminatorOptions'name (DiscriminatorOptions'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_DiscriminatorOptions'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (DiscriminatorOptions (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
+new_DiscriminatorOptions'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (DiscriminatorOptions (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
 new_DiscriminatorOptions'name len struct = (do
     result <- (Basics.newText (Untyped.message struct) len)
     (set_DiscriminatorOptions'name struct result)
@@ -397,14 +394,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_DiscriminatorOptions'valueName :: ((Untyped.RWCtx m s)
-                                      ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (DiscriminatorOptions (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
+                                      ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (DiscriminatorOptions (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
 set_DiscriminatorOptions'valueName (DiscriminatorOptions'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 1 struct)
     )
 has_DiscriminatorOptions'valueName :: ((Untyped.ReadCtx m msg)) => (DiscriminatorOptions msg) -> (m Std_.Bool)
 has_DiscriminatorOptions'valueName (DiscriminatorOptions'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_DiscriminatorOptions'valueName :: ((Untyped.RWCtx m s)) => Std_.Int -> (DiscriminatorOptions (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
+new_DiscriminatorOptions'valueName :: ((Untyped.RWCtx m s)) => Std_.Int -> (DiscriminatorOptions (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
 new_DiscriminatorOptions'valueName len struct = (do
     result <- (Basics.newText (Untyped.message struct) len)
     (set_DiscriminatorOptions'valueName struct result)
diff --git a/gen/lib/Capnp/Gen/Capnp/Compat/Json/Pure.hs b/gen/lib/Capnp/Gen/Capnp/Compat/Json/Pure.hs
--- a/gen/lib/Capnp/Gen/Capnp/Compat/Json/Pure.hs
+++ b/gen/lib/Capnp/Gen/Capnp/Compat/Json/Pure.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds #-}
 {-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE DuplicateRecordFields #-}
 {-# LANGUAGE FlexibleContexts #-}
@@ -11,6 +12,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.Capnp.Compat.Json.Pure(Value(..)
                                        ,Value'Field(..)
                                        ,Value'Call(..)
@@ -47,7 +49,7 @@
             ,Generics.Generic)
 instance (Default.Default (Value)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Value)) where
+instance (Classes.FromStruct Message.Const (Value)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Value)) where
     type Cerial msg (Value) = (Capnp.Gen.ById.X8ef99297a43a5e34.Value msg)
@@ -113,7 +115,7 @@
             ,Generics.Generic)
 instance (Default.Default (Value'Field)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Value'Field)) where
+instance (Classes.FromStruct Message.Const (Value'Field)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Value'Field)) where
     type Cerial msg (Value'Field) = (Capnp.Gen.ById.X8ef99297a43a5e34.Value'Field msg)
@@ -151,7 +153,7 @@
             ,Generics.Generic)
 instance (Default.Default (Value'Call)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Value'Call)) where
+instance (Classes.FromStruct Message.Const (Value'Call)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Value'Call)) where
     type Cerial msg (Value'Call) = (Capnp.Gen.ById.X8ef99297a43a5e34.Value'Call msg)
@@ -188,7 +190,7 @@
             ,Generics.Generic)
 instance (Default.Default (FlattenOptions)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (FlattenOptions)) where
+instance (Classes.FromStruct Message.Const (FlattenOptions)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (FlattenOptions)) where
     type Cerial msg (FlattenOptions) = (Capnp.Gen.ById.X8ef99297a43a5e34.FlattenOptions msg)
@@ -224,7 +226,7 @@
             ,Generics.Generic)
 instance (Default.Default (DiscriminatorOptions)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (DiscriminatorOptions)) where
+instance (Classes.FromStruct Message.Const (DiscriminatorOptions)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (DiscriminatorOptions)) where
     type Cerial msg (DiscriminatorOptions) = (Capnp.Gen.ById.X8ef99297a43a5e34.DiscriminatorOptions msg)
diff --git a/gen/lib/Capnp/Gen/Capnp/Cxx.hs b/gen/lib/Capnp/Gen/Capnp/Cxx.hs
--- a/gen/lib/Capnp/Gen/Capnp/Cxx.hs
+++ b/gen/lib/Capnp/Gen/Capnp/Cxx.hs
@@ -3,11 +3,13 @@
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE DataKinds #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# OPTIONS_GHC -Wno-unused-imports #-}
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.Capnp.Cxx where
 import qualified Capnp.Message as Message
 import qualified Capnp.Untyped as Untyped
diff --git a/gen/lib/Capnp/Gen/Capnp/Cxx/Pure.hs b/gen/lib/Capnp/Gen/Capnp/Cxx/Pure.hs
--- a/gen/lib/Capnp/Gen/Capnp/Cxx/Pure.hs
+++ b/gen/lib/Capnp/Gen/Capnp/Cxx/Pure.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds #-}
 {-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE DuplicateRecordFields #-}
 {-# LANGUAGE FlexibleContexts #-}
@@ -11,6 +12,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.Capnp.Cxx.Pure() where
 import qualified Capnp.GenHelpers.ReExports.Data.Vector as V
 import qualified Capnp.GenHelpers.ReExports.Data.Text as T
diff --git a/gen/lib/Capnp/Gen/Capnp/Persistent.hs b/gen/lib/Capnp/Gen/Capnp/Persistent.hs
--- a/gen/lib/Capnp/Gen/Capnp/Persistent.hs
+++ b/gen/lib/Capnp/Gen/Capnp/Persistent.hs
@@ -3,11 +3,13 @@
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE DataKinds #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# OPTIONS_GHC -Wno-unused-imports #-}
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.Capnp.Persistent where
 import qualified Capnp.Message as Message
 import qualified Capnp.Untyped as Untyped
@@ -26,7 +28,7 @@
     = Persistent'newtype_ (Std_.Maybe (Untyped.Cap msg))
 instance (Classes.FromPtr msg (Persistent sturdyRef owner msg)) where
     fromPtr msg ptr = (Persistent'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Persistent sturdyRef owner (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Persistent sturdyRef owner (Message.Mut s))) where
     toPtr msg (Persistent'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
     toPtr msg (Persistent'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
 newtype Persistent'SaveParams sturdyRef owner msg
@@ -35,20 +37,19 @@
     fromStruct struct = (Std_.pure (Persistent'SaveParams'newtype_ struct))
 instance (Classes.ToStruct msg (Persistent'SaveParams sturdyRef owner msg)) where
     toStruct (Persistent'SaveParams'newtype_ struct) = struct
-instance (Untyped.HasMessage (Persistent'SaveParams sturdyRef owner msg)) where
-    type InMessage (Persistent'SaveParams sturdyRef owner msg) = msg
+instance (Untyped.HasMessage (Persistent'SaveParams sturdyRef owner mut) mut) where
     message (Persistent'SaveParams'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Persistent'SaveParams sturdyRef owner msg)) where
+instance (Untyped.MessageDefault (Persistent'SaveParams sturdyRef owner mut) mut) where
     messageDefault msg = (Persistent'SaveParams'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Persistent'SaveParams sturdyRef owner msg)) where
     fromPtr msg ptr = (Persistent'SaveParams'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Persistent'SaveParams sturdyRef owner (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Persistent'SaveParams sturdyRef owner (Message.Mut s))) where
     toPtr msg (Persistent'SaveParams'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Persistent'SaveParams sturdyRef owner (Message.MutMsg s))) where
+instance (Classes.Allocate s (Persistent'SaveParams sturdyRef owner (Message.Mut s))) where
     new msg = (Persistent'SaveParams'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Persistent'SaveParams sturdyRef owner msg)) where
-    newtype List msg (Persistent'SaveParams sturdyRef owner msg)
-        = Persistent'SaveParams'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Persistent'SaveParams sturdyRef owner mut)) where
+    newtype List mut (Persistent'SaveParams sturdyRef owner mut)
+        = Persistent'SaveParams'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Persistent'SaveParams'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Persistent'SaveParams'List_ l) = (Untyped.ListStruct l)
     length (Persistent'SaveParams'List_ l) = (Untyped.length l)
@@ -56,7 +57,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Persistent'SaveParams sturdyRef owner (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Persistent'SaveParams sturdyRef owner (Message.Mut s))) where
     setIndex (Persistent'SaveParams'newtype_ elt) i (Persistent'SaveParams'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Persistent'SaveParams'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
 get_Persistent'SaveParams'sealFor :: ((Untyped.ReadCtx m msg)
@@ -66,7 +67,7 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Persistent'SaveParams'sealFor :: ((Untyped.RWCtx m s)
-                                     ,(Classes.ToPtr s owner)) => (Persistent'SaveParams sturdyRef owner (Message.MutMsg s)) -> owner -> (m ())
+                                     ,(Classes.ToPtr s owner)) => (Persistent'SaveParams sturdyRef owner (Message.Mut s)) -> owner -> (m ())
 set_Persistent'SaveParams'sealFor (Persistent'SaveParams'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
@@ -79,20 +80,19 @@
     fromStruct struct = (Std_.pure (Persistent'SaveResults'newtype_ struct))
 instance (Classes.ToStruct msg (Persistent'SaveResults sturdyRef owner msg)) where
     toStruct (Persistent'SaveResults'newtype_ struct) = struct
-instance (Untyped.HasMessage (Persistent'SaveResults sturdyRef owner msg)) where
-    type InMessage (Persistent'SaveResults sturdyRef owner msg) = msg
+instance (Untyped.HasMessage (Persistent'SaveResults sturdyRef owner mut) mut) where
     message (Persistent'SaveResults'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Persistent'SaveResults sturdyRef owner msg)) where
+instance (Untyped.MessageDefault (Persistent'SaveResults sturdyRef owner mut) mut) where
     messageDefault msg = (Persistent'SaveResults'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Persistent'SaveResults sturdyRef owner msg)) where
     fromPtr msg ptr = (Persistent'SaveResults'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Persistent'SaveResults sturdyRef owner (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Persistent'SaveResults sturdyRef owner (Message.Mut s))) where
     toPtr msg (Persistent'SaveResults'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Persistent'SaveResults sturdyRef owner (Message.MutMsg s))) where
+instance (Classes.Allocate s (Persistent'SaveResults sturdyRef owner (Message.Mut s))) where
     new msg = (Persistent'SaveResults'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Persistent'SaveResults sturdyRef owner msg)) where
-    newtype List msg (Persistent'SaveResults sturdyRef owner msg)
-        = Persistent'SaveResults'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Persistent'SaveResults sturdyRef owner mut)) where
+    newtype List mut (Persistent'SaveResults sturdyRef owner mut)
+        = Persistent'SaveResults'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Persistent'SaveResults'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Persistent'SaveResults'List_ l) = (Untyped.ListStruct l)
     length (Persistent'SaveResults'List_ l) = (Untyped.length l)
@@ -100,7 +100,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Persistent'SaveResults sturdyRef owner (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Persistent'SaveResults sturdyRef owner (Message.Mut s))) where
     setIndex (Persistent'SaveResults'newtype_ elt) i (Persistent'SaveResults'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Persistent'SaveResults'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
 get_Persistent'SaveResults'sturdyRef :: ((Untyped.ReadCtx m msg)
@@ -110,7 +110,7 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Persistent'SaveResults'sturdyRef :: ((Untyped.RWCtx m s)
-                                        ,(Classes.ToPtr s sturdyRef)) => (Persistent'SaveResults sturdyRef owner (Message.MutMsg s)) -> sturdyRef -> (m ())
+                                        ,(Classes.ToPtr s sturdyRef)) => (Persistent'SaveResults sturdyRef owner (Message.Mut s)) -> sturdyRef -> (m ())
 set_Persistent'SaveResults'sturdyRef (Persistent'SaveResults'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
@@ -121,7 +121,7 @@
     = RealmGateway'newtype_ (Std_.Maybe (Untyped.Cap msg))
 instance (Classes.FromPtr msg (RealmGateway internalRef externalRef internalOwner externalOwner msg)) where
     fromPtr msg ptr = (RealmGateway'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (RealmGateway internalRef externalRef internalOwner externalOwner (Message.MutMsg s))) where
+instance (Classes.ToPtr s (RealmGateway internalRef externalRef internalOwner externalOwner (Message.Mut s))) where
     toPtr msg (RealmGateway'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
     toPtr msg (RealmGateway'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
 newtype RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg
@@ -130,20 +130,19 @@
     fromStruct struct = (Std_.pure (RealmGateway'import'params'newtype_ struct))
 instance (Classes.ToStruct msg (RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg)) where
     toStruct (RealmGateway'import'params'newtype_ struct) = struct
-instance (Untyped.HasMessage (RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg)) where
-    type InMessage (RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg) = msg
+instance (Untyped.HasMessage (RealmGateway'import'params internalRef externalRef internalOwner externalOwner mut) mut) where
     message (RealmGateway'import'params'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg)) where
+instance (Untyped.MessageDefault (RealmGateway'import'params internalRef externalRef internalOwner externalOwner mut) mut) where
     messageDefault msg = (RealmGateway'import'params'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg)) where
     fromPtr msg ptr = (RealmGateway'import'params'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s))) where
+instance (Classes.ToPtr s (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.Mut s))) where
     toPtr msg (RealmGateway'import'params'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s))) where
+instance (Classes.Allocate s (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.Mut s))) where
     new msg = (RealmGateway'import'params'newtype_ <$> (Untyped.allocStruct msg 0 2))
-instance (Basics.ListElem msg (RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg)) where
-    newtype List msg (RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg)
-        = RealmGateway'import'params'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (RealmGateway'import'params internalRef externalRef internalOwner externalOwner mut)) where
+    newtype List mut (RealmGateway'import'params internalRef externalRef internalOwner externalOwner mut)
+        = RealmGateway'import'params'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (RealmGateway'import'params'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (RealmGateway'import'params'List_ l) = (Untyped.ListStruct l)
     length (RealmGateway'import'params'List_ l) = (Untyped.length l)
@@ -151,7 +150,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s))) where
+instance (Basics.MutListElem s (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.Mut s))) where
     setIndex (RealmGateway'import'params'newtype_ elt) i (RealmGateway'import'params'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (RealmGateway'import'params'List_ <$> (Untyped.allocCompositeList msg 0 2 len))
 get_RealmGateway'import'params'cap :: ((Untyped.ReadCtx m msg)
@@ -161,7 +160,7 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_RealmGateway'import'params'cap :: ((Untyped.RWCtx m s)
-                                      ,(Classes.ToPtr s (Persistent externalRef externalOwner (Message.MutMsg s)))) => (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s)) -> (Persistent externalRef externalOwner (Message.MutMsg s)) -> (m ())
+                                      ,(Classes.ToPtr s (Persistent externalRef externalOwner (Message.Mut s)))) => (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.Mut s)) -> (Persistent externalRef externalOwner (Message.Mut s)) -> (m ())
 set_RealmGateway'import'params'cap (RealmGateway'import'params'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
@@ -175,14 +174,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_RealmGateway'import'params'params :: ((Untyped.RWCtx m s)
-                                         ,(Classes.ToPtr s (Persistent'SaveParams internalRef internalOwner (Message.MutMsg s)))) => (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s)) -> (Persistent'SaveParams internalRef internalOwner (Message.MutMsg s)) -> (m ())
+                                         ,(Classes.ToPtr s (Persistent'SaveParams internalRef internalOwner (Message.Mut s)))) => (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.Mut s)) -> (Persistent'SaveParams internalRef internalOwner (Message.Mut s)) -> (m ())
 set_RealmGateway'import'params'params (RealmGateway'import'params'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 1 struct)
     )
 has_RealmGateway'import'params'params :: ((Untyped.ReadCtx m msg)) => (RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg) -> (m Std_.Bool)
 has_RealmGateway'import'params'params (RealmGateway'import'params'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_RealmGateway'import'params'params :: ((Untyped.RWCtx m s)) => (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s)) -> (m (Persistent'SaveParams internalRef internalOwner (Message.MutMsg s)))
+new_RealmGateway'import'params'params :: ((Untyped.RWCtx m s)) => (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.Mut s)) -> (m (Persistent'SaveParams internalRef internalOwner (Message.Mut s)))
 new_RealmGateway'import'params'params struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_RealmGateway'import'params'params struct result)
@@ -194,20 +193,19 @@
     fromStruct struct = (Std_.pure (RealmGateway'export'params'newtype_ struct))
 instance (Classes.ToStruct msg (RealmGateway'export'params internalRef externalRef internalOwner externalOwner msg)) where
     toStruct (RealmGateway'export'params'newtype_ struct) = struct
-instance (Untyped.HasMessage (RealmGateway'export'params internalRef externalRef internalOwner externalOwner msg)) where
-    type InMessage (RealmGateway'export'params internalRef externalRef internalOwner externalOwner msg) = msg
+instance (Untyped.HasMessage (RealmGateway'export'params internalRef externalRef internalOwner externalOwner mut) mut) where
     message (RealmGateway'export'params'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (RealmGateway'export'params internalRef externalRef internalOwner externalOwner msg)) where
+instance (Untyped.MessageDefault (RealmGateway'export'params internalRef externalRef internalOwner externalOwner mut) mut) where
     messageDefault msg = (RealmGateway'export'params'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (RealmGateway'export'params internalRef externalRef internalOwner externalOwner msg)) where
     fromPtr msg ptr = (RealmGateway'export'params'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s))) where
+instance (Classes.ToPtr s (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.Mut s))) where
     toPtr msg (RealmGateway'export'params'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s))) where
+instance (Classes.Allocate s (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.Mut s))) where
     new msg = (RealmGateway'export'params'newtype_ <$> (Untyped.allocStruct msg 0 2))
-instance (Basics.ListElem msg (RealmGateway'export'params internalRef externalRef internalOwner externalOwner msg)) where
-    newtype List msg (RealmGateway'export'params internalRef externalRef internalOwner externalOwner msg)
-        = RealmGateway'export'params'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (RealmGateway'export'params internalRef externalRef internalOwner externalOwner mut)) where
+    newtype List mut (RealmGateway'export'params internalRef externalRef internalOwner externalOwner mut)
+        = RealmGateway'export'params'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (RealmGateway'export'params'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (RealmGateway'export'params'List_ l) = (Untyped.ListStruct l)
     length (RealmGateway'export'params'List_ l) = (Untyped.length l)
@@ -215,7 +213,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s))) where
+instance (Basics.MutListElem s (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.Mut s))) where
     setIndex (RealmGateway'export'params'newtype_ elt) i (RealmGateway'export'params'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (RealmGateway'export'params'List_ <$> (Untyped.allocCompositeList msg 0 2 len))
 get_RealmGateway'export'params'cap :: ((Untyped.ReadCtx m msg)
@@ -225,7 +223,7 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_RealmGateway'export'params'cap :: ((Untyped.RWCtx m s)
-                                      ,(Classes.ToPtr s (Persistent internalRef internalOwner (Message.MutMsg s)))) => (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s)) -> (Persistent internalRef internalOwner (Message.MutMsg s)) -> (m ())
+                                      ,(Classes.ToPtr s (Persistent internalRef internalOwner (Message.Mut s)))) => (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.Mut s)) -> (Persistent internalRef internalOwner (Message.Mut s)) -> (m ())
 set_RealmGateway'export'params'cap (RealmGateway'export'params'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
@@ -239,14 +237,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_RealmGateway'export'params'params :: ((Untyped.RWCtx m s)
-                                         ,(Classes.ToPtr s (Persistent'SaveParams externalRef externalOwner (Message.MutMsg s)))) => (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s)) -> (Persistent'SaveParams externalRef externalOwner (Message.MutMsg s)) -> (m ())
+                                         ,(Classes.ToPtr s (Persistent'SaveParams externalRef externalOwner (Message.Mut s)))) => (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.Mut s)) -> (Persistent'SaveParams externalRef externalOwner (Message.Mut s)) -> (m ())
 set_RealmGateway'export'params'params (RealmGateway'export'params'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 1 struct)
     )
 has_RealmGateway'export'params'params :: ((Untyped.ReadCtx m msg)) => (RealmGateway'export'params internalRef externalRef internalOwner externalOwner msg) -> (m Std_.Bool)
 has_RealmGateway'export'params'params (RealmGateway'export'params'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_RealmGateway'export'params'params :: ((Untyped.RWCtx m s)) => (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s)) -> (m (Persistent'SaveParams externalRef externalOwner (Message.MutMsg s)))
+new_RealmGateway'export'params'params :: ((Untyped.RWCtx m s)) => (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.Mut s)) -> (m (Persistent'SaveParams externalRef externalOwner (Message.Mut s)))
 new_RealmGateway'export'params'params struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_RealmGateway'export'params'params struct result)
diff --git a/gen/lib/Capnp/Gen/Capnp/Persistent/Pure.hs b/gen/lib/Capnp/Gen/Capnp/Persistent/Pure.hs
--- a/gen/lib/Capnp/Gen/Capnp/Persistent/Pure.hs
+++ b/gen/lib/Capnp/Gen/Capnp/Persistent/Pure.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds #-}
 {-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE DuplicateRecordFields #-}
 {-# LANGUAGE FlexibleContexts #-}
@@ -11,6 +12,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.Capnp.Persistent.Pure(Persistent(..)
                                       ,Persistent'server_(..)
                                       ,export_Persistent
@@ -93,29 +95,29 @@
             ,Std_.Eq
             ,Generics.Generic)
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))) => (Default.Default (Persistent'SaveParams sturdyRef owner)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))) => (Default.Default (Persistent'SaveParams sturdyRef owner)) where
     def  = GenHelpersPure.defaultStruct
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))) => (Classes.FromStruct Message.ConstMsg (Persistent'SaveParams sturdyRef owner)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))) => (Classes.FromStruct Message.Const (Persistent'SaveParams sturdyRef owner)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))) => (Classes.Decerialize (Persistent'SaveParams sturdyRef owner)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))) => (Classes.Decerialize (Persistent'SaveParams sturdyRef owner)) where
     type Cerial msg (Persistent'SaveParams sturdyRef owner) = (Capnp.Gen.ById.Xb8630836983feed7.Persistent'SaveParams (Classes.Cerial msg sturdyRef) (Classes.Cerial msg owner) msg)
     decerialize raw = (Persistent'SaveParams <$> ((Capnp.Gen.ById.Xb8630836983feed7.get_Persistent'SaveParams'sealFor raw) >>= Classes.decerialize))
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))
          ,(Classes.Cerialize s sturdyRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) sturdyRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) sturdyRef))
          ,(Classes.Cerialize s owner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) owner))) => (Classes.Marshal s (Persistent'SaveParams sturdyRef owner)) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) owner))) => (Classes.Marshal s (Persistent'SaveParams sturdyRef owner)) where
     marshalInto raw_ value_ = case value_ of
         Persistent'SaveParams{..} ->
             (do
@@ -123,75 +125,75 @@
                 (Std_.pure ())
                 )
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))
          ,(Classes.Cerialize s sturdyRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) sturdyRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) sturdyRef))
          ,(Classes.Cerialize s owner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) owner))) => (Classes.Cerialize s (Persistent'SaveParams sturdyRef owner))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) owner))) => (Classes.Cerialize s (Persistent'SaveParams sturdyRef owner))
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))
          ,(Classes.Cerialize s sturdyRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) sturdyRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) sturdyRef))
          ,(Classes.Cerialize s owner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) owner))) => (Classes.Cerialize s (V.Vector (Persistent'SaveParams sturdyRef owner))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) owner))) => (Classes.Cerialize s (V.Vector (Persistent'SaveParams sturdyRef owner))) where
     cerialize  = GenHelpersPure.cerializeCompositeVec
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))
          ,(Classes.Cerialize s sturdyRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) sturdyRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) sturdyRef))
          ,(Classes.Cerialize s owner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (Persistent'SaveParams sturdyRef owner)))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (Persistent'SaveParams sturdyRef owner)))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))
          ,(Classes.Cerialize s sturdyRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) sturdyRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) sturdyRef))
          ,(Classes.Cerialize s owner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (Persistent'SaveParams sturdyRef owner))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (Persistent'SaveParams sturdyRef owner))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))
          ,(Classes.Cerialize s sturdyRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) sturdyRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) sturdyRef))
          ,(Classes.Cerialize s owner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (Persistent'SaveParams sturdyRef owner)))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (Persistent'SaveParams sturdyRef owner)))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))
          ,(Classes.Cerialize s sturdyRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) sturdyRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) sturdyRef))
          ,(Classes.Cerialize s owner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Persistent'SaveParams sturdyRef owner))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Persistent'SaveParams sturdyRef owner))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))
          ,(Classes.Cerialize s sturdyRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) sturdyRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) sturdyRef))
          ,(Classes.Cerialize s owner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Persistent'SaveParams sturdyRef owner)))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Persistent'SaveParams sturdyRef owner)))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))
          ,(Classes.Cerialize s sturdyRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) sturdyRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) sturdyRef))
          ,(Classes.Cerialize s owner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Persistent'SaveParams sturdyRef owner))))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Persistent'SaveParams sturdyRef owner))))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 data Persistent'SaveResults sturdyRef owner
     = Persistent'SaveResults 
@@ -200,29 +202,29 @@
             ,Std_.Eq
             ,Generics.Generic)
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))) => (Default.Default (Persistent'SaveResults sturdyRef owner)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))) => (Default.Default (Persistent'SaveResults sturdyRef owner)) where
     def  = GenHelpersPure.defaultStruct
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))) => (Classes.FromStruct Message.ConstMsg (Persistent'SaveResults sturdyRef owner)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))) => (Classes.FromStruct Message.Const (Persistent'SaveResults sturdyRef owner)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))) => (Classes.Decerialize (Persistent'SaveResults sturdyRef owner)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))) => (Classes.Decerialize (Persistent'SaveResults sturdyRef owner)) where
     type Cerial msg (Persistent'SaveResults sturdyRef owner) = (Capnp.Gen.ById.Xb8630836983feed7.Persistent'SaveResults (Classes.Cerial msg sturdyRef) (Classes.Cerial msg owner) msg)
     decerialize raw = (Persistent'SaveResults <$> ((Capnp.Gen.ById.Xb8630836983feed7.get_Persistent'SaveResults'sturdyRef raw) >>= Classes.decerialize))
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))
          ,(Classes.Cerialize s sturdyRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) sturdyRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) sturdyRef))
          ,(Classes.Cerialize s owner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) owner))) => (Classes.Marshal s (Persistent'SaveResults sturdyRef owner)) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) owner))) => (Classes.Marshal s (Persistent'SaveResults sturdyRef owner)) where
     marshalInto raw_ value_ = case value_ of
         Persistent'SaveResults{..} ->
             (do
@@ -230,75 +232,75 @@
                 (Std_.pure ())
                 )
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))
          ,(Classes.Cerialize s sturdyRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) sturdyRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) sturdyRef))
          ,(Classes.Cerialize s owner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) owner))) => (Classes.Cerialize s (Persistent'SaveResults sturdyRef owner))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) owner))) => (Classes.Cerialize s (Persistent'SaveResults sturdyRef owner))
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))
          ,(Classes.Cerialize s sturdyRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) sturdyRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) sturdyRef))
          ,(Classes.Cerialize s owner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) owner))) => (Classes.Cerialize s (V.Vector (Persistent'SaveResults sturdyRef owner))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) owner))) => (Classes.Cerialize s (V.Vector (Persistent'SaveResults sturdyRef owner))) where
     cerialize  = GenHelpersPure.cerializeCompositeVec
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))
          ,(Classes.Cerialize s sturdyRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) sturdyRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) sturdyRef))
          ,(Classes.Cerialize s owner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (Persistent'SaveResults sturdyRef owner)))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (Persistent'SaveResults sturdyRef owner)))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))
          ,(Classes.Cerialize s sturdyRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) sturdyRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) sturdyRef))
          ,(Classes.Cerialize s owner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (Persistent'SaveResults sturdyRef owner))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (Persistent'SaveResults sturdyRef owner))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))
          ,(Classes.Cerialize s sturdyRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) sturdyRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) sturdyRef))
          ,(Classes.Cerialize s owner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (Persistent'SaveResults sturdyRef owner)))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (Persistent'SaveResults sturdyRef owner)))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))
          ,(Classes.Cerialize s sturdyRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) sturdyRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) sturdyRef))
          ,(Classes.Cerialize s owner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Persistent'SaveResults sturdyRef owner))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Persistent'SaveResults sturdyRef owner))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))
          ,(Classes.Cerialize s sturdyRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) sturdyRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) sturdyRef))
          ,(Classes.Cerialize s owner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Persistent'SaveResults sturdyRef owner)))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Persistent'SaveResults sturdyRef owner)))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize sturdyRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg sturdyRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const sturdyRef))
          ,(Classes.Decerialize owner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg owner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const owner))
          ,(Classes.Cerialize s sturdyRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) sturdyRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) sturdyRef))
          ,(Classes.Cerialize s owner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Persistent'SaveResults sturdyRef owner))))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) owner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Persistent'SaveResults sturdyRef owner))))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 newtype RealmGateway internalRef externalRef internalOwner externalOwner
     = RealmGateway Message.Client
@@ -355,50 +357,50 @@
             ,Std_.Eq
             ,Generics.Generic)
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))) => (Default.Default (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))) => (Default.Default (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)) where
     def  = GenHelpersPure.defaultStruct
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))) => (Classes.FromStruct Message.ConstMsg (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))) => (Classes.FromStruct Message.Const (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))) => (Classes.Decerialize (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))) => (Classes.Decerialize (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)) where
     type Cerial msg (RealmGateway'import'params internalRef externalRef internalOwner externalOwner) = (Capnp.Gen.ById.Xb8630836983feed7.RealmGateway'import'params (Classes.Cerial msg internalRef) (Classes.Cerial msg externalRef) (Classes.Cerial msg internalOwner) (Classes.Cerial msg externalOwner) msg)
     decerialize raw = (RealmGateway'import'params <$> ((Capnp.Gen.ById.Xb8630836983feed7.get_RealmGateway'import'params'cap raw) >>= Classes.decerialize)
                                                   <*> ((Capnp.Gen.ById.Xb8630836983feed7.get_RealmGateway'import'params'params raw) >>= Classes.decerialize))
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))
          ,(Classes.Cerialize s internalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalRef))
          ,(Classes.Cerialize s externalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalRef))
          ,(Classes.Cerialize s internalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalOwner))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalOwner))
          ,(Classes.Cerialize s externalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalOwner))) => (Classes.Marshal s (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalOwner))) => (Classes.Marshal s (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)) where
     marshalInto raw_ value_ = case value_ of
         RealmGateway'import'params{..} ->
             (do
@@ -407,139 +409,139 @@
                 (Std_.pure ())
                 )
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))
          ,(Classes.Cerialize s internalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalRef))
          ,(Classes.Cerialize s externalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalRef))
          ,(Classes.Cerialize s internalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalOwner))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalOwner))
          ,(Classes.Cerialize s externalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalOwner))) => (Classes.Cerialize s (RealmGateway'import'params internalRef externalRef internalOwner externalOwner))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalOwner))) => (Classes.Cerialize s (RealmGateway'import'params internalRef externalRef internalOwner externalOwner))
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))
          ,(Classes.Cerialize s internalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalRef))
          ,(Classes.Cerialize s externalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalRef))
          ,(Classes.Cerialize s internalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalOwner))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalOwner))
          ,(Classes.Cerialize s externalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalOwner))) => (Classes.Cerialize s (V.Vector (RealmGateway'import'params internalRef externalRef internalOwner externalOwner))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalOwner))) => (Classes.Cerialize s (V.Vector (RealmGateway'import'params internalRef externalRef internalOwner externalOwner))) where
     cerialize  = GenHelpersPure.cerializeCompositeVec
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))
          ,(Classes.Cerialize s internalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalRef))
          ,(Classes.Cerialize s externalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalRef))
          ,(Classes.Cerialize s internalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalOwner))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalOwner))
          ,(Classes.Cerialize s externalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))
          ,(Classes.Cerialize s internalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalRef))
          ,(Classes.Cerialize s externalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalRef))
          ,(Classes.Cerialize s internalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalOwner))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalOwner))
          ,(Classes.Cerialize s externalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (RealmGateway'import'params internalRef externalRef internalOwner externalOwner))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (RealmGateway'import'params internalRef externalRef internalOwner externalOwner))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))
          ,(Classes.Cerialize s internalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalRef))
          ,(Classes.Cerialize s externalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalRef))
          ,(Classes.Cerialize s internalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalOwner))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalOwner))
          ,(Classes.Cerialize s externalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))
          ,(Classes.Cerialize s internalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalRef))
          ,(Classes.Cerialize s externalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalRef))
          ,(Classes.Cerialize s internalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalOwner))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalOwner))
          ,(Classes.Cerialize s externalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (RealmGateway'import'params internalRef externalRef internalOwner externalOwner))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (RealmGateway'import'params internalRef externalRef internalOwner externalOwner))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))
          ,(Classes.Cerialize s internalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalRef))
          ,(Classes.Cerialize s externalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalRef))
          ,(Classes.Cerialize s internalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalOwner))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalOwner))
          ,(Classes.Cerialize s externalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))
          ,(Classes.Cerialize s internalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalRef))
          ,(Classes.Cerialize s externalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalRef))
          ,(Classes.Cerialize s internalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalOwner))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalOwner))
          ,(Classes.Cerialize s externalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (RealmGateway'import'params internalRef externalRef internalOwner externalOwner))))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (RealmGateway'import'params internalRef externalRef internalOwner externalOwner))))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 data RealmGateway'export'params internalRef externalRef internalOwner externalOwner
     = RealmGateway'export'params 
@@ -549,50 +551,50 @@
             ,Std_.Eq
             ,Generics.Generic)
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))) => (Default.Default (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))) => (Default.Default (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)) where
     def  = GenHelpersPure.defaultStruct
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))) => (Classes.FromStruct Message.ConstMsg (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))) => (Classes.FromStruct Message.Const (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))) => (Classes.Decerialize (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))) => (Classes.Decerialize (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)) where
     type Cerial msg (RealmGateway'export'params internalRef externalRef internalOwner externalOwner) = (Capnp.Gen.ById.Xb8630836983feed7.RealmGateway'export'params (Classes.Cerial msg internalRef) (Classes.Cerial msg externalRef) (Classes.Cerial msg internalOwner) (Classes.Cerial msg externalOwner) msg)
     decerialize raw = (RealmGateway'export'params <$> ((Capnp.Gen.ById.Xb8630836983feed7.get_RealmGateway'export'params'cap raw) >>= Classes.decerialize)
                                                   <*> ((Capnp.Gen.ById.Xb8630836983feed7.get_RealmGateway'export'params'params raw) >>= Classes.decerialize))
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))
          ,(Classes.Cerialize s internalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalRef))
          ,(Classes.Cerialize s externalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalRef))
          ,(Classes.Cerialize s internalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalOwner))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalOwner))
          ,(Classes.Cerialize s externalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalOwner))) => (Classes.Marshal s (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalOwner))) => (Classes.Marshal s (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)) where
     marshalInto raw_ value_ = case value_ of
         RealmGateway'export'params{..} ->
             (do
@@ -601,137 +603,137 @@
                 (Std_.pure ())
                 )
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))
          ,(Classes.Cerialize s internalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalRef))
          ,(Classes.Cerialize s externalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalRef))
          ,(Classes.Cerialize s internalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalOwner))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalOwner))
          ,(Classes.Cerialize s externalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalOwner))) => (Classes.Cerialize s (RealmGateway'export'params internalRef externalRef internalOwner externalOwner))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalOwner))) => (Classes.Cerialize s (RealmGateway'export'params internalRef externalRef internalOwner externalOwner))
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))
          ,(Classes.Cerialize s internalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalRef))
          ,(Classes.Cerialize s externalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalRef))
          ,(Classes.Cerialize s internalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalOwner))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalOwner))
          ,(Classes.Cerialize s externalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalOwner))) => (Classes.Cerialize s (V.Vector (RealmGateway'export'params internalRef externalRef internalOwner externalOwner))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalOwner))) => (Classes.Cerialize s (V.Vector (RealmGateway'export'params internalRef externalRef internalOwner externalOwner))) where
     cerialize  = GenHelpersPure.cerializeCompositeVec
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))
          ,(Classes.Cerialize s internalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalRef))
          ,(Classes.Cerialize s externalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalRef))
          ,(Classes.Cerialize s internalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalOwner))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalOwner))
          ,(Classes.Cerialize s externalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))
          ,(Classes.Cerialize s internalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalRef))
          ,(Classes.Cerialize s externalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalRef))
          ,(Classes.Cerialize s internalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalOwner))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalOwner))
          ,(Classes.Cerialize s externalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (RealmGateway'export'params internalRef externalRef internalOwner externalOwner))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (RealmGateway'export'params internalRef externalRef internalOwner externalOwner))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))
          ,(Classes.Cerialize s internalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalRef))
          ,(Classes.Cerialize s externalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalRef))
          ,(Classes.Cerialize s internalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalOwner))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalOwner))
          ,(Classes.Cerialize s externalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))
          ,(Classes.Cerialize s internalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalRef))
          ,(Classes.Cerialize s externalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalRef))
          ,(Classes.Cerialize s internalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalOwner))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalOwner))
          ,(Classes.Cerialize s externalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (RealmGateway'export'params internalRef externalRef internalOwner externalOwner))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (RealmGateway'export'params internalRef externalRef internalOwner externalOwner))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))
          ,(Classes.Cerialize s internalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalRef))
          ,(Classes.Cerialize s externalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalRef))
          ,(Classes.Cerialize s internalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalOwner))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalOwner))
          ,(Classes.Cerialize s externalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize internalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalRef))
          ,(Classes.Decerialize externalRef)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalRef))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalRef))
          ,(Classes.Decerialize internalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg internalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const internalOwner))
          ,(Classes.Decerialize externalOwner)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg externalOwner))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const externalOwner))
          ,(Classes.Cerialize s internalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalRef))
          ,(Classes.Cerialize s externalRef)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalRef))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalRef))
          ,(Classes.Cerialize s internalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) internalOwner))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) internalOwner))
          ,(Classes.Cerialize s externalOwner)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (RealmGateway'export'params internalRef externalRef internalOwner externalOwner))))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) externalOwner))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (RealmGateway'export'params internalRef externalRef internalOwner externalOwner))))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
diff --git a/gen/lib/Capnp/Gen/Capnp/Rpc.hs b/gen/lib/Capnp/Gen/Capnp/Rpc.hs
--- a/gen/lib/Capnp/Gen/Capnp/Rpc.hs
+++ b/gen/lib/Capnp/Gen/Capnp/Rpc.hs
@@ -3,11 +3,13 @@
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE DataKinds #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# OPTIONS_GHC -Wno-unused-imports #-}
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.Capnp.Rpc where
 import qualified Capnp.Message as Message
 import qualified Capnp.Untyped as Untyped
@@ -28,20 +30,19 @@
     fromStruct struct = (Std_.pure (Message'newtype_ struct))
 instance (Classes.ToStruct msg (Message msg)) where
     toStruct (Message'newtype_ struct) = struct
-instance (Untyped.HasMessage (Message msg)) where
-    type InMessage (Message msg) = msg
+instance (Untyped.HasMessage (Message mut) mut) where
     message (Message'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Message msg)) where
+instance (Untyped.MessageDefault (Message mut) mut) where
     messageDefault msg = (Message'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Message msg)) where
     fromPtr msg ptr = (Message'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Message (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Message (Message.Mut s))) where
     toPtr msg (Message'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Message (Message.MutMsg s))) where
+instance (Classes.Allocate s (Message (Message.Mut s))) where
     new msg = (Message'newtype_ <$> (Untyped.allocStruct msg 1 1))
-instance (Basics.ListElem msg (Message msg)) where
-    newtype List msg (Message msg)
-        = Message'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Message mut)) where
+    newtype List mut (Message mut)
+        = Message'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Message'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Message'List_ l) = (Untyped.ListStruct l)
     length (Message'List_ l) = (Untyped.length l)
@@ -49,26 +50,26 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Message (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Message (Message.Mut s))) where
     setIndex (Message'newtype_ elt) i (Message'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Message'List_ <$> (Untyped.allocCompositeList msg 1 1 len))
-data Message' msg
-    = Message'unimplemented (Message msg)
-    | Message'abort (Exception msg)
-    | Message'call (Call msg)
-    | Message'return (Return msg)
-    | Message'finish (Finish msg)
-    | Message'resolve (Resolve msg)
-    | Message'release (Release msg)
-    | Message'obsoleteSave (Std_.Maybe (Untyped.Ptr msg))
-    | Message'bootstrap (Bootstrap msg)
-    | Message'obsoleteDelete (Std_.Maybe (Untyped.Ptr msg))
-    | Message'provide (Provide msg)
-    | Message'accept (Accept msg)
-    | Message'join (Join msg)
-    | Message'disembargo (Disembargo msg)
+data Message' (mut :: Message.Mutability)
+    = Message'unimplemented (Message mut)
+    | Message'abort (Exception mut)
+    | Message'call (Call mut)
+    | Message'return (Return mut)
+    | Message'finish (Finish mut)
+    | Message'resolve (Resolve mut)
+    | Message'release (Release mut)
+    | Message'obsoleteSave (Std_.Maybe (Untyped.Ptr mut))
+    | Message'bootstrap (Bootstrap mut)
+    | Message'obsoleteDelete (Std_.Maybe (Untyped.Ptr mut))
+    | Message'provide (Provide mut)
+    | Message'accept (Accept mut)
+    | Message'join (Join mut)
+    | Message'disembargo (Disembargo mut)
     | Message'unknown' Std_.Word16
-instance (Classes.FromStruct msg (Message' msg)) where
+instance (Classes.FromStruct mut (Message' mut)) where
     fromStruct struct = (do
         tag <- (GenHelpers.getTag struct 0)
         case tag of
@@ -149,7 +150,7 @@
                 ,(Classes.FromStruct msg (Message' msg))) => (Message msg) -> (m (Message' msg))
 get_Message' (Message'newtype_ struct) = (Classes.fromStruct struct)
 set_Message'unimplemented :: ((Untyped.RWCtx m s)
-                             ,(Classes.ToPtr s (Message (Message.MutMsg s)))) => (Message (Message.MutMsg s)) -> (Message (Message.MutMsg s)) -> (m ())
+                             ,(Classes.ToPtr s (Message (Message.Mut s)))) => (Message (Message.Mut s)) -> (Message (Message.Mut s)) -> (m ())
 set_Message'unimplemented (Message'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (0 :: Std_.Word16) 0 0 0)
     (do
@@ -158,7 +159,7 @@
         )
     )
 set_Message'abort :: ((Untyped.RWCtx m s)
-                     ,(Classes.ToPtr s (Exception (Message.MutMsg s)))) => (Message (Message.MutMsg s)) -> (Exception (Message.MutMsg s)) -> (m ())
+                     ,(Classes.ToPtr s (Exception (Message.Mut s)))) => (Message (Message.Mut s)) -> (Exception (Message.Mut s)) -> (m ())
 set_Message'abort (Message'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (1 :: Std_.Word16) 0 0 0)
     (do
@@ -167,7 +168,7 @@
         )
     )
 set_Message'call :: ((Untyped.RWCtx m s)
-                    ,(Classes.ToPtr s (Call (Message.MutMsg s)))) => (Message (Message.MutMsg s)) -> (Call (Message.MutMsg s)) -> (m ())
+                    ,(Classes.ToPtr s (Call (Message.Mut s)))) => (Message (Message.Mut s)) -> (Call (Message.Mut s)) -> (m ())
 set_Message'call (Message'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (2 :: Std_.Word16) 0 0 0)
     (do
@@ -176,7 +177,7 @@
         )
     )
 set_Message'return :: ((Untyped.RWCtx m s)
-                      ,(Classes.ToPtr s (Return (Message.MutMsg s)))) => (Message (Message.MutMsg s)) -> (Return (Message.MutMsg s)) -> (m ())
+                      ,(Classes.ToPtr s (Return (Message.Mut s)))) => (Message (Message.Mut s)) -> (Return (Message.Mut s)) -> (m ())
 set_Message'return (Message'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (3 :: Std_.Word16) 0 0 0)
     (do
@@ -185,7 +186,7 @@
         )
     )
 set_Message'finish :: ((Untyped.RWCtx m s)
-                      ,(Classes.ToPtr s (Finish (Message.MutMsg s)))) => (Message (Message.MutMsg s)) -> (Finish (Message.MutMsg s)) -> (m ())
+                      ,(Classes.ToPtr s (Finish (Message.Mut s)))) => (Message (Message.Mut s)) -> (Finish (Message.Mut s)) -> (m ())
 set_Message'finish (Message'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (4 :: Std_.Word16) 0 0 0)
     (do
@@ -194,7 +195,7 @@
         )
     )
 set_Message'resolve :: ((Untyped.RWCtx m s)
-                       ,(Classes.ToPtr s (Resolve (Message.MutMsg s)))) => (Message (Message.MutMsg s)) -> (Resolve (Message.MutMsg s)) -> (m ())
+                       ,(Classes.ToPtr s (Resolve (Message.Mut s)))) => (Message (Message.Mut s)) -> (Resolve (Message.Mut s)) -> (m ())
 set_Message'resolve (Message'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (5 :: Std_.Word16) 0 0 0)
     (do
@@ -203,7 +204,7 @@
         )
     )
 set_Message'release :: ((Untyped.RWCtx m s)
-                       ,(Classes.ToPtr s (Release (Message.MutMsg s)))) => (Message (Message.MutMsg s)) -> (Release (Message.MutMsg s)) -> (m ())
+                       ,(Classes.ToPtr s (Release (Message.Mut s)))) => (Message (Message.Mut s)) -> (Release (Message.Mut s)) -> (m ())
 set_Message'release (Message'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (6 :: Std_.Word16) 0 0 0)
     (do
@@ -212,7 +213,7 @@
         )
     )
 set_Message'obsoleteSave :: ((Untyped.RWCtx m s)
-                            ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))))) => (Message (Message.MutMsg s)) -> (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))) -> (m ())
+                            ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.Mut s))))) => (Message (Message.Mut s)) -> (Std_.Maybe (Untyped.Ptr (Message.Mut s))) -> (m ())
 set_Message'obsoleteSave (Message'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (7 :: Std_.Word16) 0 0 0)
     (do
@@ -221,7 +222,7 @@
         )
     )
 set_Message'bootstrap :: ((Untyped.RWCtx m s)
-                         ,(Classes.ToPtr s (Bootstrap (Message.MutMsg s)))) => (Message (Message.MutMsg s)) -> (Bootstrap (Message.MutMsg s)) -> (m ())
+                         ,(Classes.ToPtr s (Bootstrap (Message.Mut s)))) => (Message (Message.Mut s)) -> (Bootstrap (Message.Mut s)) -> (m ())
 set_Message'bootstrap (Message'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (8 :: Std_.Word16) 0 0 0)
     (do
@@ -230,7 +231,7 @@
         )
     )
 set_Message'obsoleteDelete :: ((Untyped.RWCtx m s)
-                              ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))))) => (Message (Message.MutMsg s)) -> (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))) -> (m ())
+                              ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.Mut s))))) => (Message (Message.Mut s)) -> (Std_.Maybe (Untyped.Ptr (Message.Mut s))) -> (m ())
 set_Message'obsoleteDelete (Message'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (9 :: Std_.Word16) 0 0 0)
     (do
@@ -239,7 +240,7 @@
         )
     )
 set_Message'provide :: ((Untyped.RWCtx m s)
-                       ,(Classes.ToPtr s (Provide (Message.MutMsg s)))) => (Message (Message.MutMsg s)) -> (Provide (Message.MutMsg s)) -> (m ())
+                       ,(Classes.ToPtr s (Provide (Message.Mut s)))) => (Message (Message.Mut s)) -> (Provide (Message.Mut s)) -> (m ())
 set_Message'provide (Message'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (10 :: Std_.Word16) 0 0 0)
     (do
@@ -248,7 +249,7 @@
         )
     )
 set_Message'accept :: ((Untyped.RWCtx m s)
-                      ,(Classes.ToPtr s (Accept (Message.MutMsg s)))) => (Message (Message.MutMsg s)) -> (Accept (Message.MutMsg s)) -> (m ())
+                      ,(Classes.ToPtr s (Accept (Message.Mut s)))) => (Message (Message.Mut s)) -> (Accept (Message.Mut s)) -> (m ())
 set_Message'accept (Message'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (11 :: Std_.Word16) 0 0 0)
     (do
@@ -257,7 +258,7 @@
         )
     )
 set_Message'join :: ((Untyped.RWCtx m s)
-                    ,(Classes.ToPtr s (Join (Message.MutMsg s)))) => (Message (Message.MutMsg s)) -> (Join (Message.MutMsg s)) -> (m ())
+                    ,(Classes.ToPtr s (Join (Message.Mut s)))) => (Message (Message.Mut s)) -> (Join (Message.Mut s)) -> (m ())
 set_Message'join (Message'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (12 :: Std_.Word16) 0 0 0)
     (do
@@ -266,7 +267,7 @@
         )
     )
 set_Message'disembargo :: ((Untyped.RWCtx m s)
-                          ,(Classes.ToPtr s (Disembargo (Message.MutMsg s)))) => (Message (Message.MutMsg s)) -> (Disembargo (Message.MutMsg s)) -> (m ())
+                          ,(Classes.ToPtr s (Disembargo (Message.Mut s)))) => (Message (Message.Mut s)) -> (Disembargo (Message.Mut s)) -> (m ())
 set_Message'disembargo (Message'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (13 :: Std_.Word16) 0 0 0)
     (do
@@ -274,7 +275,7 @@
         (Untyped.setPtr ptr 0 struct)
         )
     )
-set_Message'unknown' :: ((Untyped.RWCtx m s)) => (Message (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Message'unknown' :: ((Untyped.RWCtx m s)) => (Message (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Message'unknown' (Message'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
 newtype Bootstrap msg
     = Bootstrap'newtype_ (Untyped.Struct msg)
@@ -282,20 +283,19 @@
     fromStruct struct = (Std_.pure (Bootstrap'newtype_ struct))
 instance (Classes.ToStruct msg (Bootstrap msg)) where
     toStruct (Bootstrap'newtype_ struct) = struct
-instance (Untyped.HasMessage (Bootstrap msg)) where
-    type InMessage (Bootstrap msg) = msg
+instance (Untyped.HasMessage (Bootstrap mut) mut) where
     message (Bootstrap'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Bootstrap msg)) where
+instance (Untyped.MessageDefault (Bootstrap mut) mut) where
     messageDefault msg = (Bootstrap'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Bootstrap msg)) where
     fromPtr msg ptr = (Bootstrap'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Bootstrap (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Bootstrap (Message.Mut s))) where
     toPtr msg (Bootstrap'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Bootstrap (Message.MutMsg s))) where
+instance (Classes.Allocate s (Bootstrap (Message.Mut s))) where
     new msg = (Bootstrap'newtype_ <$> (Untyped.allocStruct msg 1 1))
-instance (Basics.ListElem msg (Bootstrap msg)) where
-    newtype List msg (Bootstrap msg)
-        = Bootstrap'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Bootstrap mut)) where
+    newtype List mut (Bootstrap mut)
+        = Bootstrap'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Bootstrap'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Bootstrap'List_ l) = (Untyped.ListStruct l)
     length (Bootstrap'List_ l) = (Untyped.length l)
@@ -303,12 +303,12 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Bootstrap (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Bootstrap (Message.Mut s))) where
     setIndex (Bootstrap'newtype_ elt) i (Bootstrap'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Bootstrap'List_ <$> (Untyped.allocCompositeList msg 1 1 len))
 get_Bootstrap'questionId :: ((Untyped.ReadCtx m msg)) => (Bootstrap msg) -> (m Std_.Word32)
 get_Bootstrap'questionId (Bootstrap'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Bootstrap'questionId :: ((Untyped.RWCtx m s)) => (Bootstrap (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_Bootstrap'questionId :: ((Untyped.RWCtx m s)) => (Bootstrap (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_Bootstrap'questionId (Bootstrap'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
 get_Bootstrap'deprecatedObjectId :: ((Untyped.ReadCtx m msg)
                                     ,(Classes.FromPtr msg (Std_.Maybe (Untyped.Ptr msg)))) => (Bootstrap msg) -> (m (Std_.Maybe (Untyped.Ptr msg)))
@@ -317,7 +317,7 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Bootstrap'deprecatedObjectId :: ((Untyped.RWCtx m s)
-                                    ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))))) => (Bootstrap (Message.MutMsg s)) -> (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))) -> (m ())
+                                    ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.Mut s))))) => (Bootstrap (Message.Mut s)) -> (Std_.Maybe (Untyped.Ptr (Message.Mut s))) -> (m ())
 set_Bootstrap'deprecatedObjectId (Bootstrap'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
@@ -330,20 +330,19 @@
     fromStruct struct = (Std_.pure (Call'newtype_ struct))
 instance (Classes.ToStruct msg (Call msg)) where
     toStruct (Call'newtype_ struct) = struct
-instance (Untyped.HasMessage (Call msg)) where
-    type InMessage (Call msg) = msg
+instance (Untyped.HasMessage (Call mut) mut) where
     message (Call'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Call msg)) where
+instance (Untyped.MessageDefault (Call mut) mut) where
     messageDefault msg = (Call'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Call msg)) where
     fromPtr msg ptr = (Call'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Call (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Call (Message.Mut s))) where
     toPtr msg (Call'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Call (Message.MutMsg s))) where
+instance (Classes.Allocate s (Call (Message.Mut s))) where
     new msg = (Call'newtype_ <$> (Untyped.allocStruct msg 3 3))
-instance (Basics.ListElem msg (Call msg)) where
-    newtype List msg (Call msg)
-        = Call'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Call mut)) where
+    newtype List mut (Call mut)
+        = Call'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Call'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Call'List_ l) = (Untyped.ListStruct l)
     length (Call'List_ l) = (Untyped.length l)
@@ -351,12 +350,12 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Call (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Call (Message.Mut s))) where
     setIndex (Call'newtype_ elt) i (Call'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Call'List_ <$> (Untyped.allocCompositeList msg 3 3 len))
 get_Call'questionId :: ((Untyped.ReadCtx m msg)) => (Call msg) -> (m Std_.Word32)
 get_Call'questionId (Call'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Call'questionId :: ((Untyped.RWCtx m s)) => (Call (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_Call'questionId :: ((Untyped.RWCtx m s)) => (Call (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_Call'questionId (Call'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
 get_Call'target :: ((Untyped.ReadCtx m msg)
                    ,(Classes.FromPtr msg (MessageTarget msg))) => (Call msg) -> (m (MessageTarget msg))
@@ -365,14 +364,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Call'target :: ((Untyped.RWCtx m s)
-                   ,(Classes.ToPtr s (MessageTarget (Message.MutMsg s)))) => (Call (Message.MutMsg s)) -> (MessageTarget (Message.MutMsg s)) -> (m ())
+                   ,(Classes.ToPtr s (MessageTarget (Message.Mut s)))) => (Call (Message.Mut s)) -> (MessageTarget (Message.Mut s)) -> (m ())
 set_Call'target (Call'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Call'target :: ((Untyped.ReadCtx m msg)) => (Call msg) -> (m Std_.Bool)
 has_Call'target (Call'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Call'target :: ((Untyped.RWCtx m s)) => (Call (Message.MutMsg s)) -> (m (MessageTarget (Message.MutMsg s)))
+new_Call'target :: ((Untyped.RWCtx m s)) => (Call (Message.Mut s)) -> (m (MessageTarget (Message.Mut s)))
 new_Call'target struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Call'target struct result)
@@ -380,11 +379,11 @@
     )
 get_Call'interfaceId :: ((Untyped.ReadCtx m msg)) => (Call msg) -> (m Std_.Word64)
 get_Call'interfaceId (Call'newtype_ struct) = (GenHelpers.getWordField struct 1 0 0)
-set_Call'interfaceId :: ((Untyped.RWCtx m s)) => (Call (Message.MutMsg s)) -> Std_.Word64 -> (m ())
+set_Call'interfaceId :: ((Untyped.RWCtx m s)) => (Call (Message.Mut s)) -> Std_.Word64 -> (m ())
 set_Call'interfaceId (Call'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
 get_Call'methodId :: ((Untyped.ReadCtx m msg)) => (Call msg) -> (m Std_.Word16)
 get_Call'methodId (Call'newtype_ struct) = (GenHelpers.getWordField struct 0 32 0)
-set_Call'methodId :: ((Untyped.RWCtx m s)) => (Call (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Call'methodId :: ((Untyped.RWCtx m s)) => (Call (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Call'methodId (Call'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 32 0)
 get_Call'params :: ((Untyped.ReadCtx m msg)
                    ,(Classes.FromPtr msg (Payload msg))) => (Call msg) -> (m (Payload msg))
@@ -393,14 +392,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Call'params :: ((Untyped.RWCtx m s)
-                   ,(Classes.ToPtr s (Payload (Message.MutMsg s)))) => (Call (Message.MutMsg s)) -> (Payload (Message.MutMsg s)) -> (m ())
+                   ,(Classes.ToPtr s (Payload (Message.Mut s)))) => (Call (Message.Mut s)) -> (Payload (Message.Mut s)) -> (m ())
 set_Call'params (Call'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 1 struct)
     )
 has_Call'params :: ((Untyped.ReadCtx m msg)) => (Call msg) -> (m Std_.Bool)
 has_Call'params (Call'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_Call'params :: ((Untyped.RWCtx m s)) => (Call (Message.MutMsg s)) -> (m (Payload (Message.MutMsg s)))
+new_Call'params :: ((Untyped.RWCtx m s)) => (Call (Message.Mut s)) -> (m (Payload (Message.Mut s)))
 new_Call'params struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Call'params struct result)
@@ -411,7 +410,7 @@
 get_Call'sendResultsTo (Call'newtype_ struct) = (Classes.fromStruct struct)
 get_Call'allowThirdPartyTailCall :: ((Untyped.ReadCtx m msg)) => (Call msg) -> (m Std_.Bool)
 get_Call'allowThirdPartyTailCall (Call'newtype_ struct) = (GenHelpers.getWordField struct 2 0 0)
-set_Call'allowThirdPartyTailCall :: ((Untyped.RWCtx m s)) => (Call (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_Call'allowThirdPartyTailCall :: ((Untyped.RWCtx m s)) => (Call (Message.Mut s)) -> Std_.Bool -> (m ())
 set_Call'allowThirdPartyTailCall (Call'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 2 0 0)
 newtype Call'sendResultsTo msg
     = Call'sendResultsTo'newtype_ (Untyped.Struct msg)
@@ -419,17 +418,16 @@
     fromStruct struct = (Std_.pure (Call'sendResultsTo'newtype_ struct))
 instance (Classes.ToStruct msg (Call'sendResultsTo msg)) where
     toStruct (Call'sendResultsTo'newtype_ struct) = struct
-instance (Untyped.HasMessage (Call'sendResultsTo msg)) where
-    type InMessage (Call'sendResultsTo msg) = msg
+instance (Untyped.HasMessage (Call'sendResultsTo mut) mut) where
     message (Call'sendResultsTo'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Call'sendResultsTo msg)) where
+instance (Untyped.MessageDefault (Call'sendResultsTo mut) mut) where
     messageDefault msg = (Call'sendResultsTo'newtype_ <$> (Untyped.messageDefault msg))
-data Call'sendResultsTo' msg
+data Call'sendResultsTo' (mut :: Message.Mutability)
     = Call'sendResultsTo'caller 
     | Call'sendResultsTo'yourself 
-    | Call'sendResultsTo'thirdParty (Std_.Maybe (Untyped.Ptr msg))
+    | Call'sendResultsTo'thirdParty (Std_.Maybe (Untyped.Ptr mut))
     | Call'sendResultsTo'unknown' Std_.Word16
-instance (Classes.FromStruct msg (Call'sendResultsTo' msg)) where
+instance (Classes.FromStruct mut (Call'sendResultsTo' mut)) where
     fromStruct struct = (do
         tag <- (GenHelpers.getTag struct 3)
         case tag of
@@ -448,18 +446,18 @@
 get_Call'sendResultsTo' :: ((Untyped.ReadCtx m msg)
                            ,(Classes.FromStruct msg (Call'sendResultsTo' msg))) => (Call'sendResultsTo msg) -> (m (Call'sendResultsTo' msg))
 get_Call'sendResultsTo' (Call'sendResultsTo'newtype_ struct) = (Classes.fromStruct struct)
-set_Call'sendResultsTo'caller :: ((Untyped.RWCtx m s)) => (Call'sendResultsTo (Message.MutMsg s)) -> (m ())
+set_Call'sendResultsTo'caller :: ((Untyped.RWCtx m s)) => (Call'sendResultsTo (Message.Mut s)) -> (m ())
 set_Call'sendResultsTo'caller (Call'sendResultsTo'newtype_ struct) = (do
     (GenHelpers.setWordField struct (0 :: Std_.Word16) 0 48 0)
     (Std_.pure ())
     )
-set_Call'sendResultsTo'yourself :: ((Untyped.RWCtx m s)) => (Call'sendResultsTo (Message.MutMsg s)) -> (m ())
+set_Call'sendResultsTo'yourself :: ((Untyped.RWCtx m s)) => (Call'sendResultsTo (Message.Mut s)) -> (m ())
 set_Call'sendResultsTo'yourself (Call'sendResultsTo'newtype_ struct) = (do
     (GenHelpers.setWordField struct (1 :: Std_.Word16) 0 48 0)
     (Std_.pure ())
     )
 set_Call'sendResultsTo'thirdParty :: ((Untyped.RWCtx m s)
-                                     ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))))) => (Call'sendResultsTo (Message.MutMsg s)) -> (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))) -> (m ())
+                                     ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.Mut s))))) => (Call'sendResultsTo (Message.Mut s)) -> (Std_.Maybe (Untyped.Ptr (Message.Mut s))) -> (m ())
 set_Call'sendResultsTo'thirdParty (Call'sendResultsTo'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (2 :: Std_.Word16) 0 48 0)
     (do
@@ -467,7 +465,7 @@
         (Untyped.setPtr ptr 2 struct)
         )
     )
-set_Call'sendResultsTo'unknown' :: ((Untyped.RWCtx m s)) => (Call'sendResultsTo (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Call'sendResultsTo'unknown' :: ((Untyped.RWCtx m s)) => (Call'sendResultsTo (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Call'sendResultsTo'unknown' (Call'sendResultsTo'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 48 0)
 newtype Return msg
     = Return'newtype_ (Untyped.Struct msg)
@@ -475,20 +473,19 @@
     fromStruct struct = (Std_.pure (Return'newtype_ struct))
 instance (Classes.ToStruct msg (Return msg)) where
     toStruct (Return'newtype_ struct) = struct
-instance (Untyped.HasMessage (Return msg)) where
-    type InMessage (Return msg) = msg
+instance (Untyped.HasMessage (Return mut) mut) where
     message (Return'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Return msg)) where
+instance (Untyped.MessageDefault (Return mut) mut) where
     messageDefault msg = (Return'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Return msg)) where
     fromPtr msg ptr = (Return'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Return (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Return (Message.Mut s))) where
     toPtr msg (Return'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Return (Message.MutMsg s))) where
+instance (Classes.Allocate s (Return (Message.Mut s))) where
     new msg = (Return'newtype_ <$> (Untyped.allocStruct msg 2 1))
-instance (Basics.ListElem msg (Return msg)) where
-    newtype List msg (Return msg)
-        = Return'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Return mut)) where
+    newtype List mut (Return mut)
+        = Return'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Return'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Return'List_ l) = (Untyped.ListStruct l)
     length (Return'List_ l) = (Untyped.length l)
@@ -496,26 +493,26 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Return (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Return (Message.Mut s))) where
     setIndex (Return'newtype_ elt) i (Return'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Return'List_ <$> (Untyped.allocCompositeList msg 2 1 len))
 get_Return'answerId :: ((Untyped.ReadCtx m msg)) => (Return msg) -> (m Std_.Word32)
 get_Return'answerId (Return'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Return'answerId :: ((Untyped.RWCtx m s)) => (Return (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_Return'answerId :: ((Untyped.RWCtx m s)) => (Return (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_Return'answerId (Return'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
 get_Return'releaseParamCaps :: ((Untyped.ReadCtx m msg)) => (Return msg) -> (m Std_.Bool)
 get_Return'releaseParamCaps (Return'newtype_ struct) = (GenHelpers.getWordField struct 0 32 1)
-set_Return'releaseParamCaps :: ((Untyped.RWCtx m s)) => (Return (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_Return'releaseParamCaps :: ((Untyped.RWCtx m s)) => (Return (Message.Mut s)) -> Std_.Bool -> (m ())
 set_Return'releaseParamCaps (Return'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 0 32 1)
-data Return' msg
-    = Return'results (Payload msg)
-    | Return'exception (Exception msg)
+data Return' (mut :: Message.Mutability)
+    = Return'results (Payload mut)
+    | Return'exception (Exception mut)
     | Return'canceled 
     | Return'resultsSentElsewhere 
     | Return'takeFromOtherQuestion Std_.Word32
-    | Return'acceptFromThirdParty (Std_.Maybe (Untyped.Ptr msg))
+    | Return'acceptFromThirdParty (Std_.Maybe (Untyped.Ptr mut))
     | Return'unknown' Std_.Word16
-instance (Classes.FromStruct msg (Return' msg)) where
+instance (Classes.FromStruct mut (Return' mut)) where
     fromStruct struct = (do
         tag <- (GenHelpers.getTag struct 3)
         case tag of
@@ -547,7 +544,7 @@
                ,(Classes.FromStruct msg (Return' msg))) => (Return msg) -> (m (Return' msg))
 get_Return' (Return'newtype_ struct) = (Classes.fromStruct struct)
 set_Return'results :: ((Untyped.RWCtx m s)
-                      ,(Classes.ToPtr s (Payload (Message.MutMsg s)))) => (Return (Message.MutMsg s)) -> (Payload (Message.MutMsg s)) -> (m ())
+                      ,(Classes.ToPtr s (Payload (Message.Mut s)))) => (Return (Message.Mut s)) -> (Payload (Message.Mut s)) -> (m ())
 set_Return'results (Return'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (0 :: Std_.Word16) 0 48 0)
     (do
@@ -556,7 +553,7 @@
         )
     )
 set_Return'exception :: ((Untyped.RWCtx m s)
-                        ,(Classes.ToPtr s (Exception (Message.MutMsg s)))) => (Return (Message.MutMsg s)) -> (Exception (Message.MutMsg s)) -> (m ())
+                        ,(Classes.ToPtr s (Exception (Message.Mut s)))) => (Return (Message.Mut s)) -> (Exception (Message.Mut s)) -> (m ())
 set_Return'exception (Return'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (1 :: Std_.Word16) 0 48 0)
     (do
@@ -564,23 +561,23 @@
         (Untyped.setPtr ptr 0 struct)
         )
     )
-set_Return'canceled :: ((Untyped.RWCtx m s)) => (Return (Message.MutMsg s)) -> (m ())
+set_Return'canceled :: ((Untyped.RWCtx m s)) => (Return (Message.Mut s)) -> (m ())
 set_Return'canceled (Return'newtype_ struct) = (do
     (GenHelpers.setWordField struct (2 :: Std_.Word16) 0 48 0)
     (Std_.pure ())
     )
-set_Return'resultsSentElsewhere :: ((Untyped.RWCtx m s)) => (Return (Message.MutMsg s)) -> (m ())
+set_Return'resultsSentElsewhere :: ((Untyped.RWCtx m s)) => (Return (Message.Mut s)) -> (m ())
 set_Return'resultsSentElsewhere (Return'newtype_ struct) = (do
     (GenHelpers.setWordField struct (3 :: Std_.Word16) 0 48 0)
     (Std_.pure ())
     )
-set_Return'takeFromOtherQuestion :: ((Untyped.RWCtx m s)) => (Return (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_Return'takeFromOtherQuestion :: ((Untyped.RWCtx m s)) => (Return (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_Return'takeFromOtherQuestion (Return'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (4 :: Std_.Word16) 0 48 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 1 0 0)
     )
 set_Return'acceptFromThirdParty :: ((Untyped.RWCtx m s)
-                                   ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))))) => (Return (Message.MutMsg s)) -> (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))) -> (m ())
+                                   ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.Mut s))))) => (Return (Message.Mut s)) -> (Std_.Maybe (Untyped.Ptr (Message.Mut s))) -> (m ())
 set_Return'acceptFromThirdParty (Return'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (5 :: Std_.Word16) 0 48 0)
     (do
@@ -588,7 +585,7 @@
         (Untyped.setPtr ptr 0 struct)
         )
     )
-set_Return'unknown' :: ((Untyped.RWCtx m s)) => (Return (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Return'unknown' :: ((Untyped.RWCtx m s)) => (Return (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Return'unknown' (Return'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 48 0)
 newtype Finish msg
     = Finish'newtype_ (Untyped.Struct msg)
@@ -596,20 +593,19 @@
     fromStruct struct = (Std_.pure (Finish'newtype_ struct))
 instance (Classes.ToStruct msg (Finish msg)) where
     toStruct (Finish'newtype_ struct) = struct
-instance (Untyped.HasMessage (Finish msg)) where
-    type InMessage (Finish msg) = msg
+instance (Untyped.HasMessage (Finish mut) mut) where
     message (Finish'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Finish msg)) where
+instance (Untyped.MessageDefault (Finish mut) mut) where
     messageDefault msg = (Finish'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Finish msg)) where
     fromPtr msg ptr = (Finish'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Finish (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Finish (Message.Mut s))) where
     toPtr msg (Finish'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Finish (Message.MutMsg s))) where
+instance (Classes.Allocate s (Finish (Message.Mut s))) where
     new msg = (Finish'newtype_ <$> (Untyped.allocStruct msg 1 0))
-instance (Basics.ListElem msg (Finish msg)) where
-    newtype List msg (Finish msg)
-        = Finish'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Finish mut)) where
+    newtype List mut (Finish mut)
+        = Finish'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Finish'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Finish'List_ l) = (Untyped.ListStruct l)
     length (Finish'List_ l) = (Untyped.length l)
@@ -617,16 +613,16 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Finish (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Finish (Message.Mut s))) where
     setIndex (Finish'newtype_ elt) i (Finish'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Finish'List_ <$> (Untyped.allocCompositeList msg 1 0 len))
 get_Finish'questionId :: ((Untyped.ReadCtx m msg)) => (Finish msg) -> (m Std_.Word32)
 get_Finish'questionId (Finish'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Finish'questionId :: ((Untyped.RWCtx m s)) => (Finish (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_Finish'questionId :: ((Untyped.RWCtx m s)) => (Finish (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_Finish'questionId (Finish'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
 get_Finish'releaseResultCaps :: ((Untyped.ReadCtx m msg)) => (Finish msg) -> (m Std_.Bool)
 get_Finish'releaseResultCaps (Finish'newtype_ struct) = (GenHelpers.getWordField struct 0 32 1)
-set_Finish'releaseResultCaps :: ((Untyped.RWCtx m s)) => (Finish (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_Finish'releaseResultCaps :: ((Untyped.RWCtx m s)) => (Finish (Message.Mut s)) -> Std_.Bool -> (m ())
 set_Finish'releaseResultCaps (Finish'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 0 32 1)
 newtype Resolve msg
     = Resolve'newtype_ (Untyped.Struct msg)
@@ -634,20 +630,19 @@
     fromStruct struct = (Std_.pure (Resolve'newtype_ struct))
 instance (Classes.ToStruct msg (Resolve msg)) where
     toStruct (Resolve'newtype_ struct) = struct
-instance (Untyped.HasMessage (Resolve msg)) where
-    type InMessage (Resolve msg) = msg
+instance (Untyped.HasMessage (Resolve mut) mut) where
     message (Resolve'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Resolve msg)) where
+instance (Untyped.MessageDefault (Resolve mut) mut) where
     messageDefault msg = (Resolve'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Resolve msg)) where
     fromPtr msg ptr = (Resolve'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Resolve (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Resolve (Message.Mut s))) where
     toPtr msg (Resolve'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Resolve (Message.MutMsg s))) where
+instance (Classes.Allocate s (Resolve (Message.Mut s))) where
     new msg = (Resolve'newtype_ <$> (Untyped.allocStruct msg 1 1))
-instance (Basics.ListElem msg (Resolve msg)) where
-    newtype List msg (Resolve msg)
-        = Resolve'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Resolve mut)) where
+    newtype List mut (Resolve mut)
+        = Resolve'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Resolve'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Resolve'List_ l) = (Untyped.ListStruct l)
     length (Resolve'List_ l) = (Untyped.length l)
@@ -655,18 +650,18 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Resolve (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Resolve (Message.Mut s))) where
     setIndex (Resolve'newtype_ elt) i (Resolve'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Resolve'List_ <$> (Untyped.allocCompositeList msg 1 1 len))
 get_Resolve'promiseId :: ((Untyped.ReadCtx m msg)) => (Resolve msg) -> (m Std_.Word32)
 get_Resolve'promiseId (Resolve'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Resolve'promiseId :: ((Untyped.RWCtx m s)) => (Resolve (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_Resolve'promiseId :: ((Untyped.RWCtx m s)) => (Resolve (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_Resolve'promiseId (Resolve'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
-data Resolve' msg
-    = Resolve'cap (CapDescriptor msg)
-    | Resolve'exception (Exception msg)
+data Resolve' (mut :: Message.Mutability)
+    = Resolve'cap (CapDescriptor mut)
+    | Resolve'exception (Exception mut)
     | Resolve'unknown' Std_.Word16
-instance (Classes.FromStruct msg (Resolve' msg)) where
+instance (Classes.FromStruct mut (Resolve' mut)) where
     fromStruct struct = (do
         tag <- (GenHelpers.getTag struct 2)
         case tag of
@@ -687,7 +682,7 @@
                 ,(Classes.FromStruct msg (Resolve' msg))) => (Resolve msg) -> (m (Resolve' msg))
 get_Resolve' (Resolve'newtype_ struct) = (Classes.fromStruct struct)
 set_Resolve'cap :: ((Untyped.RWCtx m s)
-                   ,(Classes.ToPtr s (CapDescriptor (Message.MutMsg s)))) => (Resolve (Message.MutMsg s)) -> (CapDescriptor (Message.MutMsg s)) -> (m ())
+                   ,(Classes.ToPtr s (CapDescriptor (Message.Mut s)))) => (Resolve (Message.Mut s)) -> (CapDescriptor (Message.Mut s)) -> (m ())
 set_Resolve'cap (Resolve'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (0 :: Std_.Word16) 0 32 0)
     (do
@@ -696,7 +691,7 @@
         )
     )
 set_Resolve'exception :: ((Untyped.RWCtx m s)
-                         ,(Classes.ToPtr s (Exception (Message.MutMsg s)))) => (Resolve (Message.MutMsg s)) -> (Exception (Message.MutMsg s)) -> (m ())
+                         ,(Classes.ToPtr s (Exception (Message.Mut s)))) => (Resolve (Message.Mut s)) -> (Exception (Message.Mut s)) -> (m ())
 set_Resolve'exception (Resolve'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (1 :: Std_.Word16) 0 32 0)
     (do
@@ -704,7 +699,7 @@
         (Untyped.setPtr ptr 0 struct)
         )
     )
-set_Resolve'unknown' :: ((Untyped.RWCtx m s)) => (Resolve (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Resolve'unknown' :: ((Untyped.RWCtx m s)) => (Resolve (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Resolve'unknown' (Resolve'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 32 0)
 newtype Release msg
     = Release'newtype_ (Untyped.Struct msg)
@@ -712,20 +707,19 @@
     fromStruct struct = (Std_.pure (Release'newtype_ struct))
 instance (Classes.ToStruct msg (Release msg)) where
     toStruct (Release'newtype_ struct) = struct
-instance (Untyped.HasMessage (Release msg)) where
-    type InMessage (Release msg) = msg
+instance (Untyped.HasMessage (Release mut) mut) where
     message (Release'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Release msg)) where
+instance (Untyped.MessageDefault (Release mut) mut) where
     messageDefault msg = (Release'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Release msg)) where
     fromPtr msg ptr = (Release'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Release (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Release (Message.Mut s))) where
     toPtr msg (Release'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Release (Message.MutMsg s))) where
+instance (Classes.Allocate s (Release (Message.Mut s))) where
     new msg = (Release'newtype_ <$> (Untyped.allocStruct msg 1 0))
-instance (Basics.ListElem msg (Release msg)) where
-    newtype List msg (Release msg)
-        = Release'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Release mut)) where
+    newtype List mut (Release mut)
+        = Release'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Release'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Release'List_ l) = (Untyped.ListStruct l)
     length (Release'List_ l) = (Untyped.length l)
@@ -733,16 +727,16 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Release (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Release (Message.Mut s))) where
     setIndex (Release'newtype_ elt) i (Release'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Release'List_ <$> (Untyped.allocCompositeList msg 1 0 len))
 get_Release'id :: ((Untyped.ReadCtx m msg)) => (Release msg) -> (m Std_.Word32)
 get_Release'id (Release'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Release'id :: ((Untyped.RWCtx m s)) => (Release (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_Release'id :: ((Untyped.RWCtx m s)) => (Release (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_Release'id (Release'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
 get_Release'referenceCount :: ((Untyped.ReadCtx m msg)) => (Release msg) -> (m Std_.Word32)
 get_Release'referenceCount (Release'newtype_ struct) = (GenHelpers.getWordField struct 0 32 0)
-set_Release'referenceCount :: ((Untyped.RWCtx m s)) => (Release (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_Release'referenceCount :: ((Untyped.RWCtx m s)) => (Release (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_Release'referenceCount (Release'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 32 0)
 newtype Disembargo msg
     = Disembargo'newtype_ (Untyped.Struct msg)
@@ -750,20 +744,19 @@
     fromStruct struct = (Std_.pure (Disembargo'newtype_ struct))
 instance (Classes.ToStruct msg (Disembargo msg)) where
     toStruct (Disembargo'newtype_ struct) = struct
-instance (Untyped.HasMessage (Disembargo msg)) where
-    type InMessage (Disembargo msg) = msg
+instance (Untyped.HasMessage (Disembargo mut) mut) where
     message (Disembargo'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Disembargo msg)) where
+instance (Untyped.MessageDefault (Disembargo mut) mut) where
     messageDefault msg = (Disembargo'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Disembargo msg)) where
     fromPtr msg ptr = (Disembargo'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Disembargo (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Disembargo (Message.Mut s))) where
     toPtr msg (Disembargo'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Disembargo (Message.MutMsg s))) where
+instance (Classes.Allocate s (Disembargo (Message.Mut s))) where
     new msg = (Disembargo'newtype_ <$> (Untyped.allocStruct msg 1 1))
-instance (Basics.ListElem msg (Disembargo msg)) where
-    newtype List msg (Disembargo msg)
-        = Disembargo'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Disembargo mut)) where
+    newtype List mut (Disembargo mut)
+        = Disembargo'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Disembargo'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Disembargo'List_ l) = (Untyped.ListStruct l)
     length (Disembargo'List_ l) = (Untyped.length l)
@@ -771,7 +764,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Disembargo (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Disembargo (Message.Mut s))) where
     setIndex (Disembargo'newtype_ elt) i (Disembargo'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Disembargo'List_ <$> (Untyped.allocCompositeList msg 1 1 len))
 get_Disembargo'target :: ((Untyped.ReadCtx m msg)
@@ -781,14 +774,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Disembargo'target :: ((Untyped.RWCtx m s)
-                         ,(Classes.ToPtr s (MessageTarget (Message.MutMsg s)))) => (Disembargo (Message.MutMsg s)) -> (MessageTarget (Message.MutMsg s)) -> (m ())
+                         ,(Classes.ToPtr s (MessageTarget (Message.Mut s)))) => (Disembargo (Message.Mut s)) -> (MessageTarget (Message.Mut s)) -> (m ())
 set_Disembargo'target (Disembargo'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Disembargo'target :: ((Untyped.ReadCtx m msg)) => (Disembargo msg) -> (m Std_.Bool)
 has_Disembargo'target (Disembargo'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Disembargo'target :: ((Untyped.RWCtx m s)) => (Disembargo (Message.MutMsg s)) -> (m (MessageTarget (Message.MutMsg s)))
+new_Disembargo'target :: ((Untyped.RWCtx m s)) => (Disembargo (Message.Mut s)) -> (m (MessageTarget (Message.Mut s)))
 new_Disembargo'target struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Disembargo'target struct result)
@@ -803,18 +796,17 @@
     fromStruct struct = (Std_.pure (Disembargo'context'newtype_ struct))
 instance (Classes.ToStruct msg (Disembargo'context msg)) where
     toStruct (Disembargo'context'newtype_ struct) = struct
-instance (Untyped.HasMessage (Disembargo'context msg)) where
-    type InMessage (Disembargo'context msg) = msg
+instance (Untyped.HasMessage (Disembargo'context mut) mut) where
     message (Disembargo'context'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Disembargo'context msg)) where
+instance (Untyped.MessageDefault (Disembargo'context mut) mut) where
     messageDefault msg = (Disembargo'context'newtype_ <$> (Untyped.messageDefault msg))
-data Disembargo'context' msg
+data Disembargo'context' (mut :: Message.Mutability)
     = Disembargo'context'senderLoopback Std_.Word32
     | Disembargo'context'receiverLoopback Std_.Word32
     | Disembargo'context'accept 
     | Disembargo'context'provide Std_.Word32
     | Disembargo'context'unknown' Std_.Word16
-instance (Classes.FromStruct msg (Disembargo'context' msg)) where
+instance (Classes.FromStruct mut (Disembargo'context' mut)) where
     fromStruct struct = (do
         tag <- (GenHelpers.getTag struct 2)
         case tag of
@@ -832,27 +824,27 @@
 get_Disembargo'context' :: ((Untyped.ReadCtx m msg)
                            ,(Classes.FromStruct msg (Disembargo'context' msg))) => (Disembargo'context msg) -> (m (Disembargo'context' msg))
 get_Disembargo'context' (Disembargo'context'newtype_ struct) = (Classes.fromStruct struct)
-set_Disembargo'context'senderLoopback :: ((Untyped.RWCtx m s)) => (Disembargo'context (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_Disembargo'context'senderLoopback :: ((Untyped.RWCtx m s)) => (Disembargo'context (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_Disembargo'context'senderLoopback (Disembargo'context'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (0 :: Std_.Word16) 0 32 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
     )
-set_Disembargo'context'receiverLoopback :: ((Untyped.RWCtx m s)) => (Disembargo'context (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_Disembargo'context'receiverLoopback :: ((Untyped.RWCtx m s)) => (Disembargo'context (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_Disembargo'context'receiverLoopback (Disembargo'context'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (1 :: Std_.Word16) 0 32 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
     )
-set_Disembargo'context'accept :: ((Untyped.RWCtx m s)) => (Disembargo'context (Message.MutMsg s)) -> (m ())
+set_Disembargo'context'accept :: ((Untyped.RWCtx m s)) => (Disembargo'context (Message.Mut s)) -> (m ())
 set_Disembargo'context'accept (Disembargo'context'newtype_ struct) = (do
     (GenHelpers.setWordField struct (2 :: Std_.Word16) 0 32 0)
     (Std_.pure ())
     )
-set_Disembargo'context'provide :: ((Untyped.RWCtx m s)) => (Disembargo'context (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_Disembargo'context'provide :: ((Untyped.RWCtx m s)) => (Disembargo'context (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_Disembargo'context'provide (Disembargo'context'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (3 :: Std_.Word16) 0 32 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
     )
-set_Disembargo'context'unknown' :: ((Untyped.RWCtx m s)) => (Disembargo'context (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Disembargo'context'unknown' :: ((Untyped.RWCtx m s)) => (Disembargo'context (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Disembargo'context'unknown' (Disembargo'context'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 32 0)
 newtype Provide msg
     = Provide'newtype_ (Untyped.Struct msg)
@@ -860,20 +852,19 @@
     fromStruct struct = (Std_.pure (Provide'newtype_ struct))
 instance (Classes.ToStruct msg (Provide msg)) where
     toStruct (Provide'newtype_ struct) = struct
-instance (Untyped.HasMessage (Provide msg)) where
-    type InMessage (Provide msg) = msg
+instance (Untyped.HasMessage (Provide mut) mut) where
     message (Provide'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Provide msg)) where
+instance (Untyped.MessageDefault (Provide mut) mut) where
     messageDefault msg = (Provide'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Provide msg)) where
     fromPtr msg ptr = (Provide'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Provide (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Provide (Message.Mut s))) where
     toPtr msg (Provide'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Provide (Message.MutMsg s))) where
+instance (Classes.Allocate s (Provide (Message.Mut s))) where
     new msg = (Provide'newtype_ <$> (Untyped.allocStruct msg 1 2))
-instance (Basics.ListElem msg (Provide msg)) where
-    newtype List msg (Provide msg)
-        = Provide'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Provide mut)) where
+    newtype List mut (Provide mut)
+        = Provide'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Provide'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Provide'List_ l) = (Untyped.ListStruct l)
     length (Provide'List_ l) = (Untyped.length l)
@@ -881,12 +872,12 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Provide (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Provide (Message.Mut s))) where
     setIndex (Provide'newtype_ elt) i (Provide'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Provide'List_ <$> (Untyped.allocCompositeList msg 1 2 len))
 get_Provide'questionId :: ((Untyped.ReadCtx m msg)) => (Provide msg) -> (m Std_.Word32)
 get_Provide'questionId (Provide'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Provide'questionId :: ((Untyped.RWCtx m s)) => (Provide (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_Provide'questionId :: ((Untyped.RWCtx m s)) => (Provide (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_Provide'questionId (Provide'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
 get_Provide'target :: ((Untyped.ReadCtx m msg)
                       ,(Classes.FromPtr msg (MessageTarget msg))) => (Provide msg) -> (m (MessageTarget msg))
@@ -895,14 +886,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Provide'target :: ((Untyped.RWCtx m s)
-                      ,(Classes.ToPtr s (MessageTarget (Message.MutMsg s)))) => (Provide (Message.MutMsg s)) -> (MessageTarget (Message.MutMsg s)) -> (m ())
+                      ,(Classes.ToPtr s (MessageTarget (Message.Mut s)))) => (Provide (Message.Mut s)) -> (MessageTarget (Message.Mut s)) -> (m ())
 set_Provide'target (Provide'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Provide'target :: ((Untyped.ReadCtx m msg)) => (Provide msg) -> (m Std_.Bool)
 has_Provide'target (Provide'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Provide'target :: ((Untyped.RWCtx m s)) => (Provide (Message.MutMsg s)) -> (m (MessageTarget (Message.MutMsg s)))
+new_Provide'target :: ((Untyped.RWCtx m s)) => (Provide (Message.Mut s)) -> (m (MessageTarget (Message.Mut s)))
 new_Provide'target struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Provide'target struct result)
@@ -915,7 +906,7 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Provide'recipient :: ((Untyped.RWCtx m s)
-                         ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))))) => (Provide (Message.MutMsg s)) -> (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))) -> (m ())
+                         ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.Mut s))))) => (Provide (Message.Mut s)) -> (Std_.Maybe (Untyped.Ptr (Message.Mut s))) -> (m ())
 set_Provide'recipient (Provide'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 1 struct)
@@ -928,20 +919,19 @@
     fromStruct struct = (Std_.pure (Accept'newtype_ struct))
 instance (Classes.ToStruct msg (Accept msg)) where
     toStruct (Accept'newtype_ struct) = struct
-instance (Untyped.HasMessage (Accept msg)) where
-    type InMessage (Accept msg) = msg
+instance (Untyped.HasMessage (Accept mut) mut) where
     message (Accept'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Accept msg)) where
+instance (Untyped.MessageDefault (Accept mut) mut) where
     messageDefault msg = (Accept'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Accept msg)) where
     fromPtr msg ptr = (Accept'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Accept (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Accept (Message.Mut s))) where
     toPtr msg (Accept'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Accept (Message.MutMsg s))) where
+instance (Classes.Allocate s (Accept (Message.Mut s))) where
     new msg = (Accept'newtype_ <$> (Untyped.allocStruct msg 1 1))
-instance (Basics.ListElem msg (Accept msg)) where
-    newtype List msg (Accept msg)
-        = Accept'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Accept mut)) where
+    newtype List mut (Accept mut)
+        = Accept'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Accept'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Accept'List_ l) = (Untyped.ListStruct l)
     length (Accept'List_ l) = (Untyped.length l)
@@ -949,12 +939,12 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Accept (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Accept (Message.Mut s))) where
     setIndex (Accept'newtype_ elt) i (Accept'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Accept'List_ <$> (Untyped.allocCompositeList msg 1 1 len))
 get_Accept'questionId :: ((Untyped.ReadCtx m msg)) => (Accept msg) -> (m Std_.Word32)
 get_Accept'questionId (Accept'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Accept'questionId :: ((Untyped.RWCtx m s)) => (Accept (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_Accept'questionId :: ((Untyped.RWCtx m s)) => (Accept (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_Accept'questionId (Accept'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
 get_Accept'provision :: ((Untyped.ReadCtx m msg)
                         ,(Classes.FromPtr msg (Std_.Maybe (Untyped.Ptr msg)))) => (Accept msg) -> (m (Std_.Maybe (Untyped.Ptr msg)))
@@ -963,7 +953,7 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Accept'provision :: ((Untyped.RWCtx m s)
-                        ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))))) => (Accept (Message.MutMsg s)) -> (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))) -> (m ())
+                        ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.Mut s))))) => (Accept (Message.Mut s)) -> (Std_.Maybe (Untyped.Ptr (Message.Mut s))) -> (m ())
 set_Accept'provision (Accept'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
@@ -972,7 +962,7 @@
 has_Accept'provision (Accept'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
 get_Accept'embargo :: ((Untyped.ReadCtx m msg)) => (Accept msg) -> (m Std_.Bool)
 get_Accept'embargo (Accept'newtype_ struct) = (GenHelpers.getWordField struct 0 32 0)
-set_Accept'embargo :: ((Untyped.RWCtx m s)) => (Accept (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_Accept'embargo :: ((Untyped.RWCtx m s)) => (Accept (Message.Mut s)) -> Std_.Bool -> (m ())
 set_Accept'embargo (Accept'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 0 32 0)
 newtype Join msg
     = Join'newtype_ (Untyped.Struct msg)
@@ -980,20 +970,19 @@
     fromStruct struct = (Std_.pure (Join'newtype_ struct))
 instance (Classes.ToStruct msg (Join msg)) where
     toStruct (Join'newtype_ struct) = struct
-instance (Untyped.HasMessage (Join msg)) where
-    type InMessage (Join msg) = msg
+instance (Untyped.HasMessage (Join mut) mut) where
     message (Join'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Join msg)) where
+instance (Untyped.MessageDefault (Join mut) mut) where
     messageDefault msg = (Join'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Join msg)) where
     fromPtr msg ptr = (Join'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Join (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Join (Message.Mut s))) where
     toPtr msg (Join'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Join (Message.MutMsg s))) where
+instance (Classes.Allocate s (Join (Message.Mut s))) where
     new msg = (Join'newtype_ <$> (Untyped.allocStruct msg 1 2))
-instance (Basics.ListElem msg (Join msg)) where
-    newtype List msg (Join msg)
-        = Join'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Join mut)) where
+    newtype List mut (Join mut)
+        = Join'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Join'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Join'List_ l) = (Untyped.ListStruct l)
     length (Join'List_ l) = (Untyped.length l)
@@ -1001,12 +990,12 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Join (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Join (Message.Mut s))) where
     setIndex (Join'newtype_ elt) i (Join'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Join'List_ <$> (Untyped.allocCompositeList msg 1 2 len))
 get_Join'questionId :: ((Untyped.ReadCtx m msg)) => (Join msg) -> (m Std_.Word32)
 get_Join'questionId (Join'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Join'questionId :: ((Untyped.RWCtx m s)) => (Join (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_Join'questionId :: ((Untyped.RWCtx m s)) => (Join (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_Join'questionId (Join'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
 get_Join'target :: ((Untyped.ReadCtx m msg)
                    ,(Classes.FromPtr msg (MessageTarget msg))) => (Join msg) -> (m (MessageTarget msg))
@@ -1015,14 +1004,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Join'target :: ((Untyped.RWCtx m s)
-                   ,(Classes.ToPtr s (MessageTarget (Message.MutMsg s)))) => (Join (Message.MutMsg s)) -> (MessageTarget (Message.MutMsg s)) -> (m ())
+                   ,(Classes.ToPtr s (MessageTarget (Message.Mut s)))) => (Join (Message.Mut s)) -> (MessageTarget (Message.Mut s)) -> (m ())
 set_Join'target (Join'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Join'target :: ((Untyped.ReadCtx m msg)) => (Join msg) -> (m Std_.Bool)
 has_Join'target (Join'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Join'target :: ((Untyped.RWCtx m s)) => (Join (Message.MutMsg s)) -> (m (MessageTarget (Message.MutMsg s)))
+new_Join'target :: ((Untyped.RWCtx m s)) => (Join (Message.Mut s)) -> (m (MessageTarget (Message.Mut s)))
 new_Join'target struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Join'target struct result)
@@ -1035,7 +1024,7 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Join'keyPart :: ((Untyped.RWCtx m s)
-                    ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))))) => (Join (Message.MutMsg s)) -> (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))) -> (m ())
+                    ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.Mut s))))) => (Join (Message.Mut s)) -> (Std_.Maybe (Untyped.Ptr (Message.Mut s))) -> (m ())
 set_Join'keyPart (Join'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 1 struct)
@@ -1048,20 +1037,19 @@
     fromStruct struct = (Std_.pure (MessageTarget'newtype_ struct))
 instance (Classes.ToStruct msg (MessageTarget msg)) where
     toStruct (MessageTarget'newtype_ struct) = struct
-instance (Untyped.HasMessage (MessageTarget msg)) where
-    type InMessage (MessageTarget msg) = msg
+instance (Untyped.HasMessage (MessageTarget mut) mut) where
     message (MessageTarget'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (MessageTarget msg)) where
+instance (Untyped.MessageDefault (MessageTarget mut) mut) where
     messageDefault msg = (MessageTarget'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (MessageTarget msg)) where
     fromPtr msg ptr = (MessageTarget'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (MessageTarget (Message.MutMsg s))) where
+instance (Classes.ToPtr s (MessageTarget (Message.Mut s))) where
     toPtr msg (MessageTarget'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (MessageTarget (Message.MutMsg s))) where
+instance (Classes.Allocate s (MessageTarget (Message.Mut s))) where
     new msg = (MessageTarget'newtype_ <$> (Untyped.allocStruct msg 1 1))
-instance (Basics.ListElem msg (MessageTarget msg)) where
-    newtype List msg (MessageTarget msg)
-        = MessageTarget'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (MessageTarget mut)) where
+    newtype List mut (MessageTarget mut)
+        = MessageTarget'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (MessageTarget'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (MessageTarget'List_ l) = (Untyped.ListStruct l)
     length (MessageTarget'List_ l) = (Untyped.length l)
@@ -1069,14 +1057,14 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (MessageTarget (Message.MutMsg s))) where
+instance (Basics.MutListElem s (MessageTarget (Message.Mut s))) where
     setIndex (MessageTarget'newtype_ elt) i (MessageTarget'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (MessageTarget'List_ <$> (Untyped.allocCompositeList msg 1 1 len))
-data MessageTarget' msg
+data MessageTarget' (mut :: Message.Mutability)
     = MessageTarget'importedCap Std_.Word32
-    | MessageTarget'promisedAnswer (PromisedAnswer msg)
+    | MessageTarget'promisedAnswer (PromisedAnswer mut)
     | MessageTarget'unknown' Std_.Word16
-instance (Classes.FromStruct msg (MessageTarget' msg)) where
+instance (Classes.FromStruct mut (MessageTarget' mut)) where
     fromStruct struct = (do
         tag <- (GenHelpers.getTag struct 2)
         case tag of
@@ -1093,13 +1081,13 @@
 get_MessageTarget' :: ((Untyped.ReadCtx m msg)
                       ,(Classes.FromStruct msg (MessageTarget' msg))) => (MessageTarget msg) -> (m (MessageTarget' msg))
 get_MessageTarget' (MessageTarget'newtype_ struct) = (Classes.fromStruct struct)
-set_MessageTarget'importedCap :: ((Untyped.RWCtx m s)) => (MessageTarget (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_MessageTarget'importedCap :: ((Untyped.RWCtx m s)) => (MessageTarget (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_MessageTarget'importedCap (MessageTarget'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (0 :: Std_.Word16) 0 32 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
     )
 set_MessageTarget'promisedAnswer :: ((Untyped.RWCtx m s)
-                                    ,(Classes.ToPtr s (PromisedAnswer (Message.MutMsg s)))) => (MessageTarget (Message.MutMsg s)) -> (PromisedAnswer (Message.MutMsg s)) -> (m ())
+                                    ,(Classes.ToPtr s (PromisedAnswer (Message.Mut s)))) => (MessageTarget (Message.Mut s)) -> (PromisedAnswer (Message.Mut s)) -> (m ())
 set_MessageTarget'promisedAnswer (MessageTarget'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (1 :: Std_.Word16) 0 32 0)
     (do
@@ -1107,7 +1095,7 @@
         (Untyped.setPtr ptr 0 struct)
         )
     )
-set_MessageTarget'unknown' :: ((Untyped.RWCtx m s)) => (MessageTarget (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_MessageTarget'unknown' :: ((Untyped.RWCtx m s)) => (MessageTarget (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_MessageTarget'unknown' (MessageTarget'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 32 0)
 newtype Payload msg
     = Payload'newtype_ (Untyped.Struct msg)
@@ -1115,20 +1103,19 @@
     fromStruct struct = (Std_.pure (Payload'newtype_ struct))
 instance (Classes.ToStruct msg (Payload msg)) where
     toStruct (Payload'newtype_ struct) = struct
-instance (Untyped.HasMessage (Payload msg)) where
-    type InMessage (Payload msg) = msg
+instance (Untyped.HasMessage (Payload mut) mut) where
     message (Payload'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Payload msg)) where
+instance (Untyped.MessageDefault (Payload mut) mut) where
     messageDefault msg = (Payload'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Payload msg)) where
     fromPtr msg ptr = (Payload'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Payload (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Payload (Message.Mut s))) where
     toPtr msg (Payload'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Payload (Message.MutMsg s))) where
+instance (Classes.Allocate s (Payload (Message.Mut s))) where
     new msg = (Payload'newtype_ <$> (Untyped.allocStruct msg 0 2))
-instance (Basics.ListElem msg (Payload msg)) where
-    newtype List msg (Payload msg)
-        = Payload'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Payload mut)) where
+    newtype List mut (Payload mut)
+        = Payload'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Payload'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Payload'List_ l) = (Untyped.ListStruct l)
     length (Payload'List_ l) = (Untyped.length l)
@@ -1136,7 +1123,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Payload (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Payload (Message.Mut s))) where
     setIndex (Payload'newtype_ elt) i (Payload'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Payload'List_ <$> (Untyped.allocCompositeList msg 0 2 len))
 get_Payload'content :: ((Untyped.ReadCtx m msg)
@@ -1146,7 +1133,7 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Payload'content :: ((Untyped.RWCtx m s)
-                       ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))))) => (Payload (Message.MutMsg s)) -> (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))) -> (m ())
+                       ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.Mut s))))) => (Payload (Message.Mut s)) -> (Std_.Maybe (Untyped.Ptr (Message.Mut s))) -> (m ())
 set_Payload'content (Payload'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
@@ -1160,14 +1147,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Payload'capTable :: ((Untyped.RWCtx m s)
-                        ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (CapDescriptor (Message.MutMsg s))))) => (Payload (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (CapDescriptor (Message.MutMsg s))) -> (m ())
+                        ,(Classes.ToPtr s (Basics.List (Message.Mut s) (CapDescriptor (Message.Mut s))))) => (Payload (Message.Mut s)) -> (Basics.List (Message.Mut s) (CapDescriptor (Message.Mut s))) -> (m ())
 set_Payload'capTable (Payload'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 1 struct)
     )
 has_Payload'capTable :: ((Untyped.ReadCtx m msg)) => (Payload msg) -> (m Std_.Bool)
 has_Payload'capTable (Payload'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_Payload'capTable :: ((Untyped.RWCtx m s)) => Std_.Int -> (Payload (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (CapDescriptor (Message.MutMsg s))))
+new_Payload'capTable :: ((Untyped.RWCtx m s)) => Std_.Int -> (Payload (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (CapDescriptor (Message.Mut s))))
 new_Payload'capTable len struct = (do
     result <- (Classes.newList (Untyped.message struct) len)
     (set_Payload'capTable struct result)
@@ -1179,20 +1166,19 @@
     fromStruct struct = (Std_.pure (CapDescriptor'newtype_ struct))
 instance (Classes.ToStruct msg (CapDescriptor msg)) where
     toStruct (CapDescriptor'newtype_ struct) = struct
-instance (Untyped.HasMessage (CapDescriptor msg)) where
-    type InMessage (CapDescriptor msg) = msg
+instance (Untyped.HasMessage (CapDescriptor mut) mut) where
     message (CapDescriptor'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (CapDescriptor msg)) where
+instance (Untyped.MessageDefault (CapDescriptor mut) mut) where
     messageDefault msg = (CapDescriptor'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (CapDescriptor msg)) where
     fromPtr msg ptr = (CapDescriptor'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (CapDescriptor (Message.MutMsg s))) where
+instance (Classes.ToPtr s (CapDescriptor (Message.Mut s))) where
     toPtr msg (CapDescriptor'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (CapDescriptor (Message.MutMsg s))) where
+instance (Classes.Allocate s (CapDescriptor (Message.Mut s))) where
     new msg = (CapDescriptor'newtype_ <$> (Untyped.allocStruct msg 1 1))
-instance (Basics.ListElem msg (CapDescriptor msg)) where
-    newtype List msg (CapDescriptor msg)
-        = CapDescriptor'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (CapDescriptor mut)) where
+    newtype List mut (CapDescriptor mut)
+        = CapDescriptor'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (CapDescriptor'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (CapDescriptor'List_ l) = (Untyped.ListStruct l)
     length (CapDescriptor'List_ l) = (Untyped.length l)
@@ -1200,22 +1186,22 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (CapDescriptor (Message.MutMsg s))) where
+instance (Basics.MutListElem s (CapDescriptor (Message.Mut s))) where
     setIndex (CapDescriptor'newtype_ elt) i (CapDescriptor'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (CapDescriptor'List_ <$> (Untyped.allocCompositeList msg 1 1 len))
 get_CapDescriptor'attachedFd :: ((Untyped.ReadCtx m msg)) => (CapDescriptor msg) -> (m Std_.Word8)
 get_CapDescriptor'attachedFd (CapDescriptor'newtype_ struct) = (GenHelpers.getWordField struct 0 16 255)
-set_CapDescriptor'attachedFd :: ((Untyped.RWCtx m s)) => (CapDescriptor (Message.MutMsg s)) -> Std_.Word8 -> (m ())
+set_CapDescriptor'attachedFd :: ((Untyped.RWCtx m s)) => (CapDescriptor (Message.Mut s)) -> Std_.Word8 -> (m ())
 set_CapDescriptor'attachedFd (CapDescriptor'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word8) 0 16 255)
-data CapDescriptor' msg
+data CapDescriptor' (mut :: Message.Mutability)
     = CapDescriptor'none 
     | CapDescriptor'senderHosted Std_.Word32
     | CapDescriptor'senderPromise Std_.Word32
     | CapDescriptor'receiverHosted Std_.Word32
-    | CapDescriptor'receiverAnswer (PromisedAnswer msg)
-    | CapDescriptor'thirdPartyHosted (ThirdPartyCapDescriptor msg)
+    | CapDescriptor'receiverAnswer (PromisedAnswer mut)
+    | CapDescriptor'thirdPartyHosted (ThirdPartyCapDescriptor mut)
     | CapDescriptor'unknown' Std_.Word16
-instance (Classes.FromStruct msg (CapDescriptor' msg)) where
+instance (Classes.FromStruct mut (CapDescriptor' mut)) where
     fromStruct struct = (do
         tag <- (GenHelpers.getTag struct 0)
         case tag of
@@ -1243,28 +1229,28 @@
 get_CapDescriptor' :: ((Untyped.ReadCtx m msg)
                       ,(Classes.FromStruct msg (CapDescriptor' msg))) => (CapDescriptor msg) -> (m (CapDescriptor' msg))
 get_CapDescriptor' (CapDescriptor'newtype_ struct) = (Classes.fromStruct struct)
-set_CapDescriptor'none :: ((Untyped.RWCtx m s)) => (CapDescriptor (Message.MutMsg s)) -> (m ())
+set_CapDescriptor'none :: ((Untyped.RWCtx m s)) => (CapDescriptor (Message.Mut s)) -> (m ())
 set_CapDescriptor'none (CapDescriptor'newtype_ struct) = (do
     (GenHelpers.setWordField struct (0 :: Std_.Word16) 0 0 0)
     (Std_.pure ())
     )
-set_CapDescriptor'senderHosted :: ((Untyped.RWCtx m s)) => (CapDescriptor (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_CapDescriptor'senderHosted :: ((Untyped.RWCtx m s)) => (CapDescriptor (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_CapDescriptor'senderHosted (CapDescriptor'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (1 :: Std_.Word16) 0 0 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 32 0)
     )
-set_CapDescriptor'senderPromise :: ((Untyped.RWCtx m s)) => (CapDescriptor (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_CapDescriptor'senderPromise :: ((Untyped.RWCtx m s)) => (CapDescriptor (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_CapDescriptor'senderPromise (CapDescriptor'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (2 :: Std_.Word16) 0 0 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 32 0)
     )
-set_CapDescriptor'receiverHosted :: ((Untyped.RWCtx m s)) => (CapDescriptor (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_CapDescriptor'receiverHosted :: ((Untyped.RWCtx m s)) => (CapDescriptor (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_CapDescriptor'receiverHosted (CapDescriptor'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (3 :: Std_.Word16) 0 0 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 32 0)
     )
 set_CapDescriptor'receiverAnswer :: ((Untyped.RWCtx m s)
-                                    ,(Classes.ToPtr s (PromisedAnswer (Message.MutMsg s)))) => (CapDescriptor (Message.MutMsg s)) -> (PromisedAnswer (Message.MutMsg s)) -> (m ())
+                                    ,(Classes.ToPtr s (PromisedAnswer (Message.Mut s)))) => (CapDescriptor (Message.Mut s)) -> (PromisedAnswer (Message.Mut s)) -> (m ())
 set_CapDescriptor'receiverAnswer (CapDescriptor'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (4 :: Std_.Word16) 0 0 0)
     (do
@@ -1273,7 +1259,7 @@
         )
     )
 set_CapDescriptor'thirdPartyHosted :: ((Untyped.RWCtx m s)
-                                      ,(Classes.ToPtr s (ThirdPartyCapDescriptor (Message.MutMsg s)))) => (CapDescriptor (Message.MutMsg s)) -> (ThirdPartyCapDescriptor (Message.MutMsg s)) -> (m ())
+                                      ,(Classes.ToPtr s (ThirdPartyCapDescriptor (Message.Mut s)))) => (CapDescriptor (Message.Mut s)) -> (ThirdPartyCapDescriptor (Message.Mut s)) -> (m ())
 set_CapDescriptor'thirdPartyHosted (CapDescriptor'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (5 :: Std_.Word16) 0 0 0)
     (do
@@ -1281,7 +1267,7 @@
         (Untyped.setPtr ptr 0 struct)
         )
     )
-set_CapDescriptor'unknown' :: ((Untyped.RWCtx m s)) => (CapDescriptor (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_CapDescriptor'unknown' :: ((Untyped.RWCtx m s)) => (CapDescriptor (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_CapDescriptor'unknown' (CapDescriptor'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
 newtype PromisedAnswer msg
     = PromisedAnswer'newtype_ (Untyped.Struct msg)
@@ -1289,20 +1275,19 @@
     fromStruct struct = (Std_.pure (PromisedAnswer'newtype_ struct))
 instance (Classes.ToStruct msg (PromisedAnswer msg)) where
     toStruct (PromisedAnswer'newtype_ struct) = struct
-instance (Untyped.HasMessage (PromisedAnswer msg)) where
-    type InMessage (PromisedAnswer msg) = msg
+instance (Untyped.HasMessage (PromisedAnswer mut) mut) where
     message (PromisedAnswer'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (PromisedAnswer msg)) where
+instance (Untyped.MessageDefault (PromisedAnswer mut) mut) where
     messageDefault msg = (PromisedAnswer'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (PromisedAnswer msg)) where
     fromPtr msg ptr = (PromisedAnswer'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (PromisedAnswer (Message.MutMsg s))) where
+instance (Classes.ToPtr s (PromisedAnswer (Message.Mut s))) where
     toPtr msg (PromisedAnswer'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (PromisedAnswer (Message.MutMsg s))) where
+instance (Classes.Allocate s (PromisedAnswer (Message.Mut s))) where
     new msg = (PromisedAnswer'newtype_ <$> (Untyped.allocStruct msg 1 1))
-instance (Basics.ListElem msg (PromisedAnswer msg)) where
-    newtype List msg (PromisedAnswer msg)
-        = PromisedAnswer'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (PromisedAnswer mut)) where
+    newtype List mut (PromisedAnswer mut)
+        = PromisedAnswer'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (PromisedAnswer'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (PromisedAnswer'List_ l) = (Untyped.ListStruct l)
     length (PromisedAnswer'List_ l) = (Untyped.length l)
@@ -1310,12 +1295,12 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (PromisedAnswer (Message.MutMsg s))) where
+instance (Basics.MutListElem s (PromisedAnswer (Message.Mut s))) where
     setIndex (PromisedAnswer'newtype_ elt) i (PromisedAnswer'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (PromisedAnswer'List_ <$> (Untyped.allocCompositeList msg 1 1 len))
 get_PromisedAnswer'questionId :: ((Untyped.ReadCtx m msg)) => (PromisedAnswer msg) -> (m Std_.Word32)
 get_PromisedAnswer'questionId (PromisedAnswer'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_PromisedAnswer'questionId :: ((Untyped.RWCtx m s)) => (PromisedAnswer (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_PromisedAnswer'questionId :: ((Untyped.RWCtx m s)) => (PromisedAnswer (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_PromisedAnswer'questionId (PromisedAnswer'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
 get_PromisedAnswer'transform :: ((Untyped.ReadCtx m msg)
                                 ,(Classes.FromPtr msg (Basics.List msg (PromisedAnswer'Op msg)))) => (PromisedAnswer msg) -> (m (Basics.List msg (PromisedAnswer'Op msg)))
@@ -1324,14 +1309,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_PromisedAnswer'transform :: ((Untyped.RWCtx m s)
-                                ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (PromisedAnswer'Op (Message.MutMsg s))))) => (PromisedAnswer (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (PromisedAnswer'Op (Message.MutMsg s))) -> (m ())
+                                ,(Classes.ToPtr s (Basics.List (Message.Mut s) (PromisedAnswer'Op (Message.Mut s))))) => (PromisedAnswer (Message.Mut s)) -> (Basics.List (Message.Mut s) (PromisedAnswer'Op (Message.Mut s))) -> (m ())
 set_PromisedAnswer'transform (PromisedAnswer'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_PromisedAnswer'transform :: ((Untyped.ReadCtx m msg)) => (PromisedAnswer msg) -> (m Std_.Bool)
 has_PromisedAnswer'transform (PromisedAnswer'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_PromisedAnswer'transform :: ((Untyped.RWCtx m s)) => Std_.Int -> (PromisedAnswer (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (PromisedAnswer'Op (Message.MutMsg s))))
+new_PromisedAnswer'transform :: ((Untyped.RWCtx m s)) => Std_.Int -> (PromisedAnswer (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (PromisedAnswer'Op (Message.Mut s))))
 new_PromisedAnswer'transform len struct = (do
     result <- (Classes.newList (Untyped.message struct) len)
     (set_PromisedAnswer'transform struct result)
@@ -1343,20 +1328,19 @@
     fromStruct struct = (Std_.pure (PromisedAnswer'Op'newtype_ struct))
 instance (Classes.ToStruct msg (PromisedAnswer'Op msg)) where
     toStruct (PromisedAnswer'Op'newtype_ struct) = struct
-instance (Untyped.HasMessage (PromisedAnswer'Op msg)) where
-    type InMessage (PromisedAnswer'Op msg) = msg
+instance (Untyped.HasMessage (PromisedAnswer'Op mut) mut) where
     message (PromisedAnswer'Op'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (PromisedAnswer'Op msg)) where
+instance (Untyped.MessageDefault (PromisedAnswer'Op mut) mut) where
     messageDefault msg = (PromisedAnswer'Op'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (PromisedAnswer'Op msg)) where
     fromPtr msg ptr = (PromisedAnswer'Op'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (PromisedAnswer'Op (Message.MutMsg s))) where
+instance (Classes.ToPtr s (PromisedAnswer'Op (Message.Mut s))) where
     toPtr msg (PromisedAnswer'Op'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (PromisedAnswer'Op (Message.MutMsg s))) where
+instance (Classes.Allocate s (PromisedAnswer'Op (Message.Mut s))) where
     new msg = (PromisedAnswer'Op'newtype_ <$> (Untyped.allocStruct msg 1 0))
-instance (Basics.ListElem msg (PromisedAnswer'Op msg)) where
-    newtype List msg (PromisedAnswer'Op msg)
-        = PromisedAnswer'Op'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (PromisedAnswer'Op mut)) where
+    newtype List mut (PromisedAnswer'Op mut)
+        = PromisedAnswer'Op'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (PromisedAnswer'Op'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (PromisedAnswer'Op'List_ l) = (Untyped.ListStruct l)
     length (PromisedAnswer'Op'List_ l) = (Untyped.length l)
@@ -1364,14 +1348,14 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (PromisedAnswer'Op (Message.MutMsg s))) where
+instance (Basics.MutListElem s (PromisedAnswer'Op (Message.Mut s))) where
     setIndex (PromisedAnswer'Op'newtype_ elt) i (PromisedAnswer'Op'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (PromisedAnswer'Op'List_ <$> (Untyped.allocCompositeList msg 1 0 len))
-data PromisedAnswer'Op' msg
+data PromisedAnswer'Op' (mut :: Message.Mutability)
     = PromisedAnswer'Op'noop 
     | PromisedAnswer'Op'getPointerField Std_.Word16
     | PromisedAnswer'Op'unknown' Std_.Word16
-instance (Classes.FromStruct msg (PromisedAnswer'Op' msg)) where
+instance (Classes.FromStruct mut (PromisedAnswer'Op' mut)) where
     fromStruct struct = (do
         tag <- (GenHelpers.getTag struct 0)
         case tag of
@@ -1385,17 +1369,17 @@
 get_PromisedAnswer'Op' :: ((Untyped.ReadCtx m msg)
                           ,(Classes.FromStruct msg (PromisedAnswer'Op' msg))) => (PromisedAnswer'Op msg) -> (m (PromisedAnswer'Op' msg))
 get_PromisedAnswer'Op' (PromisedAnswer'Op'newtype_ struct) = (Classes.fromStruct struct)
-set_PromisedAnswer'Op'noop :: ((Untyped.RWCtx m s)) => (PromisedAnswer'Op (Message.MutMsg s)) -> (m ())
+set_PromisedAnswer'Op'noop :: ((Untyped.RWCtx m s)) => (PromisedAnswer'Op (Message.Mut s)) -> (m ())
 set_PromisedAnswer'Op'noop (PromisedAnswer'Op'newtype_ struct) = (do
     (GenHelpers.setWordField struct (0 :: Std_.Word16) 0 0 0)
     (Std_.pure ())
     )
-set_PromisedAnswer'Op'getPointerField :: ((Untyped.RWCtx m s)) => (PromisedAnswer'Op (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_PromisedAnswer'Op'getPointerField :: ((Untyped.RWCtx m s)) => (PromisedAnswer'Op (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_PromisedAnswer'Op'getPointerField (PromisedAnswer'Op'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (1 :: Std_.Word16) 0 0 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 16 0)
     )
-set_PromisedAnswer'Op'unknown' :: ((Untyped.RWCtx m s)) => (PromisedAnswer'Op (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_PromisedAnswer'Op'unknown' :: ((Untyped.RWCtx m s)) => (PromisedAnswer'Op (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_PromisedAnswer'Op'unknown' (PromisedAnswer'Op'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
 newtype ThirdPartyCapDescriptor msg
     = ThirdPartyCapDescriptor'newtype_ (Untyped.Struct msg)
@@ -1403,20 +1387,19 @@
     fromStruct struct = (Std_.pure (ThirdPartyCapDescriptor'newtype_ struct))
 instance (Classes.ToStruct msg (ThirdPartyCapDescriptor msg)) where
     toStruct (ThirdPartyCapDescriptor'newtype_ struct) = struct
-instance (Untyped.HasMessage (ThirdPartyCapDescriptor msg)) where
-    type InMessage (ThirdPartyCapDescriptor msg) = msg
+instance (Untyped.HasMessage (ThirdPartyCapDescriptor mut) mut) where
     message (ThirdPartyCapDescriptor'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (ThirdPartyCapDescriptor msg)) where
+instance (Untyped.MessageDefault (ThirdPartyCapDescriptor mut) mut) where
     messageDefault msg = (ThirdPartyCapDescriptor'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (ThirdPartyCapDescriptor msg)) where
     fromPtr msg ptr = (ThirdPartyCapDescriptor'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (ThirdPartyCapDescriptor (Message.MutMsg s))) where
+instance (Classes.ToPtr s (ThirdPartyCapDescriptor (Message.Mut s))) where
     toPtr msg (ThirdPartyCapDescriptor'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (ThirdPartyCapDescriptor (Message.MutMsg s))) where
+instance (Classes.Allocate s (ThirdPartyCapDescriptor (Message.Mut s))) where
     new msg = (ThirdPartyCapDescriptor'newtype_ <$> (Untyped.allocStruct msg 1 1))
-instance (Basics.ListElem msg (ThirdPartyCapDescriptor msg)) where
-    newtype List msg (ThirdPartyCapDescriptor msg)
-        = ThirdPartyCapDescriptor'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (ThirdPartyCapDescriptor mut)) where
+    newtype List mut (ThirdPartyCapDescriptor mut)
+        = ThirdPartyCapDescriptor'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (ThirdPartyCapDescriptor'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (ThirdPartyCapDescriptor'List_ l) = (Untyped.ListStruct l)
     length (ThirdPartyCapDescriptor'List_ l) = (Untyped.length l)
@@ -1424,7 +1407,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (ThirdPartyCapDescriptor (Message.MutMsg s))) where
+instance (Basics.MutListElem s (ThirdPartyCapDescriptor (Message.Mut s))) where
     setIndex (ThirdPartyCapDescriptor'newtype_ elt) i (ThirdPartyCapDescriptor'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (ThirdPartyCapDescriptor'List_ <$> (Untyped.allocCompositeList msg 1 1 len))
 get_ThirdPartyCapDescriptor'id :: ((Untyped.ReadCtx m msg)
@@ -1434,7 +1417,7 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_ThirdPartyCapDescriptor'id :: ((Untyped.RWCtx m s)
-                                  ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))))) => (ThirdPartyCapDescriptor (Message.MutMsg s)) -> (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))) -> (m ())
+                                  ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.Mut s))))) => (ThirdPartyCapDescriptor (Message.Mut s)) -> (Std_.Maybe (Untyped.Ptr (Message.Mut s))) -> (m ())
 set_ThirdPartyCapDescriptor'id (ThirdPartyCapDescriptor'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
@@ -1443,7 +1426,7 @@
 has_ThirdPartyCapDescriptor'id (ThirdPartyCapDescriptor'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
 get_ThirdPartyCapDescriptor'vineId :: ((Untyped.ReadCtx m msg)) => (ThirdPartyCapDescriptor msg) -> (m Std_.Word32)
 get_ThirdPartyCapDescriptor'vineId (ThirdPartyCapDescriptor'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_ThirdPartyCapDescriptor'vineId :: ((Untyped.RWCtx m s)) => (ThirdPartyCapDescriptor (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_ThirdPartyCapDescriptor'vineId :: ((Untyped.RWCtx m s)) => (ThirdPartyCapDescriptor (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_ThirdPartyCapDescriptor'vineId (ThirdPartyCapDescriptor'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
 newtype Exception msg
     = Exception'newtype_ (Untyped.Struct msg)
@@ -1451,20 +1434,19 @@
     fromStruct struct = (Std_.pure (Exception'newtype_ struct))
 instance (Classes.ToStruct msg (Exception msg)) where
     toStruct (Exception'newtype_ struct) = struct
-instance (Untyped.HasMessage (Exception msg)) where
-    type InMessage (Exception msg) = msg
+instance (Untyped.HasMessage (Exception mut) mut) where
     message (Exception'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Exception msg)) where
+instance (Untyped.MessageDefault (Exception mut) mut) where
     messageDefault msg = (Exception'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Exception msg)) where
     fromPtr msg ptr = (Exception'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Exception (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Exception (Message.Mut s))) where
     toPtr msg (Exception'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Exception (Message.MutMsg s))) where
+instance (Classes.Allocate s (Exception (Message.Mut s))) where
     new msg = (Exception'newtype_ <$> (Untyped.allocStruct msg 1 1))
-instance (Basics.ListElem msg (Exception msg)) where
-    newtype List msg (Exception msg)
-        = Exception'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Exception mut)) where
+    newtype List mut (Exception mut)
+        = Exception'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Exception'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Exception'List_ l) = (Untyped.ListStruct l)
     length (Exception'List_ l) = (Untyped.length l)
@@ -1472,7 +1454,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Exception (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Exception (Message.Mut s))) where
     setIndex (Exception'newtype_ elt) i (Exception'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Exception'List_ <$> (Untyped.allocCompositeList msg 1 1 len))
 get_Exception'reason :: ((Untyped.ReadCtx m msg)
@@ -1482,14 +1464,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Exception'reason :: ((Untyped.RWCtx m s)
-                        ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (Exception (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
+                        ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Exception (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
 set_Exception'reason (Exception'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Exception'reason :: ((Untyped.ReadCtx m msg)) => (Exception msg) -> (m Std_.Bool)
 has_Exception'reason (Exception'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Exception'reason :: ((Untyped.RWCtx m s)) => Std_.Int -> (Exception (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
+new_Exception'reason :: ((Untyped.RWCtx m s)) => Std_.Int -> (Exception (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
 new_Exception'reason len struct = (do
     result <- (Basics.newText (Untyped.message struct) len)
     (set_Exception'reason struct result)
@@ -1497,15 +1479,15 @@
     )
 get_Exception'obsoleteIsCallersFault :: ((Untyped.ReadCtx m msg)) => (Exception msg) -> (m Std_.Bool)
 get_Exception'obsoleteIsCallersFault (Exception'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Exception'obsoleteIsCallersFault :: ((Untyped.RWCtx m s)) => (Exception (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_Exception'obsoleteIsCallersFault :: ((Untyped.RWCtx m s)) => (Exception (Message.Mut s)) -> Std_.Bool -> (m ())
 set_Exception'obsoleteIsCallersFault (Exception'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 0 0 0)
 get_Exception'obsoleteDurability :: ((Untyped.ReadCtx m msg)) => (Exception msg) -> (m Std_.Word16)
 get_Exception'obsoleteDurability (Exception'newtype_ struct) = (GenHelpers.getWordField struct 0 16 0)
-set_Exception'obsoleteDurability :: ((Untyped.RWCtx m s)) => (Exception (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Exception'obsoleteDurability :: ((Untyped.RWCtx m s)) => (Exception (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Exception'obsoleteDurability (Exception'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 16 0)
 get_Exception'type_ :: ((Untyped.ReadCtx m msg)) => (Exception msg) -> (m Exception'Type)
 get_Exception'type_ (Exception'newtype_ struct) = (GenHelpers.getWordField struct 0 32 0)
-set_Exception'type_ :: ((Untyped.RWCtx m s)) => (Exception (Message.MutMsg s)) -> Exception'Type -> (m ())
+set_Exception'type_ :: ((Untyped.RWCtx m s)) => (Exception (Message.Mut s)) -> Exception'Type -> (m ())
 set_Exception'type_ (Exception'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 32 0)
 data Exception'Type 
     = Exception'Type'failed 
@@ -1537,9 +1519,9 @@
 instance (Std_.Enum Exception'Type) where
     fromEnum x = (Std_.fromIntegral (Classes.toWord x))
     toEnum x = (Classes.fromWord (Std_.fromIntegral x))
-instance (Basics.ListElem msg Exception'Type) where
-    newtype List msg Exception'Type
-        = Exception'Type'List_ (Untyped.ListOf msg Std_.Word16)
+instance (Basics.ListElem mut Exception'Type) where
+    newtype List mut Exception'Type
+        = Exception'Type'List_ (Untyped.ListOf mut Std_.Word16)
     index i (Exception'Type'List_ l) = (Classes.fromWord <$> (Std_.fromIntegral <$> (Untyped.index i l)))
     listFromPtr msg ptr = (Exception'Type'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Exception'Type'List_ l) = (Untyped.List16 l)
diff --git a/gen/lib/Capnp/Gen/Capnp/Rpc/Pure.hs b/gen/lib/Capnp/Gen/Capnp/Rpc/Pure.hs
--- a/gen/lib/Capnp/Gen/Capnp/Rpc/Pure.hs
+++ b/gen/lib/Capnp/Gen/Capnp/Rpc/Pure.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds #-}
 {-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE DuplicateRecordFields #-}
 {-# LANGUAGE FlexibleContexts #-}
@@ -11,6 +12,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.Capnp.Rpc.Pure(Capnp.Gen.ById.Xb312981b2552a250.Exception'Type(..)
                                ,Message(..)
                                ,Bootstrap(..)
@@ -73,7 +75,7 @@
             ,Generics.Generic)
 instance (Default.Default (Message)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Message)) where
+instance (Classes.FromStruct Message.Const (Message)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Message)) where
     type Cerial msg (Message) = (Capnp.Gen.ById.Xb312981b2552a250.Message msg)
@@ -167,7 +169,7 @@
             ,Generics.Generic)
 instance (Default.Default (Bootstrap)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Bootstrap)) where
+instance (Classes.FromStruct Message.Const (Bootstrap)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Bootstrap)) where
     type Cerial msg (Bootstrap) = (Capnp.Gen.ById.Xb312981b2552a250.Bootstrap msg)
@@ -210,7 +212,7 @@
             ,Generics.Generic)
 instance (Default.Default (Call)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Call)) where
+instance (Classes.FromStruct Message.Const (Call)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Call)) where
     type Cerial msg (Call) = (Capnp.Gen.ById.Xb312981b2552a250.Call msg)
@@ -262,7 +264,7 @@
             ,Generics.Generic)
 instance (Default.Default (Call'sendResultsTo)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Call'sendResultsTo)) where
+instance (Classes.FromStruct Message.Const (Call'sendResultsTo)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Call'sendResultsTo)) where
     type Cerial msg (Call'sendResultsTo) = (Capnp.Gen.ById.Xb312981b2552a250.Call'sendResultsTo msg)
@@ -298,7 +300,7 @@
             ,Generics.Generic)
 instance (Default.Default (Return)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Return)) where
+instance (Classes.FromStruct Message.Const (Return)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Return)) where
     type Cerial msg (Return) = (Capnp.Gen.ById.Xb312981b2552a250.Return msg)
@@ -344,7 +346,7 @@
             ,Generics.Generic)
 instance (Default.Default (Return')) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Return')) where
+instance (Classes.FromStruct Message.Const (Return')) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Return')) where
     type Cerial msg (Return') = (Capnp.Gen.ById.Xb312981b2552a250.Return msg)
@@ -391,7 +393,7 @@
             ,Generics.Generic)
 instance (Default.Default (Finish)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Finish)) where
+instance (Classes.FromStruct Message.Const (Finish)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Finish)) where
     type Cerial msg (Finish) = (Capnp.Gen.ById.Xb312981b2552a250.Finish msg)
@@ -429,7 +431,7 @@
             ,Generics.Generic)
 instance (Default.Default (Resolve)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Resolve)) where
+instance (Classes.FromStruct Message.Const (Resolve)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Resolve)) where
     type Cerial msg (Resolve) = (Capnp.Gen.ById.Xb312981b2552a250.Resolve msg)
@@ -469,7 +471,7 @@
             ,Generics.Generic)
 instance (Default.Default (Resolve')) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Resolve')) where
+instance (Classes.FromStruct Message.Const (Resolve')) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Resolve')) where
     type Cerial msg (Resolve') = (Capnp.Gen.ById.Xb312981b2552a250.Resolve msg)
@@ -500,7 +502,7 @@
             ,Generics.Generic)
 instance (Default.Default (Release)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Release)) where
+instance (Classes.FromStruct Message.Const (Release)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Release)) where
     type Cerial msg (Release) = (Capnp.Gen.ById.Xb312981b2552a250.Release msg)
@@ -538,7 +540,7 @@
             ,Generics.Generic)
 instance (Default.Default (Disembargo)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Disembargo)) where
+instance (Classes.FromStruct Message.Const (Disembargo)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Disembargo)) where
     type Cerial msg (Disembargo) = (Capnp.Gen.ById.Xb312981b2552a250.Disembargo msg)
@@ -581,7 +583,7 @@
             ,Generics.Generic)
 instance (Default.Default (Disembargo'context)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Disembargo'context)) where
+instance (Classes.FromStruct Message.Const (Disembargo'context)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Disembargo'context)) where
     type Cerial msg (Disembargo'context) = (Capnp.Gen.ById.Xb312981b2552a250.Disembargo'context msg)
@@ -621,7 +623,7 @@
             ,Generics.Generic)
 instance (Default.Default (Provide)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Provide)) where
+instance (Classes.FromStruct Message.Const (Provide)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Provide)) where
     type Cerial msg (Provide) = (Capnp.Gen.ById.Xb312981b2552a250.Provide msg)
@@ -662,7 +664,7 @@
             ,Generics.Generic)
 instance (Default.Default (Accept)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Accept)) where
+instance (Classes.FromStruct Message.Const (Accept)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Accept)) where
     type Cerial msg (Accept) = (Capnp.Gen.ById.Xb312981b2552a250.Accept msg)
@@ -703,7 +705,7 @@
             ,Generics.Generic)
 instance (Default.Default (Join)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Join)) where
+instance (Classes.FromStruct Message.Const (Join)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Join)) where
     type Cerial msg (Join) = (Capnp.Gen.ById.Xb312981b2552a250.Join msg)
@@ -743,7 +745,7 @@
             ,Generics.Generic)
 instance (Default.Default (MessageTarget)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (MessageTarget)) where
+instance (Classes.FromStruct Message.Const (MessageTarget)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (MessageTarget)) where
     type Cerial msg (MessageTarget) = (Capnp.Gen.ById.Xb312981b2552a250.MessageTarget msg)
@@ -789,7 +791,7 @@
             ,Generics.Generic)
 instance (Default.Default (Payload)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Payload)) where
+instance (Classes.FromStruct Message.Const (Payload)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Payload)) where
     type Cerial msg (Payload) = (Capnp.Gen.ById.Xb312981b2552a250.Payload msg)
@@ -827,7 +829,7 @@
             ,Generics.Generic)
 instance (Default.Default (CapDescriptor)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (CapDescriptor)) where
+instance (Classes.FromStruct Message.Const (CapDescriptor)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (CapDescriptor)) where
     type Cerial msg (CapDescriptor) = (Capnp.Gen.ById.Xb312981b2552a250.CapDescriptor msg)
@@ -871,7 +873,7 @@
             ,Generics.Generic)
 instance (Default.Default (CapDescriptor')) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (CapDescriptor')) where
+instance (Classes.FromStruct Message.Const (CapDescriptor')) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (CapDescriptor')) where
     type Cerial msg (CapDescriptor') = (Capnp.Gen.ById.Xb312981b2552a250.CapDescriptor msg)
@@ -918,7 +920,7 @@
             ,Generics.Generic)
 instance (Default.Default (PromisedAnswer)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (PromisedAnswer)) where
+instance (Classes.FromStruct Message.Const (PromisedAnswer)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (PromisedAnswer)) where
     type Cerial msg (PromisedAnswer) = (Capnp.Gen.ById.Xb312981b2552a250.PromisedAnswer msg)
@@ -956,7 +958,7 @@
             ,Generics.Generic)
 instance (Default.Default (PromisedAnswer'Op)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (PromisedAnswer'Op)) where
+instance (Classes.FromStruct Message.Const (PromisedAnswer'Op)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (PromisedAnswer'Op)) where
     type Cerial msg (PromisedAnswer'Op) = (Capnp.Gen.ById.Xb312981b2552a250.PromisedAnswer'Op msg)
@@ -1002,7 +1004,7 @@
             ,Generics.Generic)
 instance (Default.Default (ThirdPartyCapDescriptor)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (ThirdPartyCapDescriptor)) where
+instance (Classes.FromStruct Message.Const (ThirdPartyCapDescriptor)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (ThirdPartyCapDescriptor)) where
     type Cerial msg (ThirdPartyCapDescriptor) = (Capnp.Gen.ById.Xb312981b2552a250.ThirdPartyCapDescriptor msg)
@@ -1042,7 +1044,7 @@
             ,Generics.Generic)
 instance (Default.Default (Exception)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Exception)) where
+instance (Classes.FromStruct Message.Const (Exception)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Exception)) where
     type Cerial msg (Exception) = (Capnp.Gen.ById.Xb312981b2552a250.Exception msg)
diff --git a/gen/lib/Capnp/Gen/Capnp/RpcTwoparty.hs b/gen/lib/Capnp/Gen/Capnp/RpcTwoparty.hs
--- a/gen/lib/Capnp/Gen/Capnp/RpcTwoparty.hs
+++ b/gen/lib/Capnp/Gen/Capnp/RpcTwoparty.hs
@@ -3,11 +3,13 @@
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE DataKinds #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# OPTIONS_GHC -Wno-unused-imports #-}
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.Capnp.RpcTwoparty where
 import qualified Capnp.Message as Message
 import qualified Capnp.Untyped as Untyped
@@ -44,9 +46,9 @@
 instance (Std_.Enum Side) where
     fromEnum x = (Std_.fromIntegral (Classes.toWord x))
     toEnum x = (Classes.fromWord (Std_.fromIntegral x))
-instance (Basics.ListElem msg Side) where
-    newtype List msg Side
-        = Side'List_ (Untyped.ListOf msg Std_.Word16)
+instance (Basics.ListElem mut Side) where
+    newtype List mut Side
+        = Side'List_ (Untyped.ListOf mut Std_.Word16)
     index i (Side'List_ l) = (Classes.fromWord <$> (Std_.fromIntegral <$> (Untyped.index i l)))
     listFromPtr msg ptr = (Side'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Side'List_ l) = (Untyped.List16 l)
@@ -60,20 +62,19 @@
     fromStruct struct = (Std_.pure (VatId'newtype_ struct))
 instance (Classes.ToStruct msg (VatId msg)) where
     toStruct (VatId'newtype_ struct) = struct
-instance (Untyped.HasMessage (VatId msg)) where
-    type InMessage (VatId msg) = msg
+instance (Untyped.HasMessage (VatId mut) mut) where
     message (VatId'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (VatId msg)) where
+instance (Untyped.MessageDefault (VatId mut) mut) where
     messageDefault msg = (VatId'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (VatId msg)) where
     fromPtr msg ptr = (VatId'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (VatId (Message.MutMsg s))) where
+instance (Classes.ToPtr s (VatId (Message.Mut s))) where
     toPtr msg (VatId'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (VatId (Message.MutMsg s))) where
+instance (Classes.Allocate s (VatId (Message.Mut s))) where
     new msg = (VatId'newtype_ <$> (Untyped.allocStruct msg 1 0))
-instance (Basics.ListElem msg (VatId msg)) where
-    newtype List msg (VatId msg)
-        = VatId'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (VatId mut)) where
+    newtype List mut (VatId mut)
+        = VatId'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (VatId'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (VatId'List_ l) = (Untyped.ListStruct l)
     length (VatId'List_ l) = (Untyped.length l)
@@ -81,12 +82,12 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (VatId (Message.MutMsg s))) where
+instance (Basics.MutListElem s (VatId (Message.Mut s))) where
     setIndex (VatId'newtype_ elt) i (VatId'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (VatId'List_ <$> (Untyped.allocCompositeList msg 1 0 len))
 get_VatId'side :: ((Untyped.ReadCtx m msg)) => (VatId msg) -> (m Side)
 get_VatId'side (VatId'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_VatId'side :: ((Untyped.RWCtx m s)) => (VatId (Message.MutMsg s)) -> Side -> (m ())
+set_VatId'side :: ((Untyped.RWCtx m s)) => (VatId (Message.Mut s)) -> Side -> (m ())
 set_VatId'side (VatId'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
 newtype ProvisionId msg
     = ProvisionId'newtype_ (Untyped.Struct msg)
@@ -94,20 +95,19 @@
     fromStruct struct = (Std_.pure (ProvisionId'newtype_ struct))
 instance (Classes.ToStruct msg (ProvisionId msg)) where
     toStruct (ProvisionId'newtype_ struct) = struct
-instance (Untyped.HasMessage (ProvisionId msg)) where
-    type InMessage (ProvisionId msg) = msg
+instance (Untyped.HasMessage (ProvisionId mut) mut) where
     message (ProvisionId'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (ProvisionId msg)) where
+instance (Untyped.MessageDefault (ProvisionId mut) mut) where
     messageDefault msg = (ProvisionId'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (ProvisionId msg)) where
     fromPtr msg ptr = (ProvisionId'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (ProvisionId (Message.MutMsg s))) where
+instance (Classes.ToPtr s (ProvisionId (Message.Mut s))) where
     toPtr msg (ProvisionId'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (ProvisionId (Message.MutMsg s))) where
+instance (Classes.Allocate s (ProvisionId (Message.Mut s))) where
     new msg = (ProvisionId'newtype_ <$> (Untyped.allocStruct msg 1 0))
-instance (Basics.ListElem msg (ProvisionId msg)) where
-    newtype List msg (ProvisionId msg)
-        = ProvisionId'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (ProvisionId mut)) where
+    newtype List mut (ProvisionId mut)
+        = ProvisionId'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (ProvisionId'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (ProvisionId'List_ l) = (Untyped.ListStruct l)
     length (ProvisionId'List_ l) = (Untyped.length l)
@@ -115,12 +115,12 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (ProvisionId (Message.MutMsg s))) where
+instance (Basics.MutListElem s (ProvisionId (Message.Mut s))) where
     setIndex (ProvisionId'newtype_ elt) i (ProvisionId'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (ProvisionId'List_ <$> (Untyped.allocCompositeList msg 1 0 len))
 get_ProvisionId'joinId :: ((Untyped.ReadCtx m msg)) => (ProvisionId msg) -> (m Std_.Word32)
 get_ProvisionId'joinId (ProvisionId'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_ProvisionId'joinId :: ((Untyped.RWCtx m s)) => (ProvisionId (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_ProvisionId'joinId :: ((Untyped.RWCtx m s)) => (ProvisionId (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_ProvisionId'joinId (ProvisionId'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
 newtype RecipientId msg
     = RecipientId'newtype_ (Untyped.Struct msg)
@@ -128,20 +128,19 @@
     fromStruct struct = (Std_.pure (RecipientId'newtype_ struct))
 instance (Classes.ToStruct msg (RecipientId msg)) where
     toStruct (RecipientId'newtype_ struct) = struct
-instance (Untyped.HasMessage (RecipientId msg)) where
-    type InMessage (RecipientId msg) = msg
+instance (Untyped.HasMessage (RecipientId mut) mut) where
     message (RecipientId'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (RecipientId msg)) where
+instance (Untyped.MessageDefault (RecipientId mut) mut) where
     messageDefault msg = (RecipientId'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (RecipientId msg)) where
     fromPtr msg ptr = (RecipientId'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (RecipientId (Message.MutMsg s))) where
+instance (Classes.ToPtr s (RecipientId (Message.Mut s))) where
     toPtr msg (RecipientId'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (RecipientId (Message.MutMsg s))) where
+instance (Classes.Allocate s (RecipientId (Message.Mut s))) where
     new msg = (RecipientId'newtype_ <$> (Untyped.allocStruct msg 0 0))
-instance (Basics.ListElem msg (RecipientId msg)) where
-    newtype List msg (RecipientId msg)
-        = RecipientId'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (RecipientId mut)) where
+    newtype List mut (RecipientId mut)
+        = RecipientId'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (RecipientId'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (RecipientId'List_ l) = (Untyped.ListStruct l)
     length (RecipientId'List_ l) = (Untyped.length l)
@@ -149,7 +148,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (RecipientId (Message.MutMsg s))) where
+instance (Basics.MutListElem s (RecipientId (Message.Mut s))) where
     setIndex (RecipientId'newtype_ elt) i (RecipientId'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (RecipientId'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
 newtype ThirdPartyCapId msg
@@ -158,20 +157,19 @@
     fromStruct struct = (Std_.pure (ThirdPartyCapId'newtype_ struct))
 instance (Classes.ToStruct msg (ThirdPartyCapId msg)) where
     toStruct (ThirdPartyCapId'newtype_ struct) = struct
-instance (Untyped.HasMessage (ThirdPartyCapId msg)) where
-    type InMessage (ThirdPartyCapId msg) = msg
+instance (Untyped.HasMessage (ThirdPartyCapId mut) mut) where
     message (ThirdPartyCapId'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (ThirdPartyCapId msg)) where
+instance (Untyped.MessageDefault (ThirdPartyCapId mut) mut) where
     messageDefault msg = (ThirdPartyCapId'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (ThirdPartyCapId msg)) where
     fromPtr msg ptr = (ThirdPartyCapId'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (ThirdPartyCapId (Message.MutMsg s))) where
+instance (Classes.ToPtr s (ThirdPartyCapId (Message.Mut s))) where
     toPtr msg (ThirdPartyCapId'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (ThirdPartyCapId (Message.MutMsg s))) where
+instance (Classes.Allocate s (ThirdPartyCapId (Message.Mut s))) where
     new msg = (ThirdPartyCapId'newtype_ <$> (Untyped.allocStruct msg 0 0))
-instance (Basics.ListElem msg (ThirdPartyCapId msg)) where
-    newtype List msg (ThirdPartyCapId msg)
-        = ThirdPartyCapId'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (ThirdPartyCapId mut)) where
+    newtype List mut (ThirdPartyCapId mut)
+        = ThirdPartyCapId'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (ThirdPartyCapId'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (ThirdPartyCapId'List_ l) = (Untyped.ListStruct l)
     length (ThirdPartyCapId'List_ l) = (Untyped.length l)
@@ -179,7 +177,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (ThirdPartyCapId (Message.MutMsg s))) where
+instance (Basics.MutListElem s (ThirdPartyCapId (Message.Mut s))) where
     setIndex (ThirdPartyCapId'newtype_ elt) i (ThirdPartyCapId'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (ThirdPartyCapId'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
 newtype JoinKeyPart msg
@@ -188,20 +186,19 @@
     fromStruct struct = (Std_.pure (JoinKeyPart'newtype_ struct))
 instance (Classes.ToStruct msg (JoinKeyPart msg)) where
     toStruct (JoinKeyPart'newtype_ struct) = struct
-instance (Untyped.HasMessage (JoinKeyPart msg)) where
-    type InMessage (JoinKeyPart msg) = msg
+instance (Untyped.HasMessage (JoinKeyPart mut) mut) where
     message (JoinKeyPart'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (JoinKeyPart msg)) where
+instance (Untyped.MessageDefault (JoinKeyPart mut) mut) where
     messageDefault msg = (JoinKeyPart'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (JoinKeyPart msg)) where
     fromPtr msg ptr = (JoinKeyPart'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (JoinKeyPart (Message.MutMsg s))) where
+instance (Classes.ToPtr s (JoinKeyPart (Message.Mut s))) where
     toPtr msg (JoinKeyPart'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (JoinKeyPart (Message.MutMsg s))) where
+instance (Classes.Allocate s (JoinKeyPart (Message.Mut s))) where
     new msg = (JoinKeyPart'newtype_ <$> (Untyped.allocStruct msg 1 0))
-instance (Basics.ListElem msg (JoinKeyPart msg)) where
-    newtype List msg (JoinKeyPart msg)
-        = JoinKeyPart'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (JoinKeyPart mut)) where
+    newtype List mut (JoinKeyPart mut)
+        = JoinKeyPart'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (JoinKeyPart'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (JoinKeyPart'List_ l) = (Untyped.ListStruct l)
     length (JoinKeyPart'List_ l) = (Untyped.length l)
@@ -209,20 +206,20 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (JoinKeyPart (Message.MutMsg s))) where
+instance (Basics.MutListElem s (JoinKeyPart (Message.Mut s))) where
     setIndex (JoinKeyPart'newtype_ elt) i (JoinKeyPart'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (JoinKeyPart'List_ <$> (Untyped.allocCompositeList msg 1 0 len))
 get_JoinKeyPart'joinId :: ((Untyped.ReadCtx m msg)) => (JoinKeyPart msg) -> (m Std_.Word32)
 get_JoinKeyPart'joinId (JoinKeyPart'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_JoinKeyPart'joinId :: ((Untyped.RWCtx m s)) => (JoinKeyPart (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_JoinKeyPart'joinId :: ((Untyped.RWCtx m s)) => (JoinKeyPart (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_JoinKeyPart'joinId (JoinKeyPart'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
 get_JoinKeyPart'partCount :: ((Untyped.ReadCtx m msg)) => (JoinKeyPart msg) -> (m Std_.Word16)
 get_JoinKeyPart'partCount (JoinKeyPart'newtype_ struct) = (GenHelpers.getWordField struct 0 32 0)
-set_JoinKeyPart'partCount :: ((Untyped.RWCtx m s)) => (JoinKeyPart (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_JoinKeyPart'partCount :: ((Untyped.RWCtx m s)) => (JoinKeyPart (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_JoinKeyPart'partCount (JoinKeyPart'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 32 0)
 get_JoinKeyPart'partNum :: ((Untyped.ReadCtx m msg)) => (JoinKeyPart msg) -> (m Std_.Word16)
 get_JoinKeyPart'partNum (JoinKeyPart'newtype_ struct) = (GenHelpers.getWordField struct 0 48 0)
-set_JoinKeyPart'partNum :: ((Untyped.RWCtx m s)) => (JoinKeyPart (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_JoinKeyPart'partNum :: ((Untyped.RWCtx m s)) => (JoinKeyPart (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_JoinKeyPart'partNum (JoinKeyPart'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 48 0)
 newtype JoinResult msg
     = JoinResult'newtype_ (Untyped.Struct msg)
@@ -230,20 +227,19 @@
     fromStruct struct = (Std_.pure (JoinResult'newtype_ struct))
 instance (Classes.ToStruct msg (JoinResult msg)) where
     toStruct (JoinResult'newtype_ struct) = struct
-instance (Untyped.HasMessage (JoinResult msg)) where
-    type InMessage (JoinResult msg) = msg
+instance (Untyped.HasMessage (JoinResult mut) mut) where
     message (JoinResult'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (JoinResult msg)) where
+instance (Untyped.MessageDefault (JoinResult mut) mut) where
     messageDefault msg = (JoinResult'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (JoinResult msg)) where
     fromPtr msg ptr = (JoinResult'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (JoinResult (Message.MutMsg s))) where
+instance (Classes.ToPtr s (JoinResult (Message.Mut s))) where
     toPtr msg (JoinResult'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (JoinResult (Message.MutMsg s))) where
+instance (Classes.Allocate s (JoinResult (Message.Mut s))) where
     new msg = (JoinResult'newtype_ <$> (Untyped.allocStruct msg 1 1))
-instance (Basics.ListElem msg (JoinResult msg)) where
-    newtype List msg (JoinResult msg)
-        = JoinResult'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (JoinResult mut)) where
+    newtype List mut (JoinResult mut)
+        = JoinResult'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (JoinResult'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (JoinResult'List_ l) = (Untyped.ListStruct l)
     length (JoinResult'List_ l) = (Untyped.length l)
@@ -251,16 +247,16 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (JoinResult (Message.MutMsg s))) where
+instance (Basics.MutListElem s (JoinResult (Message.Mut s))) where
     setIndex (JoinResult'newtype_ elt) i (JoinResult'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (JoinResult'List_ <$> (Untyped.allocCompositeList msg 1 1 len))
 get_JoinResult'joinId :: ((Untyped.ReadCtx m msg)) => (JoinResult msg) -> (m Std_.Word32)
 get_JoinResult'joinId (JoinResult'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_JoinResult'joinId :: ((Untyped.RWCtx m s)) => (JoinResult (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_JoinResult'joinId :: ((Untyped.RWCtx m s)) => (JoinResult (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_JoinResult'joinId (JoinResult'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
 get_JoinResult'succeeded :: ((Untyped.ReadCtx m msg)) => (JoinResult msg) -> (m Std_.Bool)
 get_JoinResult'succeeded (JoinResult'newtype_ struct) = (GenHelpers.getWordField struct 0 32 0)
-set_JoinResult'succeeded :: ((Untyped.RWCtx m s)) => (JoinResult (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_JoinResult'succeeded :: ((Untyped.RWCtx m s)) => (JoinResult (Message.Mut s)) -> Std_.Bool -> (m ())
 set_JoinResult'succeeded (JoinResult'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 0 32 0)
 get_JoinResult'cap :: ((Untyped.ReadCtx m msg)
                       ,(Classes.FromPtr msg (Std_.Maybe (Untyped.Ptr msg)))) => (JoinResult msg) -> (m (Std_.Maybe (Untyped.Ptr msg)))
@@ -269,7 +265,7 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_JoinResult'cap :: ((Untyped.RWCtx m s)
-                      ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))))) => (JoinResult (Message.MutMsg s)) -> (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))) -> (m ())
+                      ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.Mut s))))) => (JoinResult (Message.Mut s)) -> (Std_.Maybe (Untyped.Ptr (Message.Mut s))) -> (m ())
 set_JoinResult'cap (JoinResult'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
diff --git a/gen/lib/Capnp/Gen/Capnp/RpcTwoparty/Pure.hs b/gen/lib/Capnp/Gen/Capnp/RpcTwoparty/Pure.hs
--- a/gen/lib/Capnp/Gen/Capnp/RpcTwoparty/Pure.hs
+++ b/gen/lib/Capnp/Gen/Capnp/RpcTwoparty/Pure.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds #-}
 {-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE DuplicateRecordFields #-}
 {-# LANGUAGE FlexibleContexts #-}
@@ -11,6 +12,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.Capnp.RpcTwoparty.Pure(Capnp.Gen.ById.Xa184c7885cdaf2a1.Side(..)
                                        ,VatId(..)
                                        ,ProvisionId(..)
@@ -43,7 +45,7 @@
             ,Generics.Generic)
 instance (Default.Default (VatId)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (VatId)) where
+instance (Classes.FromStruct Message.Const (VatId)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (VatId)) where
     type Cerial msg (VatId) = (Capnp.Gen.ById.Xa184c7885cdaf2a1.VatId msg)
@@ -78,7 +80,7 @@
             ,Generics.Generic)
 instance (Default.Default (ProvisionId)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (ProvisionId)) where
+instance (Classes.FromStruct Message.Const (ProvisionId)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (ProvisionId)) where
     type Cerial msg (ProvisionId) = (Capnp.Gen.ById.Xa184c7885cdaf2a1.ProvisionId msg)
@@ -113,7 +115,7 @@
             ,Generics.Generic)
 instance (Default.Default (RecipientId)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (RecipientId)) where
+instance (Classes.FromStruct Message.Const (RecipientId)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (RecipientId)) where
     type Cerial msg (RecipientId) = (Capnp.Gen.ById.Xa184c7885cdaf2a1.RecipientId msg)
@@ -147,7 +149,7 @@
             ,Generics.Generic)
 instance (Default.Default (ThirdPartyCapId)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (ThirdPartyCapId)) where
+instance (Classes.FromStruct Message.Const (ThirdPartyCapId)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (ThirdPartyCapId)) where
     type Cerial msg (ThirdPartyCapId) = (Capnp.Gen.ById.Xa184c7885cdaf2a1.ThirdPartyCapId msg)
@@ -183,7 +185,7 @@
             ,Generics.Generic)
 instance (Default.Default (JoinKeyPart)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (JoinKeyPart)) where
+instance (Classes.FromStruct Message.Const (JoinKeyPart)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (JoinKeyPart)) where
     type Cerial msg (JoinKeyPart) = (Capnp.Gen.ById.Xa184c7885cdaf2a1.JoinKeyPart msg)
@@ -224,7 +226,7 @@
             ,Generics.Generic)
 instance (Default.Default (JoinResult)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (JoinResult)) where
+instance (Classes.FromStruct Message.Const (JoinResult)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (JoinResult)) where
     type Cerial msg (JoinResult) = (Capnp.Gen.ById.Xa184c7885cdaf2a1.JoinResult msg)
diff --git a/gen/lib/Capnp/Gen/Capnp/Schema.hs b/gen/lib/Capnp/Gen/Capnp/Schema.hs
--- a/gen/lib/Capnp/Gen/Capnp/Schema.hs
+++ b/gen/lib/Capnp/Gen/Capnp/Schema.hs
@@ -3,11 +3,13 @@
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE DataKinds #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# OPTIONS_GHC -Wno-unused-imports #-}
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.Capnp.Schema where
 import qualified Capnp.Message as Message
 import qualified Capnp.Untyped as Untyped
@@ -28,20 +30,19 @@
     fromStruct struct = (Std_.pure (Node'newtype_ struct))
 instance (Classes.ToStruct msg (Node msg)) where
     toStruct (Node'newtype_ struct) = struct
-instance (Untyped.HasMessage (Node msg)) where
-    type InMessage (Node msg) = msg
+instance (Untyped.HasMessage (Node mut) mut) where
     message (Node'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Node msg)) where
+instance (Untyped.MessageDefault (Node mut) mut) where
     messageDefault msg = (Node'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Node msg)) where
     fromPtr msg ptr = (Node'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Node (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Node (Message.Mut s))) where
     toPtr msg (Node'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Node (Message.MutMsg s))) where
+instance (Classes.Allocate s (Node (Message.Mut s))) where
     new msg = (Node'newtype_ <$> (Untyped.allocStruct msg 5 6))
-instance (Basics.ListElem msg (Node msg)) where
-    newtype List msg (Node msg)
-        = Node'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Node mut)) where
+    newtype List mut (Node mut)
+        = Node'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Node'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Node'List_ l) = (Untyped.ListStruct l)
     length (Node'List_ l) = (Untyped.length l)
@@ -49,12 +50,12 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Node (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Node (Message.Mut s))) where
     setIndex (Node'newtype_ elt) i (Node'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Node'List_ <$> (Untyped.allocCompositeList msg 5 6 len))
 get_Node'id :: ((Untyped.ReadCtx m msg)) => (Node msg) -> (m Std_.Word64)
 get_Node'id (Node'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Node'id :: ((Untyped.RWCtx m s)) => (Node (Message.MutMsg s)) -> Std_.Word64 -> (m ())
+set_Node'id :: ((Untyped.RWCtx m s)) => (Node (Message.Mut s)) -> Std_.Word64 -> (m ())
 set_Node'id (Node'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 0 0 0)
 get_Node'displayName :: ((Untyped.ReadCtx m msg)
                         ,(Classes.FromPtr msg (Basics.Text msg))) => (Node msg) -> (m (Basics.Text msg))
@@ -63,14 +64,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Node'displayName :: ((Untyped.RWCtx m s)
-                        ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (Node (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
+                        ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Node (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
 set_Node'displayName (Node'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Node'displayName :: ((Untyped.ReadCtx m msg)) => (Node msg) -> (m Std_.Bool)
 has_Node'displayName (Node'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Node'displayName :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
+new_Node'displayName :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
 new_Node'displayName len struct = (do
     result <- (Basics.newText (Untyped.message struct) len)
     (set_Node'displayName struct result)
@@ -78,11 +79,11 @@
     )
 get_Node'displayNamePrefixLength :: ((Untyped.ReadCtx m msg)) => (Node msg) -> (m Std_.Word32)
 get_Node'displayNamePrefixLength (Node'newtype_ struct) = (GenHelpers.getWordField struct 1 0 0)
-set_Node'displayNamePrefixLength :: ((Untyped.RWCtx m s)) => (Node (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_Node'displayNamePrefixLength :: ((Untyped.RWCtx m s)) => (Node (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_Node'displayNamePrefixLength (Node'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 1 0 0)
 get_Node'scopeId :: ((Untyped.ReadCtx m msg)) => (Node msg) -> (m Std_.Word64)
 get_Node'scopeId (Node'newtype_ struct) = (GenHelpers.getWordField struct 2 0 0)
-set_Node'scopeId :: ((Untyped.RWCtx m s)) => (Node (Message.MutMsg s)) -> Std_.Word64 -> (m ())
+set_Node'scopeId :: ((Untyped.RWCtx m s)) => (Node (Message.Mut s)) -> Std_.Word64 -> (m ())
 set_Node'scopeId (Node'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 2 0 0)
 get_Node'nestedNodes :: ((Untyped.ReadCtx m msg)
                         ,(Classes.FromPtr msg (Basics.List msg (Node'NestedNode msg)))) => (Node msg) -> (m (Basics.List msg (Node'NestedNode msg)))
@@ -91,14 +92,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Node'nestedNodes :: ((Untyped.RWCtx m s)
-                        ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Node'NestedNode (Message.MutMsg s))))) => (Node (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Node'NestedNode (Message.MutMsg s))) -> (m ())
+                        ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Node'NestedNode (Message.Mut s))))) => (Node (Message.Mut s)) -> (Basics.List (Message.Mut s) (Node'NestedNode (Message.Mut s))) -> (m ())
 set_Node'nestedNodes (Node'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 1 struct)
     )
 has_Node'nestedNodes :: ((Untyped.ReadCtx m msg)) => (Node msg) -> (m Std_.Bool)
 has_Node'nestedNodes (Node'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_Node'nestedNodes :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Node'NestedNode (Message.MutMsg s))))
+new_Node'nestedNodes :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Node'NestedNode (Message.Mut s))))
 new_Node'nestedNodes len struct = (do
     result <- (Classes.newList (Untyped.message struct) len)
     (set_Node'nestedNodes struct result)
@@ -111,14 +112,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Node'annotations :: ((Untyped.RWCtx m s)
-                        ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Annotation (Message.MutMsg s))))) => (Node (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Annotation (Message.MutMsg s))) -> (m ())
+                        ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Annotation (Message.Mut s))))) => (Node (Message.Mut s)) -> (Basics.List (Message.Mut s) (Annotation (Message.Mut s))) -> (m ())
 set_Node'annotations (Node'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 2 struct)
     )
 has_Node'annotations :: ((Untyped.ReadCtx m msg)) => (Node msg) -> (m Std_.Bool)
 has_Node'annotations (Node'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 2 struct))
-new_Node'annotations :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Annotation (Message.MutMsg s))))
+new_Node'annotations :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Annotation (Message.Mut s))))
 new_Node'annotations len struct = (do
     result <- (Classes.newList (Untyped.message struct) len)
     (set_Node'annotations struct result)
@@ -131,14 +132,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Node'parameters :: ((Untyped.RWCtx m s)
-                       ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Node'Parameter (Message.MutMsg s))))) => (Node (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Node'Parameter (Message.MutMsg s))) -> (m ())
+                       ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Node'Parameter (Message.Mut s))))) => (Node (Message.Mut s)) -> (Basics.List (Message.Mut s) (Node'Parameter (Message.Mut s))) -> (m ())
 set_Node'parameters (Node'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 5 struct)
     )
 has_Node'parameters :: ((Untyped.ReadCtx m msg)) => (Node msg) -> (m Std_.Bool)
 has_Node'parameters (Node'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 5 struct))
-new_Node'parameters :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Node'Parameter (Message.MutMsg s))))
+new_Node'parameters :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Node'Parameter (Message.Mut s))))
 new_Node'parameters len struct = (do
     result <- (Classes.newList (Untyped.message struct) len)
     (set_Node'parameters struct result)
@@ -146,17 +147,17 @@
     )
 get_Node'isGeneric :: ((Untyped.ReadCtx m msg)) => (Node msg) -> (m Std_.Bool)
 get_Node'isGeneric (Node'newtype_ struct) = (GenHelpers.getWordField struct 4 32 0)
-set_Node'isGeneric :: ((Untyped.RWCtx m s)) => (Node (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_Node'isGeneric :: ((Untyped.RWCtx m s)) => (Node (Message.Mut s)) -> Std_.Bool -> (m ())
 set_Node'isGeneric (Node'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 4 32 0)
-data Node' msg
+data Node' (mut :: Message.Mutability)
     = Node'file 
-    | Node'struct (Node'struct msg)
-    | Node'enum (Node'enum msg)
-    | Node'interface (Node'interface msg)
-    | Node'const (Node'const msg)
-    | Node'annotation (Node'annotation msg)
+    | Node'struct (Node'struct mut)
+    | Node'enum (Node'enum mut)
+    | Node'interface (Node'interface mut)
+    | Node'const (Node'const mut)
+    | Node'annotation (Node'annotation mut)
     | Node'unknown' Std_.Word16
-instance (Classes.FromStruct msg (Node' msg)) where
+instance (Classes.FromStruct mut (Node' mut)) where
     fromStruct struct = (do
         tag <- (GenHelpers.getTag struct 6)
         case tag of
@@ -178,42 +179,42 @@
 get_Node' :: ((Untyped.ReadCtx m msg)
              ,(Classes.FromStruct msg (Node' msg))) => (Node msg) -> (m (Node' msg))
 get_Node' (Node'newtype_ struct) = (Classes.fromStruct struct)
-set_Node'file :: ((Untyped.RWCtx m s)) => (Node (Message.MutMsg s)) -> (m ())
+set_Node'file :: ((Untyped.RWCtx m s)) => (Node (Message.Mut s)) -> (m ())
 set_Node'file (Node'newtype_ struct) = (do
     (GenHelpers.setWordField struct (0 :: Std_.Word16) 1 32 0)
     (Std_.pure ())
     )
 set_Node'struct :: ((Untyped.RWCtx m s)
-                   ,(Classes.FromStruct (Message.MutMsg s) (Node'struct (Message.MutMsg s)))) => (Node (Message.MutMsg s)) -> (m (Node'struct (Message.MutMsg s)))
+                   ,(Classes.FromStruct (Message.Mut s) (Node'struct (Message.Mut s)))) => (Node (Message.Mut s)) -> (m (Node'struct (Message.Mut s)))
 set_Node'struct (Node'newtype_ struct) = (do
     (GenHelpers.setWordField struct (1 :: Std_.Word16) 1 32 0)
     (Classes.fromStruct struct)
     )
 set_Node'enum :: ((Untyped.RWCtx m s)
-                 ,(Classes.FromStruct (Message.MutMsg s) (Node'enum (Message.MutMsg s)))) => (Node (Message.MutMsg s)) -> (m (Node'enum (Message.MutMsg s)))
+                 ,(Classes.FromStruct (Message.Mut s) (Node'enum (Message.Mut s)))) => (Node (Message.Mut s)) -> (m (Node'enum (Message.Mut s)))
 set_Node'enum (Node'newtype_ struct) = (do
     (GenHelpers.setWordField struct (2 :: Std_.Word16) 1 32 0)
     (Classes.fromStruct struct)
     )
 set_Node'interface :: ((Untyped.RWCtx m s)
-                      ,(Classes.FromStruct (Message.MutMsg s) (Node'interface (Message.MutMsg s)))) => (Node (Message.MutMsg s)) -> (m (Node'interface (Message.MutMsg s)))
+                      ,(Classes.FromStruct (Message.Mut s) (Node'interface (Message.Mut s)))) => (Node (Message.Mut s)) -> (m (Node'interface (Message.Mut s)))
 set_Node'interface (Node'newtype_ struct) = (do
     (GenHelpers.setWordField struct (3 :: Std_.Word16) 1 32 0)
     (Classes.fromStruct struct)
     )
 set_Node'const :: ((Untyped.RWCtx m s)
-                  ,(Classes.FromStruct (Message.MutMsg s) (Node'const (Message.MutMsg s)))) => (Node (Message.MutMsg s)) -> (m (Node'const (Message.MutMsg s)))
+                  ,(Classes.FromStruct (Message.Mut s) (Node'const (Message.Mut s)))) => (Node (Message.Mut s)) -> (m (Node'const (Message.Mut s)))
 set_Node'const (Node'newtype_ struct) = (do
     (GenHelpers.setWordField struct (4 :: Std_.Word16) 1 32 0)
     (Classes.fromStruct struct)
     )
 set_Node'annotation :: ((Untyped.RWCtx m s)
-                       ,(Classes.FromStruct (Message.MutMsg s) (Node'annotation (Message.MutMsg s)))) => (Node (Message.MutMsg s)) -> (m (Node'annotation (Message.MutMsg s)))
+                       ,(Classes.FromStruct (Message.Mut s) (Node'annotation (Message.Mut s)))) => (Node (Message.Mut s)) -> (m (Node'annotation (Message.Mut s)))
 set_Node'annotation (Node'newtype_ struct) = (do
     (GenHelpers.setWordField struct (5 :: Std_.Word16) 1 32 0)
     (Classes.fromStruct struct)
     )
-set_Node'unknown' :: ((Untyped.RWCtx m s)) => (Node (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Node'unknown' :: ((Untyped.RWCtx m s)) => (Node (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Node'unknown' (Node'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 1 32 0)
 newtype Node'struct msg
     = Node'struct'newtype_ (Untyped.Struct msg)
@@ -221,34 +222,33 @@
     fromStruct struct = (Std_.pure (Node'struct'newtype_ struct))
 instance (Classes.ToStruct msg (Node'struct msg)) where
     toStruct (Node'struct'newtype_ struct) = struct
-instance (Untyped.HasMessage (Node'struct msg)) where
-    type InMessage (Node'struct msg) = msg
+instance (Untyped.HasMessage (Node'struct mut) mut) where
     message (Node'struct'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Node'struct msg)) where
+instance (Untyped.MessageDefault (Node'struct mut) mut) where
     messageDefault msg = (Node'struct'newtype_ <$> (Untyped.messageDefault msg))
 get_Node'struct'dataWordCount :: ((Untyped.ReadCtx m msg)) => (Node'struct msg) -> (m Std_.Word16)
 get_Node'struct'dataWordCount (Node'struct'newtype_ struct) = (GenHelpers.getWordField struct 1 48 0)
-set_Node'struct'dataWordCount :: ((Untyped.RWCtx m s)) => (Node'struct (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Node'struct'dataWordCount :: ((Untyped.RWCtx m s)) => (Node'struct (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Node'struct'dataWordCount (Node'struct'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 1 48 0)
 get_Node'struct'pointerCount :: ((Untyped.ReadCtx m msg)) => (Node'struct msg) -> (m Std_.Word16)
 get_Node'struct'pointerCount (Node'struct'newtype_ struct) = (GenHelpers.getWordField struct 3 0 0)
-set_Node'struct'pointerCount :: ((Untyped.RWCtx m s)) => (Node'struct (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Node'struct'pointerCount :: ((Untyped.RWCtx m s)) => (Node'struct (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Node'struct'pointerCount (Node'struct'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 3 0 0)
 get_Node'struct'preferredListEncoding :: ((Untyped.ReadCtx m msg)) => (Node'struct msg) -> (m ElementSize)
 get_Node'struct'preferredListEncoding (Node'struct'newtype_ struct) = (GenHelpers.getWordField struct 3 16 0)
-set_Node'struct'preferredListEncoding :: ((Untyped.RWCtx m s)) => (Node'struct (Message.MutMsg s)) -> ElementSize -> (m ())
+set_Node'struct'preferredListEncoding :: ((Untyped.RWCtx m s)) => (Node'struct (Message.Mut s)) -> ElementSize -> (m ())
 set_Node'struct'preferredListEncoding (Node'struct'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 3 16 0)
 get_Node'struct'isGroup :: ((Untyped.ReadCtx m msg)) => (Node'struct msg) -> (m Std_.Bool)
 get_Node'struct'isGroup (Node'struct'newtype_ struct) = (GenHelpers.getWordField struct 3 32 0)
-set_Node'struct'isGroup :: ((Untyped.RWCtx m s)) => (Node'struct (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_Node'struct'isGroup :: ((Untyped.RWCtx m s)) => (Node'struct (Message.Mut s)) -> Std_.Bool -> (m ())
 set_Node'struct'isGroup (Node'struct'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 3 32 0)
 get_Node'struct'discriminantCount :: ((Untyped.ReadCtx m msg)) => (Node'struct msg) -> (m Std_.Word16)
 get_Node'struct'discriminantCount (Node'struct'newtype_ struct) = (GenHelpers.getWordField struct 3 48 0)
-set_Node'struct'discriminantCount :: ((Untyped.RWCtx m s)) => (Node'struct (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Node'struct'discriminantCount :: ((Untyped.RWCtx m s)) => (Node'struct (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Node'struct'discriminantCount (Node'struct'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 3 48 0)
 get_Node'struct'discriminantOffset :: ((Untyped.ReadCtx m msg)) => (Node'struct msg) -> (m Std_.Word32)
 get_Node'struct'discriminantOffset (Node'struct'newtype_ struct) = (GenHelpers.getWordField struct 4 0 0)
-set_Node'struct'discriminantOffset :: ((Untyped.RWCtx m s)) => (Node'struct (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_Node'struct'discriminantOffset :: ((Untyped.RWCtx m s)) => (Node'struct (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_Node'struct'discriminantOffset (Node'struct'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 4 0 0)
 get_Node'struct'fields :: ((Untyped.ReadCtx m msg)
                           ,(Classes.FromPtr msg (Basics.List msg (Field msg)))) => (Node'struct msg) -> (m (Basics.List msg (Field msg)))
@@ -257,14 +257,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Node'struct'fields :: ((Untyped.RWCtx m s)
-                          ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Field (Message.MutMsg s))))) => (Node'struct (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Field (Message.MutMsg s))) -> (m ())
+                          ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Field (Message.Mut s))))) => (Node'struct (Message.Mut s)) -> (Basics.List (Message.Mut s) (Field (Message.Mut s))) -> (m ())
 set_Node'struct'fields (Node'struct'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 3 struct)
     )
 has_Node'struct'fields :: ((Untyped.ReadCtx m msg)) => (Node'struct msg) -> (m Std_.Bool)
 has_Node'struct'fields (Node'struct'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 3 struct))
-new_Node'struct'fields :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'struct (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Field (Message.MutMsg s))))
+new_Node'struct'fields :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'struct (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Field (Message.Mut s))))
 new_Node'struct'fields len struct = (do
     result <- (Classes.newList (Untyped.message struct) len)
     (set_Node'struct'fields struct result)
@@ -276,10 +276,9 @@
     fromStruct struct = (Std_.pure (Node'enum'newtype_ struct))
 instance (Classes.ToStruct msg (Node'enum msg)) where
     toStruct (Node'enum'newtype_ struct) = struct
-instance (Untyped.HasMessage (Node'enum msg)) where
-    type InMessage (Node'enum msg) = msg
+instance (Untyped.HasMessage (Node'enum mut) mut) where
     message (Node'enum'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Node'enum msg)) where
+instance (Untyped.MessageDefault (Node'enum mut) mut) where
     messageDefault msg = (Node'enum'newtype_ <$> (Untyped.messageDefault msg))
 get_Node'enum'enumerants :: ((Untyped.ReadCtx m msg)
                             ,(Classes.FromPtr msg (Basics.List msg (Enumerant msg)))) => (Node'enum msg) -> (m (Basics.List msg (Enumerant msg)))
@@ -288,14 +287,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Node'enum'enumerants :: ((Untyped.RWCtx m s)
-                            ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Enumerant (Message.MutMsg s))))) => (Node'enum (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Enumerant (Message.MutMsg s))) -> (m ())
+                            ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Enumerant (Message.Mut s))))) => (Node'enum (Message.Mut s)) -> (Basics.List (Message.Mut s) (Enumerant (Message.Mut s))) -> (m ())
 set_Node'enum'enumerants (Node'enum'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 3 struct)
     )
 has_Node'enum'enumerants :: ((Untyped.ReadCtx m msg)) => (Node'enum msg) -> (m Std_.Bool)
 has_Node'enum'enumerants (Node'enum'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 3 struct))
-new_Node'enum'enumerants :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'enum (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Enumerant (Message.MutMsg s))))
+new_Node'enum'enumerants :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'enum (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Enumerant (Message.Mut s))))
 new_Node'enum'enumerants len struct = (do
     result <- (Classes.newList (Untyped.message struct) len)
     (set_Node'enum'enumerants struct result)
@@ -307,10 +306,9 @@
     fromStruct struct = (Std_.pure (Node'interface'newtype_ struct))
 instance (Classes.ToStruct msg (Node'interface msg)) where
     toStruct (Node'interface'newtype_ struct) = struct
-instance (Untyped.HasMessage (Node'interface msg)) where
-    type InMessage (Node'interface msg) = msg
+instance (Untyped.HasMessage (Node'interface mut) mut) where
     message (Node'interface'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Node'interface msg)) where
+instance (Untyped.MessageDefault (Node'interface mut) mut) where
     messageDefault msg = (Node'interface'newtype_ <$> (Untyped.messageDefault msg))
 get_Node'interface'methods :: ((Untyped.ReadCtx m msg)
                               ,(Classes.FromPtr msg (Basics.List msg (Method msg)))) => (Node'interface msg) -> (m (Basics.List msg (Method msg)))
@@ -319,14 +317,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Node'interface'methods :: ((Untyped.RWCtx m s)
-                              ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Method (Message.MutMsg s))))) => (Node'interface (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Method (Message.MutMsg s))) -> (m ())
+                              ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Method (Message.Mut s))))) => (Node'interface (Message.Mut s)) -> (Basics.List (Message.Mut s) (Method (Message.Mut s))) -> (m ())
 set_Node'interface'methods (Node'interface'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 3 struct)
     )
 has_Node'interface'methods :: ((Untyped.ReadCtx m msg)) => (Node'interface msg) -> (m Std_.Bool)
 has_Node'interface'methods (Node'interface'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 3 struct))
-new_Node'interface'methods :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'interface (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Method (Message.MutMsg s))))
+new_Node'interface'methods :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'interface (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Method (Message.Mut s))))
 new_Node'interface'methods len struct = (do
     result <- (Classes.newList (Untyped.message struct) len)
     (set_Node'interface'methods struct result)
@@ -339,14 +337,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Node'interface'superclasses :: ((Untyped.RWCtx m s)
-                                   ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Superclass (Message.MutMsg s))))) => (Node'interface (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Superclass (Message.MutMsg s))) -> (m ())
+                                   ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Superclass (Message.Mut s))))) => (Node'interface (Message.Mut s)) -> (Basics.List (Message.Mut s) (Superclass (Message.Mut s))) -> (m ())
 set_Node'interface'superclasses (Node'interface'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 4 struct)
     )
 has_Node'interface'superclasses :: ((Untyped.ReadCtx m msg)) => (Node'interface msg) -> (m Std_.Bool)
 has_Node'interface'superclasses (Node'interface'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 4 struct))
-new_Node'interface'superclasses :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'interface (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Superclass (Message.MutMsg s))))
+new_Node'interface'superclasses :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'interface (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Superclass (Message.Mut s))))
 new_Node'interface'superclasses len struct = (do
     result <- (Classes.newList (Untyped.message struct) len)
     (set_Node'interface'superclasses struct result)
@@ -358,10 +356,9 @@
     fromStruct struct = (Std_.pure (Node'const'newtype_ struct))
 instance (Classes.ToStruct msg (Node'const msg)) where
     toStruct (Node'const'newtype_ struct) = struct
-instance (Untyped.HasMessage (Node'const msg)) where
-    type InMessage (Node'const msg) = msg
+instance (Untyped.HasMessage (Node'const mut) mut) where
     message (Node'const'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Node'const msg)) where
+instance (Untyped.MessageDefault (Node'const mut) mut) where
     messageDefault msg = (Node'const'newtype_ <$> (Untyped.messageDefault msg))
 get_Node'const'type_ :: ((Untyped.ReadCtx m msg)
                         ,(Classes.FromPtr msg (Type msg))) => (Node'const msg) -> (m (Type msg))
@@ -370,14 +367,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Node'const'type_ :: ((Untyped.RWCtx m s)
-                        ,(Classes.ToPtr s (Type (Message.MutMsg s)))) => (Node'const (Message.MutMsg s)) -> (Type (Message.MutMsg s)) -> (m ())
+                        ,(Classes.ToPtr s (Type (Message.Mut s)))) => (Node'const (Message.Mut s)) -> (Type (Message.Mut s)) -> (m ())
 set_Node'const'type_ (Node'const'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 3 struct)
     )
 has_Node'const'type_ :: ((Untyped.ReadCtx m msg)) => (Node'const msg) -> (m Std_.Bool)
 has_Node'const'type_ (Node'const'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 3 struct))
-new_Node'const'type_ :: ((Untyped.RWCtx m s)) => (Node'const (Message.MutMsg s)) -> (m (Type (Message.MutMsg s)))
+new_Node'const'type_ :: ((Untyped.RWCtx m s)) => (Node'const (Message.Mut s)) -> (m (Type (Message.Mut s)))
 new_Node'const'type_ struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Node'const'type_ struct result)
@@ -390,14 +387,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Node'const'value :: ((Untyped.RWCtx m s)
-                        ,(Classes.ToPtr s (Value (Message.MutMsg s)))) => (Node'const (Message.MutMsg s)) -> (Value (Message.MutMsg s)) -> (m ())
+                        ,(Classes.ToPtr s (Value (Message.Mut s)))) => (Node'const (Message.Mut s)) -> (Value (Message.Mut s)) -> (m ())
 set_Node'const'value (Node'const'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 4 struct)
     )
 has_Node'const'value :: ((Untyped.ReadCtx m msg)) => (Node'const msg) -> (m Std_.Bool)
 has_Node'const'value (Node'const'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 4 struct))
-new_Node'const'value :: ((Untyped.RWCtx m s)) => (Node'const (Message.MutMsg s)) -> (m (Value (Message.MutMsg s)))
+new_Node'const'value :: ((Untyped.RWCtx m s)) => (Node'const (Message.Mut s)) -> (m (Value (Message.Mut s)))
 new_Node'const'value struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Node'const'value struct result)
@@ -409,10 +406,9 @@
     fromStruct struct = (Std_.pure (Node'annotation'newtype_ struct))
 instance (Classes.ToStruct msg (Node'annotation msg)) where
     toStruct (Node'annotation'newtype_ struct) = struct
-instance (Untyped.HasMessage (Node'annotation msg)) where
-    type InMessage (Node'annotation msg) = msg
+instance (Untyped.HasMessage (Node'annotation mut) mut) where
     message (Node'annotation'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Node'annotation msg)) where
+instance (Untyped.MessageDefault (Node'annotation mut) mut) where
     messageDefault msg = (Node'annotation'newtype_ <$> (Untyped.messageDefault msg))
 get_Node'annotation'type_ :: ((Untyped.ReadCtx m msg)
                              ,(Classes.FromPtr msg (Type msg))) => (Node'annotation msg) -> (m (Type msg))
@@ -421,14 +417,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Node'annotation'type_ :: ((Untyped.RWCtx m s)
-                             ,(Classes.ToPtr s (Type (Message.MutMsg s)))) => (Node'annotation (Message.MutMsg s)) -> (Type (Message.MutMsg s)) -> (m ())
+                             ,(Classes.ToPtr s (Type (Message.Mut s)))) => (Node'annotation (Message.Mut s)) -> (Type (Message.Mut s)) -> (m ())
 set_Node'annotation'type_ (Node'annotation'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 3 struct)
     )
 has_Node'annotation'type_ :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
 has_Node'annotation'type_ (Node'annotation'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 3 struct))
-new_Node'annotation'type_ :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.MutMsg s)) -> (m (Type (Message.MutMsg s)))
+new_Node'annotation'type_ :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> (m (Type (Message.Mut s)))
 new_Node'annotation'type_ struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Node'annotation'type_ struct result)
@@ -436,51 +432,51 @@
     )
 get_Node'annotation'targetsFile :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
 get_Node'annotation'targetsFile (Node'annotation'newtype_ struct) = (GenHelpers.getWordField struct 1 48 0)
-set_Node'annotation'targetsFile :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_Node'annotation'targetsFile :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
 set_Node'annotation'targetsFile (Node'annotation'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 1 48 0)
 get_Node'annotation'targetsConst :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
 get_Node'annotation'targetsConst (Node'annotation'newtype_ struct) = (GenHelpers.getWordField struct 1 49 0)
-set_Node'annotation'targetsConst :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_Node'annotation'targetsConst :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
 set_Node'annotation'targetsConst (Node'annotation'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 1 49 0)
 get_Node'annotation'targetsEnum :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
 get_Node'annotation'targetsEnum (Node'annotation'newtype_ struct) = (GenHelpers.getWordField struct 1 50 0)
-set_Node'annotation'targetsEnum :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_Node'annotation'targetsEnum :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
 set_Node'annotation'targetsEnum (Node'annotation'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 1 50 0)
 get_Node'annotation'targetsEnumerant :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
 get_Node'annotation'targetsEnumerant (Node'annotation'newtype_ struct) = (GenHelpers.getWordField struct 1 51 0)
-set_Node'annotation'targetsEnumerant :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_Node'annotation'targetsEnumerant :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
 set_Node'annotation'targetsEnumerant (Node'annotation'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 1 51 0)
 get_Node'annotation'targetsStruct :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
 get_Node'annotation'targetsStruct (Node'annotation'newtype_ struct) = (GenHelpers.getWordField struct 1 52 0)
-set_Node'annotation'targetsStruct :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_Node'annotation'targetsStruct :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
 set_Node'annotation'targetsStruct (Node'annotation'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 1 52 0)
 get_Node'annotation'targetsField :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
 get_Node'annotation'targetsField (Node'annotation'newtype_ struct) = (GenHelpers.getWordField struct 1 53 0)
-set_Node'annotation'targetsField :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_Node'annotation'targetsField :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
 set_Node'annotation'targetsField (Node'annotation'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 1 53 0)
 get_Node'annotation'targetsUnion :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
 get_Node'annotation'targetsUnion (Node'annotation'newtype_ struct) = (GenHelpers.getWordField struct 1 54 0)
-set_Node'annotation'targetsUnion :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_Node'annotation'targetsUnion :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
 set_Node'annotation'targetsUnion (Node'annotation'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 1 54 0)
 get_Node'annotation'targetsGroup :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
 get_Node'annotation'targetsGroup (Node'annotation'newtype_ struct) = (GenHelpers.getWordField struct 1 55 0)
-set_Node'annotation'targetsGroup :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_Node'annotation'targetsGroup :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
 set_Node'annotation'targetsGroup (Node'annotation'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 1 55 0)
 get_Node'annotation'targetsInterface :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
 get_Node'annotation'targetsInterface (Node'annotation'newtype_ struct) = (GenHelpers.getWordField struct 1 56 0)
-set_Node'annotation'targetsInterface :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_Node'annotation'targetsInterface :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
 set_Node'annotation'targetsInterface (Node'annotation'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 1 56 0)
 get_Node'annotation'targetsMethod :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
 get_Node'annotation'targetsMethod (Node'annotation'newtype_ struct) = (GenHelpers.getWordField struct 1 57 0)
-set_Node'annotation'targetsMethod :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_Node'annotation'targetsMethod :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
 set_Node'annotation'targetsMethod (Node'annotation'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 1 57 0)
 get_Node'annotation'targetsParam :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
 get_Node'annotation'targetsParam (Node'annotation'newtype_ struct) = (GenHelpers.getWordField struct 1 58 0)
-set_Node'annotation'targetsParam :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_Node'annotation'targetsParam :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
 set_Node'annotation'targetsParam (Node'annotation'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 1 58 0)
 get_Node'annotation'targetsAnnotation :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
 get_Node'annotation'targetsAnnotation (Node'annotation'newtype_ struct) = (GenHelpers.getWordField struct 1 59 0)
-set_Node'annotation'targetsAnnotation :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_Node'annotation'targetsAnnotation :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
 set_Node'annotation'targetsAnnotation (Node'annotation'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 1 59 0)
 newtype Node'Parameter msg
     = Node'Parameter'newtype_ (Untyped.Struct msg)
@@ -488,20 +484,19 @@
     fromStruct struct = (Std_.pure (Node'Parameter'newtype_ struct))
 instance (Classes.ToStruct msg (Node'Parameter msg)) where
     toStruct (Node'Parameter'newtype_ struct) = struct
-instance (Untyped.HasMessage (Node'Parameter msg)) where
-    type InMessage (Node'Parameter msg) = msg
+instance (Untyped.HasMessage (Node'Parameter mut) mut) where
     message (Node'Parameter'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Node'Parameter msg)) where
+instance (Untyped.MessageDefault (Node'Parameter mut) mut) where
     messageDefault msg = (Node'Parameter'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Node'Parameter msg)) where
     fromPtr msg ptr = (Node'Parameter'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Node'Parameter (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Node'Parameter (Message.Mut s))) where
     toPtr msg (Node'Parameter'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Node'Parameter (Message.MutMsg s))) where
+instance (Classes.Allocate s (Node'Parameter (Message.Mut s))) where
     new msg = (Node'Parameter'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Node'Parameter msg)) where
-    newtype List msg (Node'Parameter msg)
-        = Node'Parameter'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Node'Parameter mut)) where
+    newtype List mut (Node'Parameter mut)
+        = Node'Parameter'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Node'Parameter'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Node'Parameter'List_ l) = (Untyped.ListStruct l)
     length (Node'Parameter'List_ l) = (Untyped.length l)
@@ -509,7 +504,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Node'Parameter (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Node'Parameter (Message.Mut s))) where
     setIndex (Node'Parameter'newtype_ elt) i (Node'Parameter'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Node'Parameter'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
 get_Node'Parameter'name :: ((Untyped.ReadCtx m msg)
@@ -519,14 +514,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Node'Parameter'name :: ((Untyped.RWCtx m s)
-                           ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (Node'Parameter (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
+                           ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Node'Parameter (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
 set_Node'Parameter'name (Node'Parameter'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Node'Parameter'name :: ((Untyped.ReadCtx m msg)) => (Node'Parameter msg) -> (m Std_.Bool)
 has_Node'Parameter'name (Node'Parameter'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Node'Parameter'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'Parameter (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
+new_Node'Parameter'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'Parameter (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
 new_Node'Parameter'name len struct = (do
     result <- (Basics.newText (Untyped.message struct) len)
     (set_Node'Parameter'name struct result)
@@ -538,20 +533,19 @@
     fromStruct struct = (Std_.pure (Node'NestedNode'newtype_ struct))
 instance (Classes.ToStruct msg (Node'NestedNode msg)) where
     toStruct (Node'NestedNode'newtype_ struct) = struct
-instance (Untyped.HasMessage (Node'NestedNode msg)) where
-    type InMessage (Node'NestedNode msg) = msg
+instance (Untyped.HasMessage (Node'NestedNode mut) mut) where
     message (Node'NestedNode'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Node'NestedNode msg)) where
+instance (Untyped.MessageDefault (Node'NestedNode mut) mut) where
     messageDefault msg = (Node'NestedNode'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Node'NestedNode msg)) where
     fromPtr msg ptr = (Node'NestedNode'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Node'NestedNode (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Node'NestedNode (Message.Mut s))) where
     toPtr msg (Node'NestedNode'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Node'NestedNode (Message.MutMsg s))) where
+instance (Classes.Allocate s (Node'NestedNode (Message.Mut s))) where
     new msg = (Node'NestedNode'newtype_ <$> (Untyped.allocStruct msg 1 1))
-instance (Basics.ListElem msg (Node'NestedNode msg)) where
-    newtype List msg (Node'NestedNode msg)
-        = Node'NestedNode'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Node'NestedNode mut)) where
+    newtype List mut (Node'NestedNode mut)
+        = Node'NestedNode'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Node'NestedNode'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Node'NestedNode'List_ l) = (Untyped.ListStruct l)
     length (Node'NestedNode'List_ l) = (Untyped.length l)
@@ -559,7 +553,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Node'NestedNode (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Node'NestedNode (Message.Mut s))) where
     setIndex (Node'NestedNode'newtype_ elt) i (Node'NestedNode'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Node'NestedNode'List_ <$> (Untyped.allocCompositeList msg 1 1 len))
 get_Node'NestedNode'name :: ((Untyped.ReadCtx m msg)
@@ -569,14 +563,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Node'NestedNode'name :: ((Untyped.RWCtx m s)
-                            ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (Node'NestedNode (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
+                            ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Node'NestedNode (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
 set_Node'NestedNode'name (Node'NestedNode'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Node'NestedNode'name :: ((Untyped.ReadCtx m msg)) => (Node'NestedNode msg) -> (m Std_.Bool)
 has_Node'NestedNode'name (Node'NestedNode'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Node'NestedNode'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'NestedNode (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
+new_Node'NestedNode'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'NestedNode (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
 new_Node'NestedNode'name len struct = (do
     result <- (Basics.newText (Untyped.message struct) len)
     (set_Node'NestedNode'name struct result)
@@ -584,7 +578,7 @@
     )
 get_Node'NestedNode'id :: ((Untyped.ReadCtx m msg)) => (Node'NestedNode msg) -> (m Std_.Word64)
 get_Node'NestedNode'id (Node'NestedNode'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Node'NestedNode'id :: ((Untyped.RWCtx m s)) => (Node'NestedNode (Message.MutMsg s)) -> Std_.Word64 -> (m ())
+set_Node'NestedNode'id :: ((Untyped.RWCtx m s)) => (Node'NestedNode (Message.Mut s)) -> Std_.Word64 -> (m ())
 set_Node'NestedNode'id (Node'NestedNode'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 0 0 0)
 newtype Node'SourceInfo msg
     = Node'SourceInfo'newtype_ (Untyped.Struct msg)
@@ -592,20 +586,19 @@
     fromStruct struct = (Std_.pure (Node'SourceInfo'newtype_ struct))
 instance (Classes.ToStruct msg (Node'SourceInfo msg)) where
     toStruct (Node'SourceInfo'newtype_ struct) = struct
-instance (Untyped.HasMessage (Node'SourceInfo msg)) where
-    type InMessage (Node'SourceInfo msg) = msg
+instance (Untyped.HasMessage (Node'SourceInfo mut) mut) where
     message (Node'SourceInfo'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Node'SourceInfo msg)) where
+instance (Untyped.MessageDefault (Node'SourceInfo mut) mut) where
     messageDefault msg = (Node'SourceInfo'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Node'SourceInfo msg)) where
     fromPtr msg ptr = (Node'SourceInfo'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Node'SourceInfo (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Node'SourceInfo (Message.Mut s))) where
     toPtr msg (Node'SourceInfo'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Node'SourceInfo (Message.MutMsg s))) where
+instance (Classes.Allocate s (Node'SourceInfo (Message.Mut s))) where
     new msg = (Node'SourceInfo'newtype_ <$> (Untyped.allocStruct msg 1 2))
-instance (Basics.ListElem msg (Node'SourceInfo msg)) where
-    newtype List msg (Node'SourceInfo msg)
-        = Node'SourceInfo'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Node'SourceInfo mut)) where
+    newtype List mut (Node'SourceInfo mut)
+        = Node'SourceInfo'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Node'SourceInfo'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Node'SourceInfo'List_ l) = (Untyped.ListStruct l)
     length (Node'SourceInfo'List_ l) = (Untyped.length l)
@@ -613,12 +606,12 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Node'SourceInfo (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Node'SourceInfo (Message.Mut s))) where
     setIndex (Node'SourceInfo'newtype_ elt) i (Node'SourceInfo'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Node'SourceInfo'List_ <$> (Untyped.allocCompositeList msg 1 2 len))
 get_Node'SourceInfo'id :: ((Untyped.ReadCtx m msg)) => (Node'SourceInfo msg) -> (m Std_.Word64)
 get_Node'SourceInfo'id (Node'SourceInfo'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Node'SourceInfo'id :: ((Untyped.RWCtx m s)) => (Node'SourceInfo (Message.MutMsg s)) -> Std_.Word64 -> (m ())
+set_Node'SourceInfo'id :: ((Untyped.RWCtx m s)) => (Node'SourceInfo (Message.Mut s)) -> Std_.Word64 -> (m ())
 set_Node'SourceInfo'id (Node'SourceInfo'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 0 0 0)
 get_Node'SourceInfo'docComment :: ((Untyped.ReadCtx m msg)
                                   ,(Classes.FromPtr msg (Basics.Text msg))) => (Node'SourceInfo msg) -> (m (Basics.Text msg))
@@ -627,14 +620,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Node'SourceInfo'docComment :: ((Untyped.RWCtx m s)
-                                  ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (Node'SourceInfo (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
+                                  ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Node'SourceInfo (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
 set_Node'SourceInfo'docComment (Node'SourceInfo'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Node'SourceInfo'docComment :: ((Untyped.ReadCtx m msg)) => (Node'SourceInfo msg) -> (m Std_.Bool)
 has_Node'SourceInfo'docComment (Node'SourceInfo'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Node'SourceInfo'docComment :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'SourceInfo (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
+new_Node'SourceInfo'docComment :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'SourceInfo (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
 new_Node'SourceInfo'docComment len struct = (do
     result <- (Basics.newText (Untyped.message struct) len)
     (set_Node'SourceInfo'docComment struct result)
@@ -647,14 +640,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Node'SourceInfo'members :: ((Untyped.RWCtx m s)
-                               ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Node'SourceInfo'Member (Message.MutMsg s))))) => (Node'SourceInfo (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Node'SourceInfo'Member (Message.MutMsg s))) -> (m ())
+                               ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Node'SourceInfo'Member (Message.Mut s))))) => (Node'SourceInfo (Message.Mut s)) -> (Basics.List (Message.Mut s) (Node'SourceInfo'Member (Message.Mut s))) -> (m ())
 set_Node'SourceInfo'members (Node'SourceInfo'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 1 struct)
     )
 has_Node'SourceInfo'members :: ((Untyped.ReadCtx m msg)) => (Node'SourceInfo msg) -> (m Std_.Bool)
 has_Node'SourceInfo'members (Node'SourceInfo'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_Node'SourceInfo'members :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'SourceInfo (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Node'SourceInfo'Member (Message.MutMsg s))))
+new_Node'SourceInfo'members :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'SourceInfo (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Node'SourceInfo'Member (Message.Mut s))))
 new_Node'SourceInfo'members len struct = (do
     result <- (Classes.newList (Untyped.message struct) len)
     (set_Node'SourceInfo'members struct result)
@@ -666,20 +659,19 @@
     fromStruct struct = (Std_.pure (Node'SourceInfo'Member'newtype_ struct))
 instance (Classes.ToStruct msg (Node'SourceInfo'Member msg)) where
     toStruct (Node'SourceInfo'Member'newtype_ struct) = struct
-instance (Untyped.HasMessage (Node'SourceInfo'Member msg)) where
-    type InMessage (Node'SourceInfo'Member msg) = msg
+instance (Untyped.HasMessage (Node'SourceInfo'Member mut) mut) where
     message (Node'SourceInfo'Member'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Node'SourceInfo'Member msg)) where
+instance (Untyped.MessageDefault (Node'SourceInfo'Member mut) mut) where
     messageDefault msg = (Node'SourceInfo'Member'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Node'SourceInfo'Member msg)) where
     fromPtr msg ptr = (Node'SourceInfo'Member'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Node'SourceInfo'Member (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Node'SourceInfo'Member (Message.Mut s))) where
     toPtr msg (Node'SourceInfo'Member'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Node'SourceInfo'Member (Message.MutMsg s))) where
+instance (Classes.Allocate s (Node'SourceInfo'Member (Message.Mut s))) where
     new msg = (Node'SourceInfo'Member'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Node'SourceInfo'Member msg)) where
-    newtype List msg (Node'SourceInfo'Member msg)
-        = Node'SourceInfo'Member'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Node'SourceInfo'Member mut)) where
+    newtype List mut (Node'SourceInfo'Member mut)
+        = Node'SourceInfo'Member'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Node'SourceInfo'Member'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Node'SourceInfo'Member'List_ l) = (Untyped.ListStruct l)
     length (Node'SourceInfo'Member'List_ l) = (Untyped.length l)
@@ -687,7 +679,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Node'SourceInfo'Member (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Node'SourceInfo'Member (Message.Mut s))) where
     setIndex (Node'SourceInfo'Member'newtype_ elt) i (Node'SourceInfo'Member'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Node'SourceInfo'Member'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
 get_Node'SourceInfo'Member'docComment :: ((Untyped.ReadCtx m msg)
@@ -697,14 +689,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Node'SourceInfo'Member'docComment :: ((Untyped.RWCtx m s)
-                                         ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (Node'SourceInfo'Member (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
+                                         ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Node'SourceInfo'Member (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
 set_Node'SourceInfo'Member'docComment (Node'SourceInfo'Member'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Node'SourceInfo'Member'docComment :: ((Untyped.ReadCtx m msg)) => (Node'SourceInfo'Member msg) -> (m Std_.Bool)
 has_Node'SourceInfo'Member'docComment (Node'SourceInfo'Member'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Node'SourceInfo'Member'docComment :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'SourceInfo'Member (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
+new_Node'SourceInfo'Member'docComment :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'SourceInfo'Member (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
 new_Node'SourceInfo'Member'docComment len struct = (do
     result <- (Basics.newText (Untyped.message struct) len)
     (set_Node'SourceInfo'Member'docComment struct result)
@@ -716,20 +708,19 @@
     fromStruct struct = (Std_.pure (Field'newtype_ struct))
 instance (Classes.ToStruct msg (Field msg)) where
     toStruct (Field'newtype_ struct) = struct
-instance (Untyped.HasMessage (Field msg)) where
-    type InMessage (Field msg) = msg
+instance (Untyped.HasMessage (Field mut) mut) where
     message (Field'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Field msg)) where
+instance (Untyped.MessageDefault (Field mut) mut) where
     messageDefault msg = (Field'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Field msg)) where
     fromPtr msg ptr = (Field'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Field (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Field (Message.Mut s))) where
     toPtr msg (Field'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Field (Message.MutMsg s))) where
+instance (Classes.Allocate s (Field (Message.Mut s))) where
     new msg = (Field'newtype_ <$> (Untyped.allocStruct msg 3 4))
-instance (Basics.ListElem msg (Field msg)) where
-    newtype List msg (Field msg)
-        = Field'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Field mut)) where
+    newtype List mut (Field mut)
+        = Field'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Field'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Field'List_ l) = (Untyped.ListStruct l)
     length (Field'List_ l) = (Untyped.length l)
@@ -737,7 +728,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Field (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Field (Message.Mut s))) where
     setIndex (Field'newtype_ elt) i (Field'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Field'List_ <$> (Untyped.allocCompositeList msg 3 4 len))
 get_Field'name :: ((Untyped.ReadCtx m msg)
@@ -747,14 +738,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Field'name :: ((Untyped.RWCtx m s)
-                  ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (Field (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
+                  ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Field (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
 set_Field'name (Field'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Field'name :: ((Untyped.ReadCtx m msg)) => (Field msg) -> (m Std_.Bool)
 has_Field'name (Field'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Field'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (Field (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
+new_Field'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (Field (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
 new_Field'name len struct = (do
     result <- (Basics.newText (Untyped.message struct) len)
     (set_Field'name struct result)
@@ -762,7 +753,7 @@
     )
 get_Field'codeOrder :: ((Untyped.ReadCtx m msg)) => (Field msg) -> (m Std_.Word16)
 get_Field'codeOrder (Field'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Field'codeOrder :: ((Untyped.RWCtx m s)) => (Field (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Field'codeOrder :: ((Untyped.RWCtx m s)) => (Field (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Field'codeOrder (Field'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
 get_Field'annotations :: ((Untyped.ReadCtx m msg)
                          ,(Classes.FromPtr msg (Basics.List msg (Annotation msg)))) => (Field msg) -> (m (Basics.List msg (Annotation msg)))
@@ -771,14 +762,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Field'annotations :: ((Untyped.RWCtx m s)
-                         ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Annotation (Message.MutMsg s))))) => (Field (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Annotation (Message.MutMsg s))) -> (m ())
+                         ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Annotation (Message.Mut s))))) => (Field (Message.Mut s)) -> (Basics.List (Message.Mut s) (Annotation (Message.Mut s))) -> (m ())
 set_Field'annotations (Field'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 1 struct)
     )
 has_Field'annotations :: ((Untyped.ReadCtx m msg)) => (Field msg) -> (m Std_.Bool)
 has_Field'annotations (Field'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_Field'annotations :: ((Untyped.RWCtx m s)) => Std_.Int -> (Field (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Annotation (Message.MutMsg s))))
+new_Field'annotations :: ((Untyped.RWCtx m s)) => Std_.Int -> (Field (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Annotation (Message.Mut s))))
 new_Field'annotations len struct = (do
     result <- (Classes.newList (Untyped.message struct) len)
     (set_Field'annotations struct result)
@@ -786,16 +777,16 @@
     )
 get_Field'discriminantValue :: ((Untyped.ReadCtx m msg)) => (Field msg) -> (m Std_.Word16)
 get_Field'discriminantValue (Field'newtype_ struct) = (GenHelpers.getWordField struct 0 16 65535)
-set_Field'discriminantValue :: ((Untyped.RWCtx m s)) => (Field (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Field'discriminantValue :: ((Untyped.RWCtx m s)) => (Field (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Field'discriminantValue (Field'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 16 65535)
 get_Field'ordinal :: ((Untyped.ReadCtx m msg)
                      ,(Classes.FromStruct msg (Field'ordinal msg))) => (Field msg) -> (m (Field'ordinal msg))
 get_Field'ordinal (Field'newtype_ struct) = (Classes.fromStruct struct)
-data Field' msg
-    = Field'slot (Field'slot msg)
-    | Field'group (Field'group msg)
+data Field' (mut :: Message.Mutability)
+    = Field'slot (Field'slot mut)
+    | Field'group (Field'group mut)
     | Field'unknown' Std_.Word16
-instance (Classes.FromStruct msg (Field' msg)) where
+instance (Classes.FromStruct mut (Field' mut)) where
     fromStruct struct = (do
         tag <- (GenHelpers.getTag struct 4)
         case tag of
@@ -810,18 +801,18 @@
               ,(Classes.FromStruct msg (Field' msg))) => (Field msg) -> (m (Field' msg))
 get_Field' (Field'newtype_ struct) = (Classes.fromStruct struct)
 set_Field'slot :: ((Untyped.RWCtx m s)
-                  ,(Classes.FromStruct (Message.MutMsg s) (Field'slot (Message.MutMsg s)))) => (Field (Message.MutMsg s)) -> (m (Field'slot (Message.MutMsg s)))
+                  ,(Classes.FromStruct (Message.Mut s) (Field'slot (Message.Mut s)))) => (Field (Message.Mut s)) -> (m (Field'slot (Message.Mut s)))
 set_Field'slot (Field'newtype_ struct) = (do
     (GenHelpers.setWordField struct (0 :: Std_.Word16) 1 0 0)
     (Classes.fromStruct struct)
     )
 set_Field'group :: ((Untyped.RWCtx m s)
-                   ,(Classes.FromStruct (Message.MutMsg s) (Field'group (Message.MutMsg s)))) => (Field (Message.MutMsg s)) -> (m (Field'group (Message.MutMsg s)))
+                   ,(Classes.FromStruct (Message.Mut s) (Field'group (Message.Mut s)))) => (Field (Message.Mut s)) -> (m (Field'group (Message.Mut s)))
 set_Field'group (Field'newtype_ struct) = (do
     (GenHelpers.setWordField struct (1 :: Std_.Word16) 1 0 0)
     (Classes.fromStruct struct)
     )
-set_Field'unknown' :: ((Untyped.RWCtx m s)) => (Field (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Field'unknown' :: ((Untyped.RWCtx m s)) => (Field (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Field'unknown' (Field'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 1 0 0)
 newtype Field'slot msg
     = Field'slot'newtype_ (Untyped.Struct msg)
@@ -829,14 +820,13 @@
     fromStruct struct = (Std_.pure (Field'slot'newtype_ struct))
 instance (Classes.ToStruct msg (Field'slot msg)) where
     toStruct (Field'slot'newtype_ struct) = struct
-instance (Untyped.HasMessage (Field'slot msg)) where
-    type InMessage (Field'slot msg) = msg
+instance (Untyped.HasMessage (Field'slot mut) mut) where
     message (Field'slot'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Field'slot msg)) where
+instance (Untyped.MessageDefault (Field'slot mut) mut) where
     messageDefault msg = (Field'slot'newtype_ <$> (Untyped.messageDefault msg))
 get_Field'slot'offset :: ((Untyped.ReadCtx m msg)) => (Field'slot msg) -> (m Std_.Word32)
 get_Field'slot'offset (Field'slot'newtype_ struct) = (GenHelpers.getWordField struct 0 32 0)
-set_Field'slot'offset :: ((Untyped.RWCtx m s)) => (Field'slot (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_Field'slot'offset :: ((Untyped.RWCtx m s)) => (Field'slot (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_Field'slot'offset (Field'slot'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 32 0)
 get_Field'slot'type_ :: ((Untyped.ReadCtx m msg)
                         ,(Classes.FromPtr msg (Type msg))) => (Field'slot msg) -> (m (Type msg))
@@ -845,14 +835,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Field'slot'type_ :: ((Untyped.RWCtx m s)
-                        ,(Classes.ToPtr s (Type (Message.MutMsg s)))) => (Field'slot (Message.MutMsg s)) -> (Type (Message.MutMsg s)) -> (m ())
+                        ,(Classes.ToPtr s (Type (Message.Mut s)))) => (Field'slot (Message.Mut s)) -> (Type (Message.Mut s)) -> (m ())
 set_Field'slot'type_ (Field'slot'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 2 struct)
     )
 has_Field'slot'type_ :: ((Untyped.ReadCtx m msg)) => (Field'slot msg) -> (m Std_.Bool)
 has_Field'slot'type_ (Field'slot'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 2 struct))
-new_Field'slot'type_ :: ((Untyped.RWCtx m s)) => (Field'slot (Message.MutMsg s)) -> (m (Type (Message.MutMsg s)))
+new_Field'slot'type_ :: ((Untyped.RWCtx m s)) => (Field'slot (Message.Mut s)) -> (m (Type (Message.Mut s)))
 new_Field'slot'type_ struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Field'slot'type_ struct result)
@@ -865,14 +855,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Field'slot'defaultValue :: ((Untyped.RWCtx m s)
-                               ,(Classes.ToPtr s (Value (Message.MutMsg s)))) => (Field'slot (Message.MutMsg s)) -> (Value (Message.MutMsg s)) -> (m ())
+                               ,(Classes.ToPtr s (Value (Message.Mut s)))) => (Field'slot (Message.Mut s)) -> (Value (Message.Mut s)) -> (m ())
 set_Field'slot'defaultValue (Field'slot'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 3 struct)
     )
 has_Field'slot'defaultValue :: ((Untyped.ReadCtx m msg)) => (Field'slot msg) -> (m Std_.Bool)
 has_Field'slot'defaultValue (Field'slot'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 3 struct))
-new_Field'slot'defaultValue :: ((Untyped.RWCtx m s)) => (Field'slot (Message.MutMsg s)) -> (m (Value (Message.MutMsg s)))
+new_Field'slot'defaultValue :: ((Untyped.RWCtx m s)) => (Field'slot (Message.Mut s)) -> (m (Value (Message.Mut s)))
 new_Field'slot'defaultValue struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Field'slot'defaultValue struct result)
@@ -880,7 +870,7 @@
     )
 get_Field'slot'hadExplicitDefault :: ((Untyped.ReadCtx m msg)) => (Field'slot msg) -> (m Std_.Bool)
 get_Field'slot'hadExplicitDefault (Field'slot'newtype_ struct) = (GenHelpers.getWordField struct 2 0 0)
-set_Field'slot'hadExplicitDefault :: ((Untyped.RWCtx m s)) => (Field'slot (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_Field'slot'hadExplicitDefault :: ((Untyped.RWCtx m s)) => (Field'slot (Message.Mut s)) -> Std_.Bool -> (m ())
 set_Field'slot'hadExplicitDefault (Field'slot'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 2 0 0)
 newtype Field'group msg
     = Field'group'newtype_ (Untyped.Struct msg)
@@ -888,14 +878,13 @@
     fromStruct struct = (Std_.pure (Field'group'newtype_ struct))
 instance (Classes.ToStruct msg (Field'group msg)) where
     toStruct (Field'group'newtype_ struct) = struct
-instance (Untyped.HasMessage (Field'group msg)) where
-    type InMessage (Field'group msg) = msg
+instance (Untyped.HasMessage (Field'group mut) mut) where
     message (Field'group'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Field'group msg)) where
+instance (Untyped.MessageDefault (Field'group mut) mut) where
     messageDefault msg = (Field'group'newtype_ <$> (Untyped.messageDefault msg))
 get_Field'group'typeId :: ((Untyped.ReadCtx m msg)) => (Field'group msg) -> (m Std_.Word64)
 get_Field'group'typeId (Field'group'newtype_ struct) = (GenHelpers.getWordField struct 2 0 0)
-set_Field'group'typeId :: ((Untyped.RWCtx m s)) => (Field'group (Message.MutMsg s)) -> Std_.Word64 -> (m ())
+set_Field'group'typeId :: ((Untyped.RWCtx m s)) => (Field'group (Message.Mut s)) -> Std_.Word64 -> (m ())
 set_Field'group'typeId (Field'group'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 2 0 0)
 newtype Field'ordinal msg
     = Field'ordinal'newtype_ (Untyped.Struct msg)
@@ -903,16 +892,15 @@
     fromStruct struct = (Std_.pure (Field'ordinal'newtype_ struct))
 instance (Classes.ToStruct msg (Field'ordinal msg)) where
     toStruct (Field'ordinal'newtype_ struct) = struct
-instance (Untyped.HasMessage (Field'ordinal msg)) where
-    type InMessage (Field'ordinal msg) = msg
+instance (Untyped.HasMessage (Field'ordinal mut) mut) where
     message (Field'ordinal'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Field'ordinal msg)) where
+instance (Untyped.MessageDefault (Field'ordinal mut) mut) where
     messageDefault msg = (Field'ordinal'newtype_ <$> (Untyped.messageDefault msg))
-data Field'ordinal' msg
+data Field'ordinal' (mut :: Message.Mutability)
     = Field'ordinal'implicit 
     | Field'ordinal'explicit Std_.Word16
     | Field'ordinal'unknown' Std_.Word16
-instance (Classes.FromStruct msg (Field'ordinal' msg)) where
+instance (Classes.FromStruct mut (Field'ordinal' mut)) where
     fromStruct struct = (do
         tag <- (GenHelpers.getTag struct 5)
         case tag of
@@ -926,17 +914,17 @@
 get_Field'ordinal' :: ((Untyped.ReadCtx m msg)
                       ,(Classes.FromStruct msg (Field'ordinal' msg))) => (Field'ordinal msg) -> (m (Field'ordinal' msg))
 get_Field'ordinal' (Field'ordinal'newtype_ struct) = (Classes.fromStruct struct)
-set_Field'ordinal'implicit :: ((Untyped.RWCtx m s)) => (Field'ordinal (Message.MutMsg s)) -> (m ())
+set_Field'ordinal'implicit :: ((Untyped.RWCtx m s)) => (Field'ordinal (Message.Mut s)) -> (m ())
 set_Field'ordinal'implicit (Field'ordinal'newtype_ struct) = (do
     (GenHelpers.setWordField struct (0 :: Std_.Word16) 1 16 0)
     (Std_.pure ())
     )
-set_Field'ordinal'explicit :: ((Untyped.RWCtx m s)) => (Field'ordinal (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Field'ordinal'explicit :: ((Untyped.RWCtx m s)) => (Field'ordinal (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Field'ordinal'explicit (Field'ordinal'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (1 :: Std_.Word16) 1 16 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 1 32 0)
     )
-set_Field'ordinal'unknown' :: ((Untyped.RWCtx m s)) => (Field'ordinal (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Field'ordinal'unknown' :: ((Untyped.RWCtx m s)) => (Field'ordinal (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Field'ordinal'unknown' (Field'ordinal'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 1 16 0)
 field'noDiscriminant :: Std_.Word16
 field'noDiscriminant  = (Classes.fromWord 65535)
@@ -946,20 +934,19 @@
     fromStruct struct = (Std_.pure (Enumerant'newtype_ struct))
 instance (Classes.ToStruct msg (Enumerant msg)) where
     toStruct (Enumerant'newtype_ struct) = struct
-instance (Untyped.HasMessage (Enumerant msg)) where
-    type InMessage (Enumerant msg) = msg
+instance (Untyped.HasMessage (Enumerant mut) mut) where
     message (Enumerant'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Enumerant msg)) where
+instance (Untyped.MessageDefault (Enumerant mut) mut) where
     messageDefault msg = (Enumerant'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Enumerant msg)) where
     fromPtr msg ptr = (Enumerant'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Enumerant (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Enumerant (Message.Mut s))) where
     toPtr msg (Enumerant'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Enumerant (Message.MutMsg s))) where
+instance (Classes.Allocate s (Enumerant (Message.Mut s))) where
     new msg = (Enumerant'newtype_ <$> (Untyped.allocStruct msg 1 2))
-instance (Basics.ListElem msg (Enumerant msg)) where
-    newtype List msg (Enumerant msg)
-        = Enumerant'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Enumerant mut)) where
+    newtype List mut (Enumerant mut)
+        = Enumerant'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Enumerant'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Enumerant'List_ l) = (Untyped.ListStruct l)
     length (Enumerant'List_ l) = (Untyped.length l)
@@ -967,7 +954,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Enumerant (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Enumerant (Message.Mut s))) where
     setIndex (Enumerant'newtype_ elt) i (Enumerant'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Enumerant'List_ <$> (Untyped.allocCompositeList msg 1 2 len))
 get_Enumerant'name :: ((Untyped.ReadCtx m msg)
@@ -977,14 +964,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Enumerant'name :: ((Untyped.RWCtx m s)
-                      ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (Enumerant (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
+                      ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Enumerant (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
 set_Enumerant'name (Enumerant'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Enumerant'name :: ((Untyped.ReadCtx m msg)) => (Enumerant msg) -> (m Std_.Bool)
 has_Enumerant'name (Enumerant'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Enumerant'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (Enumerant (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
+new_Enumerant'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (Enumerant (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
 new_Enumerant'name len struct = (do
     result <- (Basics.newText (Untyped.message struct) len)
     (set_Enumerant'name struct result)
@@ -992,7 +979,7 @@
     )
 get_Enumerant'codeOrder :: ((Untyped.ReadCtx m msg)) => (Enumerant msg) -> (m Std_.Word16)
 get_Enumerant'codeOrder (Enumerant'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Enumerant'codeOrder :: ((Untyped.RWCtx m s)) => (Enumerant (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Enumerant'codeOrder :: ((Untyped.RWCtx m s)) => (Enumerant (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Enumerant'codeOrder (Enumerant'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
 get_Enumerant'annotations :: ((Untyped.ReadCtx m msg)
                              ,(Classes.FromPtr msg (Basics.List msg (Annotation msg)))) => (Enumerant msg) -> (m (Basics.List msg (Annotation msg)))
@@ -1001,14 +988,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Enumerant'annotations :: ((Untyped.RWCtx m s)
-                             ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Annotation (Message.MutMsg s))))) => (Enumerant (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Annotation (Message.MutMsg s))) -> (m ())
+                             ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Annotation (Message.Mut s))))) => (Enumerant (Message.Mut s)) -> (Basics.List (Message.Mut s) (Annotation (Message.Mut s))) -> (m ())
 set_Enumerant'annotations (Enumerant'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 1 struct)
     )
 has_Enumerant'annotations :: ((Untyped.ReadCtx m msg)) => (Enumerant msg) -> (m Std_.Bool)
 has_Enumerant'annotations (Enumerant'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_Enumerant'annotations :: ((Untyped.RWCtx m s)) => Std_.Int -> (Enumerant (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Annotation (Message.MutMsg s))))
+new_Enumerant'annotations :: ((Untyped.RWCtx m s)) => Std_.Int -> (Enumerant (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Annotation (Message.Mut s))))
 new_Enumerant'annotations len struct = (do
     result <- (Classes.newList (Untyped.message struct) len)
     (set_Enumerant'annotations struct result)
@@ -1020,20 +1007,19 @@
     fromStruct struct = (Std_.pure (Superclass'newtype_ struct))
 instance (Classes.ToStruct msg (Superclass msg)) where
     toStruct (Superclass'newtype_ struct) = struct
-instance (Untyped.HasMessage (Superclass msg)) where
-    type InMessage (Superclass msg) = msg
+instance (Untyped.HasMessage (Superclass mut) mut) where
     message (Superclass'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Superclass msg)) where
+instance (Untyped.MessageDefault (Superclass mut) mut) where
     messageDefault msg = (Superclass'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Superclass msg)) where
     fromPtr msg ptr = (Superclass'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Superclass (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Superclass (Message.Mut s))) where
     toPtr msg (Superclass'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Superclass (Message.MutMsg s))) where
+instance (Classes.Allocate s (Superclass (Message.Mut s))) where
     new msg = (Superclass'newtype_ <$> (Untyped.allocStruct msg 1 1))
-instance (Basics.ListElem msg (Superclass msg)) where
-    newtype List msg (Superclass msg)
-        = Superclass'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Superclass mut)) where
+    newtype List mut (Superclass mut)
+        = Superclass'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Superclass'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Superclass'List_ l) = (Untyped.ListStruct l)
     length (Superclass'List_ l) = (Untyped.length l)
@@ -1041,12 +1027,12 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Superclass (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Superclass (Message.Mut s))) where
     setIndex (Superclass'newtype_ elt) i (Superclass'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Superclass'List_ <$> (Untyped.allocCompositeList msg 1 1 len))
 get_Superclass'id :: ((Untyped.ReadCtx m msg)) => (Superclass msg) -> (m Std_.Word64)
 get_Superclass'id (Superclass'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Superclass'id :: ((Untyped.RWCtx m s)) => (Superclass (Message.MutMsg s)) -> Std_.Word64 -> (m ())
+set_Superclass'id :: ((Untyped.RWCtx m s)) => (Superclass (Message.Mut s)) -> Std_.Word64 -> (m ())
 set_Superclass'id (Superclass'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 0 0 0)
 get_Superclass'brand :: ((Untyped.ReadCtx m msg)
                         ,(Classes.FromPtr msg (Brand msg))) => (Superclass msg) -> (m (Brand msg))
@@ -1055,14 +1041,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Superclass'brand :: ((Untyped.RWCtx m s)
-                        ,(Classes.ToPtr s (Brand (Message.MutMsg s)))) => (Superclass (Message.MutMsg s)) -> (Brand (Message.MutMsg s)) -> (m ())
+                        ,(Classes.ToPtr s (Brand (Message.Mut s)))) => (Superclass (Message.Mut s)) -> (Brand (Message.Mut s)) -> (m ())
 set_Superclass'brand (Superclass'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Superclass'brand :: ((Untyped.ReadCtx m msg)) => (Superclass msg) -> (m Std_.Bool)
 has_Superclass'brand (Superclass'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Superclass'brand :: ((Untyped.RWCtx m s)) => (Superclass (Message.MutMsg s)) -> (m (Brand (Message.MutMsg s)))
+new_Superclass'brand :: ((Untyped.RWCtx m s)) => (Superclass (Message.Mut s)) -> (m (Brand (Message.Mut s)))
 new_Superclass'brand struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Superclass'brand struct result)
@@ -1074,20 +1060,19 @@
     fromStruct struct = (Std_.pure (Method'newtype_ struct))
 instance (Classes.ToStruct msg (Method msg)) where
     toStruct (Method'newtype_ struct) = struct
-instance (Untyped.HasMessage (Method msg)) where
-    type InMessage (Method msg) = msg
+instance (Untyped.HasMessage (Method mut) mut) where
     message (Method'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Method msg)) where
+instance (Untyped.MessageDefault (Method mut) mut) where
     messageDefault msg = (Method'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Method msg)) where
     fromPtr msg ptr = (Method'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Method (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Method (Message.Mut s))) where
     toPtr msg (Method'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Method (Message.MutMsg s))) where
+instance (Classes.Allocate s (Method (Message.Mut s))) where
     new msg = (Method'newtype_ <$> (Untyped.allocStruct msg 3 5))
-instance (Basics.ListElem msg (Method msg)) where
-    newtype List msg (Method msg)
-        = Method'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Method mut)) where
+    newtype List mut (Method mut)
+        = Method'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Method'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Method'List_ l) = (Untyped.ListStruct l)
     length (Method'List_ l) = (Untyped.length l)
@@ -1095,7 +1080,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Method (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Method (Message.Mut s))) where
     setIndex (Method'newtype_ elt) i (Method'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Method'List_ <$> (Untyped.allocCompositeList msg 3 5 len))
 get_Method'name :: ((Untyped.ReadCtx m msg)
@@ -1105,14 +1090,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Method'name :: ((Untyped.RWCtx m s)
-                   ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (Method (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
+                   ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Method (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
 set_Method'name (Method'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Method'name :: ((Untyped.ReadCtx m msg)) => (Method msg) -> (m Std_.Bool)
 has_Method'name (Method'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Method'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (Method (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
+new_Method'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (Method (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
 new_Method'name len struct = (do
     result <- (Basics.newText (Untyped.message struct) len)
     (set_Method'name struct result)
@@ -1120,15 +1105,15 @@
     )
 get_Method'codeOrder :: ((Untyped.ReadCtx m msg)) => (Method msg) -> (m Std_.Word16)
 get_Method'codeOrder (Method'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Method'codeOrder :: ((Untyped.RWCtx m s)) => (Method (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Method'codeOrder :: ((Untyped.RWCtx m s)) => (Method (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Method'codeOrder (Method'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
 get_Method'paramStructType :: ((Untyped.ReadCtx m msg)) => (Method msg) -> (m Std_.Word64)
 get_Method'paramStructType (Method'newtype_ struct) = (GenHelpers.getWordField struct 1 0 0)
-set_Method'paramStructType :: ((Untyped.RWCtx m s)) => (Method (Message.MutMsg s)) -> Std_.Word64 -> (m ())
+set_Method'paramStructType :: ((Untyped.RWCtx m s)) => (Method (Message.Mut s)) -> Std_.Word64 -> (m ())
 set_Method'paramStructType (Method'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
 get_Method'resultStructType :: ((Untyped.ReadCtx m msg)) => (Method msg) -> (m Std_.Word64)
 get_Method'resultStructType (Method'newtype_ struct) = (GenHelpers.getWordField struct 2 0 0)
-set_Method'resultStructType :: ((Untyped.RWCtx m s)) => (Method (Message.MutMsg s)) -> Std_.Word64 -> (m ())
+set_Method'resultStructType :: ((Untyped.RWCtx m s)) => (Method (Message.Mut s)) -> Std_.Word64 -> (m ())
 set_Method'resultStructType (Method'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 2 0 0)
 get_Method'annotations :: ((Untyped.ReadCtx m msg)
                           ,(Classes.FromPtr msg (Basics.List msg (Annotation msg)))) => (Method msg) -> (m (Basics.List msg (Annotation msg)))
@@ -1137,14 +1122,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Method'annotations :: ((Untyped.RWCtx m s)
-                          ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Annotation (Message.MutMsg s))))) => (Method (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Annotation (Message.MutMsg s))) -> (m ())
+                          ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Annotation (Message.Mut s))))) => (Method (Message.Mut s)) -> (Basics.List (Message.Mut s) (Annotation (Message.Mut s))) -> (m ())
 set_Method'annotations (Method'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 1 struct)
     )
 has_Method'annotations :: ((Untyped.ReadCtx m msg)) => (Method msg) -> (m Std_.Bool)
 has_Method'annotations (Method'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_Method'annotations :: ((Untyped.RWCtx m s)) => Std_.Int -> (Method (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Annotation (Message.MutMsg s))))
+new_Method'annotations :: ((Untyped.RWCtx m s)) => Std_.Int -> (Method (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Annotation (Message.Mut s))))
 new_Method'annotations len struct = (do
     result <- (Classes.newList (Untyped.message struct) len)
     (set_Method'annotations struct result)
@@ -1157,14 +1142,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Method'paramBrand :: ((Untyped.RWCtx m s)
-                         ,(Classes.ToPtr s (Brand (Message.MutMsg s)))) => (Method (Message.MutMsg s)) -> (Brand (Message.MutMsg s)) -> (m ())
+                         ,(Classes.ToPtr s (Brand (Message.Mut s)))) => (Method (Message.Mut s)) -> (Brand (Message.Mut s)) -> (m ())
 set_Method'paramBrand (Method'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 2 struct)
     )
 has_Method'paramBrand :: ((Untyped.ReadCtx m msg)) => (Method msg) -> (m Std_.Bool)
 has_Method'paramBrand (Method'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 2 struct))
-new_Method'paramBrand :: ((Untyped.RWCtx m s)) => (Method (Message.MutMsg s)) -> (m (Brand (Message.MutMsg s)))
+new_Method'paramBrand :: ((Untyped.RWCtx m s)) => (Method (Message.Mut s)) -> (m (Brand (Message.Mut s)))
 new_Method'paramBrand struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Method'paramBrand struct result)
@@ -1177,14 +1162,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Method'resultBrand :: ((Untyped.RWCtx m s)
-                          ,(Classes.ToPtr s (Brand (Message.MutMsg s)))) => (Method (Message.MutMsg s)) -> (Brand (Message.MutMsg s)) -> (m ())
+                          ,(Classes.ToPtr s (Brand (Message.Mut s)))) => (Method (Message.Mut s)) -> (Brand (Message.Mut s)) -> (m ())
 set_Method'resultBrand (Method'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 3 struct)
     )
 has_Method'resultBrand :: ((Untyped.ReadCtx m msg)) => (Method msg) -> (m Std_.Bool)
 has_Method'resultBrand (Method'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 3 struct))
-new_Method'resultBrand :: ((Untyped.RWCtx m s)) => (Method (Message.MutMsg s)) -> (m (Brand (Message.MutMsg s)))
+new_Method'resultBrand :: ((Untyped.RWCtx m s)) => (Method (Message.Mut s)) -> (m (Brand (Message.Mut s)))
 new_Method'resultBrand struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Method'resultBrand struct result)
@@ -1197,14 +1182,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Method'implicitParameters :: ((Untyped.RWCtx m s)
-                                 ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Node'Parameter (Message.MutMsg s))))) => (Method (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Node'Parameter (Message.MutMsg s))) -> (m ())
+                                 ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Node'Parameter (Message.Mut s))))) => (Method (Message.Mut s)) -> (Basics.List (Message.Mut s) (Node'Parameter (Message.Mut s))) -> (m ())
 set_Method'implicitParameters (Method'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 4 struct)
     )
 has_Method'implicitParameters :: ((Untyped.ReadCtx m msg)) => (Method msg) -> (m Std_.Bool)
 has_Method'implicitParameters (Method'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 4 struct))
-new_Method'implicitParameters :: ((Untyped.RWCtx m s)) => Std_.Int -> (Method (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Node'Parameter (Message.MutMsg s))))
+new_Method'implicitParameters :: ((Untyped.RWCtx m s)) => Std_.Int -> (Method (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Node'Parameter (Message.Mut s))))
 new_Method'implicitParameters len struct = (do
     result <- (Classes.newList (Untyped.message struct) len)
     (set_Method'implicitParameters struct result)
@@ -1216,20 +1201,19 @@
     fromStruct struct = (Std_.pure (Type'newtype_ struct))
 instance (Classes.ToStruct msg (Type msg)) where
     toStruct (Type'newtype_ struct) = struct
-instance (Untyped.HasMessage (Type msg)) where
-    type InMessage (Type msg) = msg
+instance (Untyped.HasMessage (Type mut) mut) where
     message (Type'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Type msg)) where
+instance (Untyped.MessageDefault (Type mut) mut) where
     messageDefault msg = (Type'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Type msg)) where
     fromPtr msg ptr = (Type'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Type (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Type (Message.Mut s))) where
     toPtr msg (Type'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Type (Message.MutMsg s))) where
+instance (Classes.Allocate s (Type (Message.Mut s))) where
     new msg = (Type'newtype_ <$> (Untyped.allocStruct msg 3 1))
-instance (Basics.ListElem msg (Type msg)) where
-    newtype List msg (Type msg)
-        = Type'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Type mut)) where
+    newtype List mut (Type mut)
+        = Type'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Type'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Type'List_ l) = (Untyped.ListStruct l)
     length (Type'List_ l) = (Untyped.length l)
@@ -1237,10 +1221,10 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Type (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Type (Message.Mut s))) where
     setIndex (Type'newtype_ elt) i (Type'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Type'List_ <$> (Untyped.allocCompositeList msg 3 1 len))
-data Type' msg
+data Type' (mut :: Message.Mutability)
     = Type'void 
     | Type'bool 
     | Type'int8 
@@ -1255,13 +1239,13 @@
     | Type'float64 
     | Type'text 
     | Type'data_ 
-    | Type'list (Type'list msg)
-    | Type'enum (Type'enum msg)
-    | Type'struct (Type'struct msg)
-    | Type'interface (Type'interface msg)
-    | Type'anyPointer (Type'anyPointer msg)
+    | Type'list (Type'list mut)
+    | Type'enum (Type'enum mut)
+    | Type'struct (Type'struct mut)
+    | Type'interface (Type'interface mut)
+    | Type'anyPointer (Type'anyPointer mut)
     | Type'unknown' Std_.Word16
-instance (Classes.FromStruct msg (Type' msg)) where
+instance (Classes.FromStruct mut (Type' mut)) where
     fromStruct struct = (do
         tag <- (GenHelpers.getTag struct 0)
         case tag of
@@ -1309,107 +1293,107 @@
 get_Type' :: ((Untyped.ReadCtx m msg)
              ,(Classes.FromStruct msg (Type' msg))) => (Type msg) -> (m (Type' msg))
 get_Type' (Type'newtype_ struct) = (Classes.fromStruct struct)
-set_Type'void :: ((Untyped.RWCtx m s)) => (Type (Message.MutMsg s)) -> (m ())
+set_Type'void :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
 set_Type'void (Type'newtype_ struct) = (do
     (GenHelpers.setWordField struct (0 :: Std_.Word16) 0 0 0)
     (Std_.pure ())
     )
-set_Type'bool :: ((Untyped.RWCtx m s)) => (Type (Message.MutMsg s)) -> (m ())
+set_Type'bool :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
 set_Type'bool (Type'newtype_ struct) = (do
     (GenHelpers.setWordField struct (1 :: Std_.Word16) 0 0 0)
     (Std_.pure ())
     )
-set_Type'int8 :: ((Untyped.RWCtx m s)) => (Type (Message.MutMsg s)) -> (m ())
+set_Type'int8 :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
 set_Type'int8 (Type'newtype_ struct) = (do
     (GenHelpers.setWordField struct (2 :: Std_.Word16) 0 0 0)
     (Std_.pure ())
     )
-set_Type'int16 :: ((Untyped.RWCtx m s)) => (Type (Message.MutMsg s)) -> (m ())
+set_Type'int16 :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
 set_Type'int16 (Type'newtype_ struct) = (do
     (GenHelpers.setWordField struct (3 :: Std_.Word16) 0 0 0)
     (Std_.pure ())
     )
-set_Type'int32 :: ((Untyped.RWCtx m s)) => (Type (Message.MutMsg s)) -> (m ())
+set_Type'int32 :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
 set_Type'int32 (Type'newtype_ struct) = (do
     (GenHelpers.setWordField struct (4 :: Std_.Word16) 0 0 0)
     (Std_.pure ())
     )
-set_Type'int64 :: ((Untyped.RWCtx m s)) => (Type (Message.MutMsg s)) -> (m ())
+set_Type'int64 :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
 set_Type'int64 (Type'newtype_ struct) = (do
     (GenHelpers.setWordField struct (5 :: Std_.Word16) 0 0 0)
     (Std_.pure ())
     )
-set_Type'uint8 :: ((Untyped.RWCtx m s)) => (Type (Message.MutMsg s)) -> (m ())
+set_Type'uint8 :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
 set_Type'uint8 (Type'newtype_ struct) = (do
     (GenHelpers.setWordField struct (6 :: Std_.Word16) 0 0 0)
     (Std_.pure ())
     )
-set_Type'uint16 :: ((Untyped.RWCtx m s)) => (Type (Message.MutMsg s)) -> (m ())
+set_Type'uint16 :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
 set_Type'uint16 (Type'newtype_ struct) = (do
     (GenHelpers.setWordField struct (7 :: Std_.Word16) 0 0 0)
     (Std_.pure ())
     )
-set_Type'uint32 :: ((Untyped.RWCtx m s)) => (Type (Message.MutMsg s)) -> (m ())
+set_Type'uint32 :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
 set_Type'uint32 (Type'newtype_ struct) = (do
     (GenHelpers.setWordField struct (8 :: Std_.Word16) 0 0 0)
     (Std_.pure ())
     )
-set_Type'uint64 :: ((Untyped.RWCtx m s)) => (Type (Message.MutMsg s)) -> (m ())
+set_Type'uint64 :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
 set_Type'uint64 (Type'newtype_ struct) = (do
     (GenHelpers.setWordField struct (9 :: Std_.Word16) 0 0 0)
     (Std_.pure ())
     )
-set_Type'float32 :: ((Untyped.RWCtx m s)) => (Type (Message.MutMsg s)) -> (m ())
+set_Type'float32 :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
 set_Type'float32 (Type'newtype_ struct) = (do
     (GenHelpers.setWordField struct (10 :: Std_.Word16) 0 0 0)
     (Std_.pure ())
     )
-set_Type'float64 :: ((Untyped.RWCtx m s)) => (Type (Message.MutMsg s)) -> (m ())
+set_Type'float64 :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
 set_Type'float64 (Type'newtype_ struct) = (do
     (GenHelpers.setWordField struct (11 :: Std_.Word16) 0 0 0)
     (Std_.pure ())
     )
-set_Type'text :: ((Untyped.RWCtx m s)) => (Type (Message.MutMsg s)) -> (m ())
+set_Type'text :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
 set_Type'text (Type'newtype_ struct) = (do
     (GenHelpers.setWordField struct (12 :: Std_.Word16) 0 0 0)
     (Std_.pure ())
     )
-set_Type'data_ :: ((Untyped.RWCtx m s)) => (Type (Message.MutMsg s)) -> (m ())
+set_Type'data_ :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
 set_Type'data_ (Type'newtype_ struct) = (do
     (GenHelpers.setWordField struct (13 :: Std_.Word16) 0 0 0)
     (Std_.pure ())
     )
 set_Type'list :: ((Untyped.RWCtx m s)
-                 ,(Classes.FromStruct (Message.MutMsg s) (Type'list (Message.MutMsg s)))) => (Type (Message.MutMsg s)) -> (m (Type'list (Message.MutMsg s)))
+                 ,(Classes.FromStruct (Message.Mut s) (Type'list (Message.Mut s)))) => (Type (Message.Mut s)) -> (m (Type'list (Message.Mut s)))
 set_Type'list (Type'newtype_ struct) = (do
     (GenHelpers.setWordField struct (14 :: Std_.Word16) 0 0 0)
     (Classes.fromStruct struct)
     )
 set_Type'enum :: ((Untyped.RWCtx m s)
-                 ,(Classes.FromStruct (Message.MutMsg s) (Type'enum (Message.MutMsg s)))) => (Type (Message.MutMsg s)) -> (m (Type'enum (Message.MutMsg s)))
+                 ,(Classes.FromStruct (Message.Mut s) (Type'enum (Message.Mut s)))) => (Type (Message.Mut s)) -> (m (Type'enum (Message.Mut s)))
 set_Type'enum (Type'newtype_ struct) = (do
     (GenHelpers.setWordField struct (15 :: Std_.Word16) 0 0 0)
     (Classes.fromStruct struct)
     )
 set_Type'struct :: ((Untyped.RWCtx m s)
-                   ,(Classes.FromStruct (Message.MutMsg s) (Type'struct (Message.MutMsg s)))) => (Type (Message.MutMsg s)) -> (m (Type'struct (Message.MutMsg s)))
+                   ,(Classes.FromStruct (Message.Mut s) (Type'struct (Message.Mut s)))) => (Type (Message.Mut s)) -> (m (Type'struct (Message.Mut s)))
 set_Type'struct (Type'newtype_ struct) = (do
     (GenHelpers.setWordField struct (16 :: Std_.Word16) 0 0 0)
     (Classes.fromStruct struct)
     )
 set_Type'interface :: ((Untyped.RWCtx m s)
-                      ,(Classes.FromStruct (Message.MutMsg s) (Type'interface (Message.MutMsg s)))) => (Type (Message.MutMsg s)) -> (m (Type'interface (Message.MutMsg s)))
+                      ,(Classes.FromStruct (Message.Mut s) (Type'interface (Message.Mut s)))) => (Type (Message.Mut s)) -> (m (Type'interface (Message.Mut s)))
 set_Type'interface (Type'newtype_ struct) = (do
     (GenHelpers.setWordField struct (17 :: Std_.Word16) 0 0 0)
     (Classes.fromStruct struct)
     )
 set_Type'anyPointer :: ((Untyped.RWCtx m s)
-                       ,(Classes.FromStruct (Message.MutMsg s) (Type'anyPointer (Message.MutMsg s)))) => (Type (Message.MutMsg s)) -> (m (Type'anyPointer (Message.MutMsg s)))
+                       ,(Classes.FromStruct (Message.Mut s) (Type'anyPointer (Message.Mut s)))) => (Type (Message.Mut s)) -> (m (Type'anyPointer (Message.Mut s)))
 set_Type'anyPointer (Type'newtype_ struct) = (do
     (GenHelpers.setWordField struct (18 :: Std_.Word16) 0 0 0)
     (Classes.fromStruct struct)
     )
-set_Type'unknown' :: ((Untyped.RWCtx m s)) => (Type (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Type'unknown' :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Type'unknown' (Type'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
 newtype Type'list msg
     = Type'list'newtype_ (Untyped.Struct msg)
@@ -1417,10 +1401,9 @@
     fromStruct struct = (Std_.pure (Type'list'newtype_ struct))
 instance (Classes.ToStruct msg (Type'list msg)) where
     toStruct (Type'list'newtype_ struct) = struct
-instance (Untyped.HasMessage (Type'list msg)) where
-    type InMessage (Type'list msg) = msg
+instance (Untyped.HasMessage (Type'list mut) mut) where
     message (Type'list'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Type'list msg)) where
+instance (Untyped.MessageDefault (Type'list mut) mut) where
     messageDefault msg = (Type'list'newtype_ <$> (Untyped.messageDefault msg))
 get_Type'list'elementType :: ((Untyped.ReadCtx m msg)
                              ,(Classes.FromPtr msg (Type msg))) => (Type'list msg) -> (m (Type msg))
@@ -1429,14 +1412,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Type'list'elementType :: ((Untyped.RWCtx m s)
-                             ,(Classes.ToPtr s (Type (Message.MutMsg s)))) => (Type'list (Message.MutMsg s)) -> (Type (Message.MutMsg s)) -> (m ())
+                             ,(Classes.ToPtr s (Type (Message.Mut s)))) => (Type'list (Message.Mut s)) -> (Type (Message.Mut s)) -> (m ())
 set_Type'list'elementType (Type'list'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Type'list'elementType :: ((Untyped.ReadCtx m msg)) => (Type'list msg) -> (m Std_.Bool)
 has_Type'list'elementType (Type'list'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Type'list'elementType :: ((Untyped.RWCtx m s)) => (Type'list (Message.MutMsg s)) -> (m (Type (Message.MutMsg s)))
+new_Type'list'elementType :: ((Untyped.RWCtx m s)) => (Type'list (Message.Mut s)) -> (m (Type (Message.Mut s)))
 new_Type'list'elementType struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Type'list'elementType struct result)
@@ -1448,14 +1431,13 @@
     fromStruct struct = (Std_.pure (Type'enum'newtype_ struct))
 instance (Classes.ToStruct msg (Type'enum msg)) where
     toStruct (Type'enum'newtype_ struct) = struct
-instance (Untyped.HasMessage (Type'enum msg)) where
-    type InMessage (Type'enum msg) = msg
+instance (Untyped.HasMessage (Type'enum mut) mut) where
     message (Type'enum'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Type'enum msg)) where
+instance (Untyped.MessageDefault (Type'enum mut) mut) where
     messageDefault msg = (Type'enum'newtype_ <$> (Untyped.messageDefault msg))
 get_Type'enum'typeId :: ((Untyped.ReadCtx m msg)) => (Type'enum msg) -> (m Std_.Word64)
 get_Type'enum'typeId (Type'enum'newtype_ struct) = (GenHelpers.getWordField struct 1 0 0)
-set_Type'enum'typeId :: ((Untyped.RWCtx m s)) => (Type'enum (Message.MutMsg s)) -> Std_.Word64 -> (m ())
+set_Type'enum'typeId :: ((Untyped.RWCtx m s)) => (Type'enum (Message.Mut s)) -> Std_.Word64 -> (m ())
 set_Type'enum'typeId (Type'enum'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
 get_Type'enum'brand :: ((Untyped.ReadCtx m msg)
                        ,(Classes.FromPtr msg (Brand msg))) => (Type'enum msg) -> (m (Brand msg))
@@ -1464,14 +1446,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Type'enum'brand :: ((Untyped.RWCtx m s)
-                       ,(Classes.ToPtr s (Brand (Message.MutMsg s)))) => (Type'enum (Message.MutMsg s)) -> (Brand (Message.MutMsg s)) -> (m ())
+                       ,(Classes.ToPtr s (Brand (Message.Mut s)))) => (Type'enum (Message.Mut s)) -> (Brand (Message.Mut s)) -> (m ())
 set_Type'enum'brand (Type'enum'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Type'enum'brand :: ((Untyped.ReadCtx m msg)) => (Type'enum msg) -> (m Std_.Bool)
 has_Type'enum'brand (Type'enum'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Type'enum'brand :: ((Untyped.RWCtx m s)) => (Type'enum (Message.MutMsg s)) -> (m (Brand (Message.MutMsg s)))
+new_Type'enum'brand :: ((Untyped.RWCtx m s)) => (Type'enum (Message.Mut s)) -> (m (Brand (Message.Mut s)))
 new_Type'enum'brand struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Type'enum'brand struct result)
@@ -1483,14 +1465,13 @@
     fromStruct struct = (Std_.pure (Type'struct'newtype_ struct))
 instance (Classes.ToStruct msg (Type'struct msg)) where
     toStruct (Type'struct'newtype_ struct) = struct
-instance (Untyped.HasMessage (Type'struct msg)) where
-    type InMessage (Type'struct msg) = msg
+instance (Untyped.HasMessage (Type'struct mut) mut) where
     message (Type'struct'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Type'struct msg)) where
+instance (Untyped.MessageDefault (Type'struct mut) mut) where
     messageDefault msg = (Type'struct'newtype_ <$> (Untyped.messageDefault msg))
 get_Type'struct'typeId :: ((Untyped.ReadCtx m msg)) => (Type'struct msg) -> (m Std_.Word64)
 get_Type'struct'typeId (Type'struct'newtype_ struct) = (GenHelpers.getWordField struct 1 0 0)
-set_Type'struct'typeId :: ((Untyped.RWCtx m s)) => (Type'struct (Message.MutMsg s)) -> Std_.Word64 -> (m ())
+set_Type'struct'typeId :: ((Untyped.RWCtx m s)) => (Type'struct (Message.Mut s)) -> Std_.Word64 -> (m ())
 set_Type'struct'typeId (Type'struct'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
 get_Type'struct'brand :: ((Untyped.ReadCtx m msg)
                          ,(Classes.FromPtr msg (Brand msg))) => (Type'struct msg) -> (m (Brand msg))
@@ -1499,14 +1480,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Type'struct'brand :: ((Untyped.RWCtx m s)
-                         ,(Classes.ToPtr s (Brand (Message.MutMsg s)))) => (Type'struct (Message.MutMsg s)) -> (Brand (Message.MutMsg s)) -> (m ())
+                         ,(Classes.ToPtr s (Brand (Message.Mut s)))) => (Type'struct (Message.Mut s)) -> (Brand (Message.Mut s)) -> (m ())
 set_Type'struct'brand (Type'struct'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Type'struct'brand :: ((Untyped.ReadCtx m msg)) => (Type'struct msg) -> (m Std_.Bool)
 has_Type'struct'brand (Type'struct'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Type'struct'brand :: ((Untyped.RWCtx m s)) => (Type'struct (Message.MutMsg s)) -> (m (Brand (Message.MutMsg s)))
+new_Type'struct'brand :: ((Untyped.RWCtx m s)) => (Type'struct (Message.Mut s)) -> (m (Brand (Message.Mut s)))
 new_Type'struct'brand struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Type'struct'brand struct result)
@@ -1518,14 +1499,13 @@
     fromStruct struct = (Std_.pure (Type'interface'newtype_ struct))
 instance (Classes.ToStruct msg (Type'interface msg)) where
     toStruct (Type'interface'newtype_ struct) = struct
-instance (Untyped.HasMessage (Type'interface msg)) where
-    type InMessage (Type'interface msg) = msg
+instance (Untyped.HasMessage (Type'interface mut) mut) where
     message (Type'interface'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Type'interface msg)) where
+instance (Untyped.MessageDefault (Type'interface mut) mut) where
     messageDefault msg = (Type'interface'newtype_ <$> (Untyped.messageDefault msg))
 get_Type'interface'typeId :: ((Untyped.ReadCtx m msg)) => (Type'interface msg) -> (m Std_.Word64)
 get_Type'interface'typeId (Type'interface'newtype_ struct) = (GenHelpers.getWordField struct 1 0 0)
-set_Type'interface'typeId :: ((Untyped.RWCtx m s)) => (Type'interface (Message.MutMsg s)) -> Std_.Word64 -> (m ())
+set_Type'interface'typeId :: ((Untyped.RWCtx m s)) => (Type'interface (Message.Mut s)) -> Std_.Word64 -> (m ())
 set_Type'interface'typeId (Type'interface'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
 get_Type'interface'brand :: ((Untyped.ReadCtx m msg)
                             ,(Classes.FromPtr msg (Brand msg))) => (Type'interface msg) -> (m (Brand msg))
@@ -1534,14 +1514,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Type'interface'brand :: ((Untyped.RWCtx m s)
-                            ,(Classes.ToPtr s (Brand (Message.MutMsg s)))) => (Type'interface (Message.MutMsg s)) -> (Brand (Message.MutMsg s)) -> (m ())
+                            ,(Classes.ToPtr s (Brand (Message.Mut s)))) => (Type'interface (Message.Mut s)) -> (Brand (Message.Mut s)) -> (m ())
 set_Type'interface'brand (Type'interface'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Type'interface'brand :: ((Untyped.ReadCtx m msg)) => (Type'interface msg) -> (m Std_.Bool)
 has_Type'interface'brand (Type'interface'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Type'interface'brand :: ((Untyped.RWCtx m s)) => (Type'interface (Message.MutMsg s)) -> (m (Brand (Message.MutMsg s)))
+new_Type'interface'brand :: ((Untyped.RWCtx m s)) => (Type'interface (Message.Mut s)) -> (m (Brand (Message.Mut s)))
 new_Type'interface'brand struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Type'interface'brand struct result)
@@ -1553,17 +1533,16 @@
     fromStruct struct = (Std_.pure (Type'anyPointer'newtype_ struct))
 instance (Classes.ToStruct msg (Type'anyPointer msg)) where
     toStruct (Type'anyPointer'newtype_ struct) = struct
-instance (Untyped.HasMessage (Type'anyPointer msg)) where
-    type InMessage (Type'anyPointer msg) = msg
+instance (Untyped.HasMessage (Type'anyPointer mut) mut) where
     message (Type'anyPointer'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Type'anyPointer msg)) where
+instance (Untyped.MessageDefault (Type'anyPointer mut) mut) where
     messageDefault msg = (Type'anyPointer'newtype_ <$> (Untyped.messageDefault msg))
-data Type'anyPointer' msg
-    = Type'anyPointer'unconstrained (Type'anyPointer'unconstrained msg)
-    | Type'anyPointer'parameter (Type'anyPointer'parameter msg)
-    | Type'anyPointer'implicitMethodParameter (Type'anyPointer'implicitMethodParameter msg)
+data Type'anyPointer' (mut :: Message.Mutability)
+    = Type'anyPointer'unconstrained (Type'anyPointer'unconstrained mut)
+    | Type'anyPointer'parameter (Type'anyPointer'parameter mut)
+    | Type'anyPointer'implicitMethodParameter (Type'anyPointer'implicitMethodParameter mut)
     | Type'anyPointer'unknown' Std_.Word16
-instance (Classes.FromStruct msg (Type'anyPointer' msg)) where
+instance (Classes.FromStruct mut (Type'anyPointer' mut)) where
     fromStruct struct = (do
         tag <- (GenHelpers.getTag struct 4)
         case tag of
@@ -1580,24 +1559,24 @@
                         ,(Classes.FromStruct msg (Type'anyPointer' msg))) => (Type'anyPointer msg) -> (m (Type'anyPointer' msg))
 get_Type'anyPointer' (Type'anyPointer'newtype_ struct) = (Classes.fromStruct struct)
 set_Type'anyPointer'unconstrained :: ((Untyped.RWCtx m s)
-                                     ,(Classes.FromStruct (Message.MutMsg s) (Type'anyPointer'unconstrained (Message.MutMsg s)))) => (Type'anyPointer (Message.MutMsg s)) -> (m (Type'anyPointer'unconstrained (Message.MutMsg s)))
+                                     ,(Classes.FromStruct (Message.Mut s) (Type'anyPointer'unconstrained (Message.Mut s)))) => (Type'anyPointer (Message.Mut s)) -> (m (Type'anyPointer'unconstrained (Message.Mut s)))
 set_Type'anyPointer'unconstrained (Type'anyPointer'newtype_ struct) = (do
     (GenHelpers.setWordField struct (0 :: Std_.Word16) 1 0 0)
     (Classes.fromStruct struct)
     )
 set_Type'anyPointer'parameter :: ((Untyped.RWCtx m s)
-                                 ,(Classes.FromStruct (Message.MutMsg s) (Type'anyPointer'parameter (Message.MutMsg s)))) => (Type'anyPointer (Message.MutMsg s)) -> (m (Type'anyPointer'parameter (Message.MutMsg s)))
+                                 ,(Classes.FromStruct (Message.Mut s) (Type'anyPointer'parameter (Message.Mut s)))) => (Type'anyPointer (Message.Mut s)) -> (m (Type'anyPointer'parameter (Message.Mut s)))
 set_Type'anyPointer'parameter (Type'anyPointer'newtype_ struct) = (do
     (GenHelpers.setWordField struct (1 :: Std_.Word16) 1 0 0)
     (Classes.fromStruct struct)
     )
 set_Type'anyPointer'implicitMethodParameter :: ((Untyped.RWCtx m s)
-                                               ,(Classes.FromStruct (Message.MutMsg s) (Type'anyPointer'implicitMethodParameter (Message.MutMsg s)))) => (Type'anyPointer (Message.MutMsg s)) -> (m (Type'anyPointer'implicitMethodParameter (Message.MutMsg s)))
+                                               ,(Classes.FromStruct (Message.Mut s) (Type'anyPointer'implicitMethodParameter (Message.Mut s)))) => (Type'anyPointer (Message.Mut s)) -> (m (Type'anyPointer'implicitMethodParameter (Message.Mut s)))
 set_Type'anyPointer'implicitMethodParameter (Type'anyPointer'newtype_ struct) = (do
     (GenHelpers.setWordField struct (2 :: Std_.Word16) 1 0 0)
     (Classes.fromStruct struct)
     )
-set_Type'anyPointer'unknown' :: ((Untyped.RWCtx m s)) => (Type'anyPointer (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Type'anyPointer'unknown' :: ((Untyped.RWCtx m s)) => (Type'anyPointer (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Type'anyPointer'unknown' (Type'anyPointer'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 1 0 0)
 newtype Type'anyPointer'unconstrained msg
     = Type'anyPointer'unconstrained'newtype_ (Untyped.Struct msg)
@@ -1605,18 +1584,17 @@
     fromStruct struct = (Std_.pure (Type'anyPointer'unconstrained'newtype_ struct))
 instance (Classes.ToStruct msg (Type'anyPointer'unconstrained msg)) where
     toStruct (Type'anyPointer'unconstrained'newtype_ struct) = struct
-instance (Untyped.HasMessage (Type'anyPointer'unconstrained msg)) where
-    type InMessage (Type'anyPointer'unconstrained msg) = msg
+instance (Untyped.HasMessage (Type'anyPointer'unconstrained mut) mut) where
     message (Type'anyPointer'unconstrained'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Type'anyPointer'unconstrained msg)) where
+instance (Untyped.MessageDefault (Type'anyPointer'unconstrained mut) mut) where
     messageDefault msg = (Type'anyPointer'unconstrained'newtype_ <$> (Untyped.messageDefault msg))
-data Type'anyPointer'unconstrained' msg
+data Type'anyPointer'unconstrained' (mut :: Message.Mutability)
     = Type'anyPointer'unconstrained'anyKind 
     | Type'anyPointer'unconstrained'struct 
     | Type'anyPointer'unconstrained'list 
     | Type'anyPointer'unconstrained'capability 
     | Type'anyPointer'unconstrained'unknown' Std_.Word16
-instance (Classes.FromStruct msg (Type'anyPointer'unconstrained' msg)) where
+instance (Classes.FromStruct mut (Type'anyPointer'unconstrained' mut)) where
     fromStruct struct = (do
         tag <- (GenHelpers.getTag struct 5)
         case tag of
@@ -1634,27 +1612,27 @@
 get_Type'anyPointer'unconstrained' :: ((Untyped.ReadCtx m msg)
                                       ,(Classes.FromStruct msg (Type'anyPointer'unconstrained' msg))) => (Type'anyPointer'unconstrained msg) -> (m (Type'anyPointer'unconstrained' msg))
 get_Type'anyPointer'unconstrained' (Type'anyPointer'unconstrained'newtype_ struct) = (Classes.fromStruct struct)
-set_Type'anyPointer'unconstrained'anyKind :: ((Untyped.RWCtx m s)) => (Type'anyPointer'unconstrained (Message.MutMsg s)) -> (m ())
+set_Type'anyPointer'unconstrained'anyKind :: ((Untyped.RWCtx m s)) => (Type'anyPointer'unconstrained (Message.Mut s)) -> (m ())
 set_Type'anyPointer'unconstrained'anyKind (Type'anyPointer'unconstrained'newtype_ struct) = (do
     (GenHelpers.setWordField struct (0 :: Std_.Word16) 1 16 0)
     (Std_.pure ())
     )
-set_Type'anyPointer'unconstrained'struct :: ((Untyped.RWCtx m s)) => (Type'anyPointer'unconstrained (Message.MutMsg s)) -> (m ())
+set_Type'anyPointer'unconstrained'struct :: ((Untyped.RWCtx m s)) => (Type'anyPointer'unconstrained (Message.Mut s)) -> (m ())
 set_Type'anyPointer'unconstrained'struct (Type'anyPointer'unconstrained'newtype_ struct) = (do
     (GenHelpers.setWordField struct (1 :: Std_.Word16) 1 16 0)
     (Std_.pure ())
     )
-set_Type'anyPointer'unconstrained'list :: ((Untyped.RWCtx m s)) => (Type'anyPointer'unconstrained (Message.MutMsg s)) -> (m ())
+set_Type'anyPointer'unconstrained'list :: ((Untyped.RWCtx m s)) => (Type'anyPointer'unconstrained (Message.Mut s)) -> (m ())
 set_Type'anyPointer'unconstrained'list (Type'anyPointer'unconstrained'newtype_ struct) = (do
     (GenHelpers.setWordField struct (2 :: Std_.Word16) 1 16 0)
     (Std_.pure ())
     )
-set_Type'anyPointer'unconstrained'capability :: ((Untyped.RWCtx m s)) => (Type'anyPointer'unconstrained (Message.MutMsg s)) -> (m ())
+set_Type'anyPointer'unconstrained'capability :: ((Untyped.RWCtx m s)) => (Type'anyPointer'unconstrained (Message.Mut s)) -> (m ())
 set_Type'anyPointer'unconstrained'capability (Type'anyPointer'unconstrained'newtype_ struct) = (do
     (GenHelpers.setWordField struct (3 :: Std_.Word16) 1 16 0)
     (Std_.pure ())
     )
-set_Type'anyPointer'unconstrained'unknown' :: ((Untyped.RWCtx m s)) => (Type'anyPointer'unconstrained (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Type'anyPointer'unconstrained'unknown' :: ((Untyped.RWCtx m s)) => (Type'anyPointer'unconstrained (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Type'anyPointer'unconstrained'unknown' (Type'anyPointer'unconstrained'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 1 16 0)
 newtype Type'anyPointer'parameter msg
     = Type'anyPointer'parameter'newtype_ (Untyped.Struct msg)
@@ -1662,18 +1640,17 @@
     fromStruct struct = (Std_.pure (Type'anyPointer'parameter'newtype_ struct))
 instance (Classes.ToStruct msg (Type'anyPointer'parameter msg)) where
     toStruct (Type'anyPointer'parameter'newtype_ struct) = struct
-instance (Untyped.HasMessage (Type'anyPointer'parameter msg)) where
-    type InMessage (Type'anyPointer'parameter msg) = msg
+instance (Untyped.HasMessage (Type'anyPointer'parameter mut) mut) where
     message (Type'anyPointer'parameter'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Type'anyPointer'parameter msg)) where
+instance (Untyped.MessageDefault (Type'anyPointer'parameter mut) mut) where
     messageDefault msg = (Type'anyPointer'parameter'newtype_ <$> (Untyped.messageDefault msg))
 get_Type'anyPointer'parameter'scopeId :: ((Untyped.ReadCtx m msg)) => (Type'anyPointer'parameter msg) -> (m Std_.Word64)
 get_Type'anyPointer'parameter'scopeId (Type'anyPointer'parameter'newtype_ struct) = (GenHelpers.getWordField struct 2 0 0)
-set_Type'anyPointer'parameter'scopeId :: ((Untyped.RWCtx m s)) => (Type'anyPointer'parameter (Message.MutMsg s)) -> Std_.Word64 -> (m ())
+set_Type'anyPointer'parameter'scopeId :: ((Untyped.RWCtx m s)) => (Type'anyPointer'parameter (Message.Mut s)) -> Std_.Word64 -> (m ())
 set_Type'anyPointer'parameter'scopeId (Type'anyPointer'parameter'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 2 0 0)
 get_Type'anyPointer'parameter'parameterIndex :: ((Untyped.ReadCtx m msg)) => (Type'anyPointer'parameter msg) -> (m Std_.Word16)
 get_Type'anyPointer'parameter'parameterIndex (Type'anyPointer'parameter'newtype_ struct) = (GenHelpers.getWordField struct 1 16 0)
-set_Type'anyPointer'parameter'parameterIndex :: ((Untyped.RWCtx m s)) => (Type'anyPointer'parameter (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Type'anyPointer'parameter'parameterIndex :: ((Untyped.RWCtx m s)) => (Type'anyPointer'parameter (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Type'anyPointer'parameter'parameterIndex (Type'anyPointer'parameter'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 1 16 0)
 newtype Type'anyPointer'implicitMethodParameter msg
     = Type'anyPointer'implicitMethodParameter'newtype_ (Untyped.Struct msg)
@@ -1681,14 +1658,13 @@
     fromStruct struct = (Std_.pure (Type'anyPointer'implicitMethodParameter'newtype_ struct))
 instance (Classes.ToStruct msg (Type'anyPointer'implicitMethodParameter msg)) where
     toStruct (Type'anyPointer'implicitMethodParameter'newtype_ struct) = struct
-instance (Untyped.HasMessage (Type'anyPointer'implicitMethodParameter msg)) where
-    type InMessage (Type'anyPointer'implicitMethodParameter msg) = msg
+instance (Untyped.HasMessage (Type'anyPointer'implicitMethodParameter mut) mut) where
     message (Type'anyPointer'implicitMethodParameter'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Type'anyPointer'implicitMethodParameter msg)) where
+instance (Untyped.MessageDefault (Type'anyPointer'implicitMethodParameter mut) mut) where
     messageDefault msg = (Type'anyPointer'implicitMethodParameter'newtype_ <$> (Untyped.messageDefault msg))
 get_Type'anyPointer'implicitMethodParameter'parameterIndex :: ((Untyped.ReadCtx m msg)) => (Type'anyPointer'implicitMethodParameter msg) -> (m Std_.Word16)
 get_Type'anyPointer'implicitMethodParameter'parameterIndex (Type'anyPointer'implicitMethodParameter'newtype_ struct) = (GenHelpers.getWordField struct 1 16 0)
-set_Type'anyPointer'implicitMethodParameter'parameterIndex :: ((Untyped.RWCtx m s)) => (Type'anyPointer'implicitMethodParameter (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Type'anyPointer'implicitMethodParameter'parameterIndex :: ((Untyped.RWCtx m s)) => (Type'anyPointer'implicitMethodParameter (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Type'anyPointer'implicitMethodParameter'parameterIndex (Type'anyPointer'implicitMethodParameter'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 1 16 0)
 newtype Brand msg
     = Brand'newtype_ (Untyped.Struct msg)
@@ -1696,20 +1672,19 @@
     fromStruct struct = (Std_.pure (Brand'newtype_ struct))
 instance (Classes.ToStruct msg (Brand msg)) where
     toStruct (Brand'newtype_ struct) = struct
-instance (Untyped.HasMessage (Brand msg)) where
-    type InMessage (Brand msg) = msg
+instance (Untyped.HasMessage (Brand mut) mut) where
     message (Brand'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Brand msg)) where
+instance (Untyped.MessageDefault (Brand mut) mut) where
     messageDefault msg = (Brand'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Brand msg)) where
     fromPtr msg ptr = (Brand'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Brand (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Brand (Message.Mut s))) where
     toPtr msg (Brand'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Brand (Message.MutMsg s))) where
+instance (Classes.Allocate s (Brand (Message.Mut s))) where
     new msg = (Brand'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Brand msg)) where
-    newtype List msg (Brand msg)
-        = Brand'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Brand mut)) where
+    newtype List mut (Brand mut)
+        = Brand'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Brand'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Brand'List_ l) = (Untyped.ListStruct l)
     length (Brand'List_ l) = (Untyped.length l)
@@ -1717,7 +1692,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Brand (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Brand (Message.Mut s))) where
     setIndex (Brand'newtype_ elt) i (Brand'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Brand'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
 get_Brand'scopes :: ((Untyped.ReadCtx m msg)
@@ -1727,14 +1702,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Brand'scopes :: ((Untyped.RWCtx m s)
-                    ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Brand'Scope (Message.MutMsg s))))) => (Brand (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Brand'Scope (Message.MutMsg s))) -> (m ())
+                    ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Brand'Scope (Message.Mut s))))) => (Brand (Message.Mut s)) -> (Basics.List (Message.Mut s) (Brand'Scope (Message.Mut s))) -> (m ())
 set_Brand'scopes (Brand'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Brand'scopes :: ((Untyped.ReadCtx m msg)) => (Brand msg) -> (m Std_.Bool)
 has_Brand'scopes (Brand'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Brand'scopes :: ((Untyped.RWCtx m s)) => Std_.Int -> (Brand (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Brand'Scope (Message.MutMsg s))))
+new_Brand'scopes :: ((Untyped.RWCtx m s)) => Std_.Int -> (Brand (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Brand'Scope (Message.Mut s))))
 new_Brand'scopes len struct = (do
     result <- (Classes.newList (Untyped.message struct) len)
     (set_Brand'scopes struct result)
@@ -1746,20 +1721,19 @@
     fromStruct struct = (Std_.pure (Brand'Scope'newtype_ struct))
 instance (Classes.ToStruct msg (Brand'Scope msg)) where
     toStruct (Brand'Scope'newtype_ struct) = struct
-instance (Untyped.HasMessage (Brand'Scope msg)) where
-    type InMessage (Brand'Scope msg) = msg
+instance (Untyped.HasMessage (Brand'Scope mut) mut) where
     message (Brand'Scope'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Brand'Scope msg)) where
+instance (Untyped.MessageDefault (Brand'Scope mut) mut) where
     messageDefault msg = (Brand'Scope'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Brand'Scope msg)) where
     fromPtr msg ptr = (Brand'Scope'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Brand'Scope (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Brand'Scope (Message.Mut s))) where
     toPtr msg (Brand'Scope'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Brand'Scope (Message.MutMsg s))) where
+instance (Classes.Allocate s (Brand'Scope (Message.Mut s))) where
     new msg = (Brand'Scope'newtype_ <$> (Untyped.allocStruct msg 2 1))
-instance (Basics.ListElem msg (Brand'Scope msg)) where
-    newtype List msg (Brand'Scope msg)
-        = Brand'Scope'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Brand'Scope mut)) where
+    newtype List mut (Brand'Scope mut)
+        = Brand'Scope'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Brand'Scope'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Brand'Scope'List_ l) = (Untyped.ListStruct l)
     length (Brand'Scope'List_ l) = (Untyped.length l)
@@ -1767,18 +1741,18 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Brand'Scope (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Brand'Scope (Message.Mut s))) where
     setIndex (Brand'Scope'newtype_ elt) i (Brand'Scope'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Brand'Scope'List_ <$> (Untyped.allocCompositeList msg 2 1 len))
 get_Brand'Scope'scopeId :: ((Untyped.ReadCtx m msg)) => (Brand'Scope msg) -> (m Std_.Word64)
 get_Brand'Scope'scopeId (Brand'Scope'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Brand'Scope'scopeId :: ((Untyped.RWCtx m s)) => (Brand'Scope (Message.MutMsg s)) -> Std_.Word64 -> (m ())
+set_Brand'Scope'scopeId :: ((Untyped.RWCtx m s)) => (Brand'Scope (Message.Mut s)) -> Std_.Word64 -> (m ())
 set_Brand'Scope'scopeId (Brand'Scope'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 0 0 0)
-data Brand'Scope' msg
-    = Brand'Scope'bind (Basics.List msg (Brand'Binding msg))
+data Brand'Scope' (mut :: Message.Mutability)
+    = Brand'Scope'bind (Basics.List mut (Brand'Binding mut))
     | Brand'Scope'inherit 
     | Brand'Scope'unknown' Std_.Word16
-instance (Classes.FromStruct msg (Brand'Scope' msg)) where
+instance (Classes.FromStruct mut (Brand'Scope' mut)) where
     fromStruct struct = (do
         tag <- (GenHelpers.getTag struct 4)
         case tag of
@@ -1796,7 +1770,7 @@
                     ,(Classes.FromStruct msg (Brand'Scope' msg))) => (Brand'Scope msg) -> (m (Brand'Scope' msg))
 get_Brand'Scope' (Brand'Scope'newtype_ struct) = (Classes.fromStruct struct)
 set_Brand'Scope'bind :: ((Untyped.RWCtx m s)
-                        ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Brand'Binding (Message.MutMsg s))))) => (Brand'Scope (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Brand'Binding (Message.MutMsg s))) -> (m ())
+                        ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Brand'Binding (Message.Mut s))))) => (Brand'Scope (Message.Mut s)) -> (Basics.List (Message.Mut s) (Brand'Binding (Message.Mut s))) -> (m ())
 set_Brand'Scope'bind (Brand'Scope'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (0 :: Std_.Word16) 1 0 0)
     (do
@@ -1804,12 +1778,12 @@
         (Untyped.setPtr ptr 0 struct)
         )
     )
-set_Brand'Scope'inherit :: ((Untyped.RWCtx m s)) => (Brand'Scope (Message.MutMsg s)) -> (m ())
+set_Brand'Scope'inherit :: ((Untyped.RWCtx m s)) => (Brand'Scope (Message.Mut s)) -> (m ())
 set_Brand'Scope'inherit (Brand'Scope'newtype_ struct) = (do
     (GenHelpers.setWordField struct (1 :: Std_.Word16) 1 0 0)
     (Std_.pure ())
     )
-set_Brand'Scope'unknown' :: ((Untyped.RWCtx m s)) => (Brand'Scope (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Brand'Scope'unknown' :: ((Untyped.RWCtx m s)) => (Brand'Scope (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Brand'Scope'unknown' (Brand'Scope'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 1 0 0)
 newtype Brand'Binding msg
     = Brand'Binding'newtype_ (Untyped.Struct msg)
@@ -1817,20 +1791,19 @@
     fromStruct struct = (Std_.pure (Brand'Binding'newtype_ struct))
 instance (Classes.ToStruct msg (Brand'Binding msg)) where
     toStruct (Brand'Binding'newtype_ struct) = struct
-instance (Untyped.HasMessage (Brand'Binding msg)) where
-    type InMessage (Brand'Binding msg) = msg
+instance (Untyped.HasMessage (Brand'Binding mut) mut) where
     message (Brand'Binding'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Brand'Binding msg)) where
+instance (Untyped.MessageDefault (Brand'Binding mut) mut) where
     messageDefault msg = (Brand'Binding'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Brand'Binding msg)) where
     fromPtr msg ptr = (Brand'Binding'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Brand'Binding (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Brand'Binding (Message.Mut s))) where
     toPtr msg (Brand'Binding'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Brand'Binding (Message.MutMsg s))) where
+instance (Classes.Allocate s (Brand'Binding (Message.Mut s))) where
     new msg = (Brand'Binding'newtype_ <$> (Untyped.allocStruct msg 1 1))
-instance (Basics.ListElem msg (Brand'Binding msg)) where
-    newtype List msg (Brand'Binding msg)
-        = Brand'Binding'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Brand'Binding mut)) where
+    newtype List mut (Brand'Binding mut)
+        = Brand'Binding'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Brand'Binding'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Brand'Binding'List_ l) = (Untyped.ListStruct l)
     length (Brand'Binding'List_ l) = (Untyped.length l)
@@ -1838,14 +1811,14 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Brand'Binding (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Brand'Binding (Message.Mut s))) where
     setIndex (Brand'Binding'newtype_ elt) i (Brand'Binding'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Brand'Binding'List_ <$> (Untyped.allocCompositeList msg 1 1 len))
-data Brand'Binding' msg
+data Brand'Binding' (mut :: Message.Mutability)
     = Brand'Binding'unbound 
-    | Brand'Binding'type_ (Type msg)
+    | Brand'Binding'type_ (Type mut)
     | Brand'Binding'unknown' Std_.Word16
-instance (Classes.FromStruct msg (Brand'Binding' msg)) where
+instance (Classes.FromStruct mut (Brand'Binding' mut)) where
     fromStruct struct = (do
         tag <- (GenHelpers.getTag struct 0)
         case tag of
@@ -1862,13 +1835,13 @@
 get_Brand'Binding' :: ((Untyped.ReadCtx m msg)
                       ,(Classes.FromStruct msg (Brand'Binding' msg))) => (Brand'Binding msg) -> (m (Brand'Binding' msg))
 get_Brand'Binding' (Brand'Binding'newtype_ struct) = (Classes.fromStruct struct)
-set_Brand'Binding'unbound :: ((Untyped.RWCtx m s)) => (Brand'Binding (Message.MutMsg s)) -> (m ())
+set_Brand'Binding'unbound :: ((Untyped.RWCtx m s)) => (Brand'Binding (Message.Mut s)) -> (m ())
 set_Brand'Binding'unbound (Brand'Binding'newtype_ struct) = (do
     (GenHelpers.setWordField struct (0 :: Std_.Word16) 0 0 0)
     (Std_.pure ())
     )
 set_Brand'Binding'type_ :: ((Untyped.RWCtx m s)
-                           ,(Classes.ToPtr s (Type (Message.MutMsg s)))) => (Brand'Binding (Message.MutMsg s)) -> (Type (Message.MutMsg s)) -> (m ())
+                           ,(Classes.ToPtr s (Type (Message.Mut s)))) => (Brand'Binding (Message.Mut s)) -> (Type (Message.Mut s)) -> (m ())
 set_Brand'Binding'type_ (Brand'Binding'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (1 :: Std_.Word16) 0 0 0)
     (do
@@ -1876,7 +1849,7 @@
         (Untyped.setPtr ptr 0 struct)
         )
     )
-set_Brand'Binding'unknown' :: ((Untyped.RWCtx m s)) => (Brand'Binding (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Brand'Binding'unknown' :: ((Untyped.RWCtx m s)) => (Brand'Binding (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Brand'Binding'unknown' (Brand'Binding'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
 newtype Value msg
     = Value'newtype_ (Untyped.Struct msg)
@@ -1884,20 +1857,19 @@
     fromStruct struct = (Std_.pure (Value'newtype_ struct))
 instance (Classes.ToStruct msg (Value msg)) where
     toStruct (Value'newtype_ struct) = struct
-instance (Untyped.HasMessage (Value msg)) where
-    type InMessage (Value msg) = msg
+instance (Untyped.HasMessage (Value mut) mut) where
     message (Value'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Value msg)) where
+instance (Untyped.MessageDefault (Value mut) mut) where
     messageDefault msg = (Value'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Value msg)) where
     fromPtr msg ptr = (Value'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Value (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Value (Message.Mut s))) where
     toPtr msg (Value'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Value (Message.MutMsg s))) where
+instance (Classes.Allocate s (Value (Message.Mut s))) where
     new msg = (Value'newtype_ <$> (Untyped.allocStruct msg 2 1))
-instance (Basics.ListElem msg (Value msg)) where
-    newtype List msg (Value msg)
-        = Value'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Value mut)) where
+    newtype List mut (Value mut)
+        = Value'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Value'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Value'List_ l) = (Untyped.ListStruct l)
     length (Value'List_ l) = (Untyped.length l)
@@ -1905,10 +1877,10 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Value (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Value (Message.Mut s))) where
     setIndex (Value'newtype_ elt) i (Value'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Value'List_ <$> (Untyped.allocCompositeList msg 2 1 len))
-data Value' msg
+data Value' (mut :: Message.Mutability)
     = Value'void 
     | Value'bool Std_.Bool
     | Value'int8 Std_.Int8
@@ -1921,15 +1893,15 @@
     | Value'uint64 Std_.Word64
     | Value'float32 Std_.Float
     | Value'float64 Std_.Double
-    | Value'text (Basics.Text msg)
-    | Value'data_ (Basics.Data msg)
-    | Value'list (Std_.Maybe (Untyped.Ptr msg))
+    | Value'text (Basics.Text mut)
+    | Value'data_ (Basics.Data mut)
+    | Value'list (Std_.Maybe (Untyped.Ptr mut))
     | Value'enum Std_.Word16
-    | Value'struct (Std_.Maybe (Untyped.Ptr msg))
+    | Value'struct (Std_.Maybe (Untyped.Ptr mut))
     | Value'interface 
-    | Value'anyPointer (Std_.Maybe (Untyped.Ptr msg))
+    | Value'anyPointer (Std_.Maybe (Untyped.Ptr mut))
     | Value'unknown' Std_.Word16
-instance (Classes.FromStruct msg (Value' msg)) where
+instance (Classes.FromStruct mut (Value' mut)) where
     fromStruct struct = (do
         tag <- (GenHelpers.getTag struct 0)
         case tag of
@@ -1992,68 +1964,68 @@
 get_Value' :: ((Untyped.ReadCtx m msg)
               ,(Classes.FromStruct msg (Value' msg))) => (Value msg) -> (m (Value' msg))
 get_Value' (Value'newtype_ struct) = (Classes.fromStruct struct)
-set_Value'void :: ((Untyped.RWCtx m s)) => (Value (Message.MutMsg s)) -> (m ())
+set_Value'void :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> (m ())
 set_Value'void (Value'newtype_ struct) = (do
     (GenHelpers.setWordField struct (0 :: Std_.Word16) 0 0 0)
     (Std_.pure ())
     )
-set_Value'bool :: ((Untyped.RWCtx m s)) => (Value (Message.MutMsg s)) -> Std_.Bool -> (m ())
+set_Value'bool :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Bool -> (m ())
 set_Value'bool (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (1 :: Std_.Word16) 0 0 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 0 16 0)
     )
-set_Value'int8 :: ((Untyped.RWCtx m s)) => (Value (Message.MutMsg s)) -> Std_.Int8 -> (m ())
+set_Value'int8 :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Int8 -> (m ())
 set_Value'int8 (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (2 :: Std_.Word16) 0 0 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word8) 0 16 0)
     )
-set_Value'int16 :: ((Untyped.RWCtx m s)) => (Value (Message.MutMsg s)) -> Std_.Int16 -> (m ())
+set_Value'int16 :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Int16 -> (m ())
 set_Value'int16 (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (3 :: Std_.Word16) 0 0 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 16 0)
     )
-set_Value'int32 :: ((Untyped.RWCtx m s)) => (Value (Message.MutMsg s)) -> Std_.Int32 -> (m ())
+set_Value'int32 :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Int32 -> (m ())
 set_Value'int32 (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (4 :: Std_.Word16) 0 0 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 32 0)
     )
-set_Value'int64 :: ((Untyped.RWCtx m s)) => (Value (Message.MutMsg s)) -> Std_.Int64 -> (m ())
+set_Value'int64 :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Int64 -> (m ())
 set_Value'int64 (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (5 :: Std_.Word16) 0 0 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
     )
-set_Value'uint8 :: ((Untyped.RWCtx m s)) => (Value (Message.MutMsg s)) -> Std_.Word8 -> (m ())
+set_Value'uint8 :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Word8 -> (m ())
 set_Value'uint8 (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (6 :: Std_.Word16) 0 0 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word8) 0 16 0)
     )
-set_Value'uint16 :: ((Untyped.RWCtx m s)) => (Value (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Value'uint16 :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Value'uint16 (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (7 :: Std_.Word16) 0 0 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 16 0)
     )
-set_Value'uint32 :: ((Untyped.RWCtx m s)) => (Value (Message.MutMsg s)) -> Std_.Word32 -> (m ())
+set_Value'uint32 :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Word32 -> (m ())
 set_Value'uint32 (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (8 :: Std_.Word16) 0 0 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 32 0)
     )
-set_Value'uint64 :: ((Untyped.RWCtx m s)) => (Value (Message.MutMsg s)) -> Std_.Word64 -> (m ())
+set_Value'uint64 :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Word64 -> (m ())
 set_Value'uint64 (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (9 :: Std_.Word16) 0 0 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
     )
-set_Value'float32 :: ((Untyped.RWCtx m s)) => (Value (Message.MutMsg s)) -> Std_.Float -> (m ())
+set_Value'float32 :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Float -> (m ())
 set_Value'float32 (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (10 :: Std_.Word16) 0 0 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 32 0)
     )
-set_Value'float64 :: ((Untyped.RWCtx m s)) => (Value (Message.MutMsg s)) -> Std_.Double -> (m ())
+set_Value'float64 :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Double -> (m ())
 set_Value'float64 (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (11 :: Std_.Word16) 0 0 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
     )
 set_Value'text :: ((Untyped.RWCtx m s)
-                  ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (Value (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
+                  ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Value (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
 set_Value'text (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (12 :: Std_.Word16) 0 0 0)
     (do
@@ -2062,7 +2034,7 @@
         )
     )
 set_Value'data_ :: ((Untyped.RWCtx m s)
-                   ,(Classes.ToPtr s (Basics.Data (Message.MutMsg s)))) => (Value (Message.MutMsg s)) -> (Basics.Data (Message.MutMsg s)) -> (m ())
+                   ,(Classes.ToPtr s (Basics.Data (Message.Mut s)))) => (Value (Message.Mut s)) -> (Basics.Data (Message.Mut s)) -> (m ())
 set_Value'data_ (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (13 :: Std_.Word16) 0 0 0)
     (do
@@ -2071,7 +2043,7 @@
         )
     )
 set_Value'list :: ((Untyped.RWCtx m s)
-                  ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))))) => (Value (Message.MutMsg s)) -> (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))) -> (m ())
+                  ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.Mut s))))) => (Value (Message.Mut s)) -> (Std_.Maybe (Untyped.Ptr (Message.Mut s))) -> (m ())
 set_Value'list (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (14 :: Std_.Word16) 0 0 0)
     (do
@@ -2079,13 +2051,13 @@
         (Untyped.setPtr ptr 0 struct)
         )
     )
-set_Value'enum :: ((Untyped.RWCtx m s)) => (Value (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Value'enum :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Value'enum (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (15 :: Std_.Word16) 0 0 0)
     (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 16 0)
     )
 set_Value'struct :: ((Untyped.RWCtx m s)
-                    ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))))) => (Value (Message.MutMsg s)) -> (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))) -> (m ())
+                    ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.Mut s))))) => (Value (Message.Mut s)) -> (Std_.Maybe (Untyped.Ptr (Message.Mut s))) -> (m ())
 set_Value'struct (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (16 :: Std_.Word16) 0 0 0)
     (do
@@ -2093,13 +2065,13 @@
         (Untyped.setPtr ptr 0 struct)
         )
     )
-set_Value'interface :: ((Untyped.RWCtx m s)) => (Value (Message.MutMsg s)) -> (m ())
+set_Value'interface :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> (m ())
 set_Value'interface (Value'newtype_ struct) = (do
     (GenHelpers.setWordField struct (17 :: Std_.Word16) 0 0 0)
     (Std_.pure ())
     )
 set_Value'anyPointer :: ((Untyped.RWCtx m s)
-                        ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))))) => (Value (Message.MutMsg s)) -> (Std_.Maybe (Untyped.Ptr (Message.MutMsg s))) -> (m ())
+                        ,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.Mut s))))) => (Value (Message.Mut s)) -> (Std_.Maybe (Untyped.Ptr (Message.Mut s))) -> (m ())
 set_Value'anyPointer (Value'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (18 :: Std_.Word16) 0 0 0)
     (do
@@ -2107,7 +2079,7 @@
         (Untyped.setPtr ptr 0 struct)
         )
     )
-set_Value'unknown' :: ((Untyped.RWCtx m s)) => (Value (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Value'unknown' :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Value'unknown' (Value'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
 newtype Annotation msg
     = Annotation'newtype_ (Untyped.Struct msg)
@@ -2115,20 +2087,19 @@
     fromStruct struct = (Std_.pure (Annotation'newtype_ struct))
 instance (Classes.ToStruct msg (Annotation msg)) where
     toStruct (Annotation'newtype_ struct) = struct
-instance (Untyped.HasMessage (Annotation msg)) where
-    type InMessage (Annotation msg) = msg
+instance (Untyped.HasMessage (Annotation mut) mut) where
     message (Annotation'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Annotation msg)) where
+instance (Untyped.MessageDefault (Annotation mut) mut) where
     messageDefault msg = (Annotation'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Annotation msg)) where
     fromPtr msg ptr = (Annotation'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Annotation (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Annotation (Message.Mut s))) where
     toPtr msg (Annotation'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Annotation (Message.MutMsg s))) where
+instance (Classes.Allocate s (Annotation (Message.Mut s))) where
     new msg = (Annotation'newtype_ <$> (Untyped.allocStruct msg 1 2))
-instance (Basics.ListElem msg (Annotation msg)) where
-    newtype List msg (Annotation msg)
-        = Annotation'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Annotation mut)) where
+    newtype List mut (Annotation mut)
+        = Annotation'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Annotation'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Annotation'List_ l) = (Untyped.ListStruct l)
     length (Annotation'List_ l) = (Untyped.length l)
@@ -2136,12 +2107,12 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Annotation (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Annotation (Message.Mut s))) where
     setIndex (Annotation'newtype_ elt) i (Annotation'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Annotation'List_ <$> (Untyped.allocCompositeList msg 1 2 len))
 get_Annotation'id :: ((Untyped.ReadCtx m msg)) => (Annotation msg) -> (m Std_.Word64)
 get_Annotation'id (Annotation'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Annotation'id :: ((Untyped.RWCtx m s)) => (Annotation (Message.MutMsg s)) -> Std_.Word64 -> (m ())
+set_Annotation'id :: ((Untyped.RWCtx m s)) => (Annotation (Message.Mut s)) -> Std_.Word64 -> (m ())
 set_Annotation'id (Annotation'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 0 0 0)
 get_Annotation'value :: ((Untyped.ReadCtx m msg)
                         ,(Classes.FromPtr msg (Value msg))) => (Annotation msg) -> (m (Value msg))
@@ -2150,14 +2121,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Annotation'value :: ((Untyped.RWCtx m s)
-                        ,(Classes.ToPtr s (Value (Message.MutMsg s)))) => (Annotation (Message.MutMsg s)) -> (Value (Message.MutMsg s)) -> (m ())
+                        ,(Classes.ToPtr s (Value (Message.Mut s)))) => (Annotation (Message.Mut s)) -> (Value (Message.Mut s)) -> (m ())
 set_Annotation'value (Annotation'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Annotation'value :: ((Untyped.ReadCtx m msg)) => (Annotation msg) -> (m Std_.Bool)
 has_Annotation'value (Annotation'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Annotation'value :: ((Untyped.RWCtx m s)) => (Annotation (Message.MutMsg s)) -> (m (Value (Message.MutMsg s)))
+new_Annotation'value :: ((Untyped.RWCtx m s)) => (Annotation (Message.Mut s)) -> (m (Value (Message.Mut s)))
 new_Annotation'value struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Annotation'value struct result)
@@ -2170,14 +2141,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Annotation'brand :: ((Untyped.RWCtx m s)
-                        ,(Classes.ToPtr s (Brand (Message.MutMsg s)))) => (Annotation (Message.MutMsg s)) -> (Brand (Message.MutMsg s)) -> (m ())
+                        ,(Classes.ToPtr s (Brand (Message.Mut s)))) => (Annotation (Message.Mut s)) -> (Brand (Message.Mut s)) -> (m ())
 set_Annotation'brand (Annotation'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 1 struct)
     )
 has_Annotation'brand :: ((Untyped.ReadCtx m msg)) => (Annotation msg) -> (m Std_.Bool)
 has_Annotation'brand (Annotation'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_Annotation'brand :: ((Untyped.RWCtx m s)) => (Annotation (Message.MutMsg s)) -> (m (Brand (Message.MutMsg s)))
+new_Annotation'brand :: ((Untyped.RWCtx m s)) => (Annotation (Message.Mut s)) -> (m (Brand (Message.Mut s)))
 new_Annotation'brand struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Annotation'brand struct result)
@@ -2229,9 +2200,9 @@
 instance (Std_.Enum ElementSize) where
     fromEnum x = (Std_.fromIntegral (Classes.toWord x))
     toEnum x = (Classes.fromWord (Std_.fromIntegral x))
-instance (Basics.ListElem msg ElementSize) where
-    newtype List msg ElementSize
-        = ElementSize'List_ (Untyped.ListOf msg Std_.Word16)
+instance (Basics.ListElem mut ElementSize) where
+    newtype List mut ElementSize
+        = ElementSize'List_ (Untyped.ListOf mut Std_.Word16)
     index i (ElementSize'List_ l) = (Classes.fromWord <$> (Std_.fromIntegral <$> (Untyped.index i l)))
     listFromPtr msg ptr = (ElementSize'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (ElementSize'List_ l) = (Untyped.List16 l)
@@ -2245,20 +2216,19 @@
     fromStruct struct = (Std_.pure (CapnpVersion'newtype_ struct))
 instance (Classes.ToStruct msg (CapnpVersion msg)) where
     toStruct (CapnpVersion'newtype_ struct) = struct
-instance (Untyped.HasMessage (CapnpVersion msg)) where
-    type InMessage (CapnpVersion msg) = msg
+instance (Untyped.HasMessage (CapnpVersion mut) mut) where
     message (CapnpVersion'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (CapnpVersion msg)) where
+instance (Untyped.MessageDefault (CapnpVersion mut) mut) where
     messageDefault msg = (CapnpVersion'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (CapnpVersion msg)) where
     fromPtr msg ptr = (CapnpVersion'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (CapnpVersion (Message.MutMsg s))) where
+instance (Classes.ToPtr s (CapnpVersion (Message.Mut s))) where
     toPtr msg (CapnpVersion'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (CapnpVersion (Message.MutMsg s))) where
+instance (Classes.Allocate s (CapnpVersion (Message.Mut s))) where
     new msg = (CapnpVersion'newtype_ <$> (Untyped.allocStruct msg 1 0))
-instance (Basics.ListElem msg (CapnpVersion msg)) where
-    newtype List msg (CapnpVersion msg)
-        = CapnpVersion'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (CapnpVersion mut)) where
+    newtype List mut (CapnpVersion mut)
+        = CapnpVersion'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (CapnpVersion'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (CapnpVersion'List_ l) = (Untyped.ListStruct l)
     length (CapnpVersion'List_ l) = (Untyped.length l)
@@ -2266,20 +2236,20 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (CapnpVersion (Message.MutMsg s))) where
+instance (Basics.MutListElem s (CapnpVersion (Message.Mut s))) where
     setIndex (CapnpVersion'newtype_ elt) i (CapnpVersion'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (CapnpVersion'List_ <$> (Untyped.allocCompositeList msg 1 0 len))
 get_CapnpVersion'major :: ((Untyped.ReadCtx m msg)) => (CapnpVersion msg) -> (m Std_.Word16)
 get_CapnpVersion'major (CapnpVersion'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_CapnpVersion'major :: ((Untyped.RWCtx m s)) => (CapnpVersion (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_CapnpVersion'major :: ((Untyped.RWCtx m s)) => (CapnpVersion (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_CapnpVersion'major (CapnpVersion'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
 get_CapnpVersion'minor :: ((Untyped.ReadCtx m msg)) => (CapnpVersion msg) -> (m Std_.Word8)
 get_CapnpVersion'minor (CapnpVersion'newtype_ struct) = (GenHelpers.getWordField struct 0 16 0)
-set_CapnpVersion'minor :: ((Untyped.RWCtx m s)) => (CapnpVersion (Message.MutMsg s)) -> Std_.Word8 -> (m ())
+set_CapnpVersion'minor :: ((Untyped.RWCtx m s)) => (CapnpVersion (Message.Mut s)) -> Std_.Word8 -> (m ())
 set_CapnpVersion'minor (CapnpVersion'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word8) 0 16 0)
 get_CapnpVersion'micro :: ((Untyped.ReadCtx m msg)) => (CapnpVersion msg) -> (m Std_.Word8)
 get_CapnpVersion'micro (CapnpVersion'newtype_ struct) = (GenHelpers.getWordField struct 0 24 0)
-set_CapnpVersion'micro :: ((Untyped.RWCtx m s)) => (CapnpVersion (Message.MutMsg s)) -> Std_.Word8 -> (m ())
+set_CapnpVersion'micro :: ((Untyped.RWCtx m s)) => (CapnpVersion (Message.Mut s)) -> Std_.Word8 -> (m ())
 set_CapnpVersion'micro (CapnpVersion'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word8) 0 24 0)
 newtype CodeGeneratorRequest msg
     = CodeGeneratorRequest'newtype_ (Untyped.Struct msg)
@@ -2287,20 +2257,19 @@
     fromStruct struct = (Std_.pure (CodeGeneratorRequest'newtype_ struct))
 instance (Classes.ToStruct msg (CodeGeneratorRequest msg)) where
     toStruct (CodeGeneratorRequest'newtype_ struct) = struct
-instance (Untyped.HasMessage (CodeGeneratorRequest msg)) where
-    type InMessage (CodeGeneratorRequest msg) = msg
+instance (Untyped.HasMessage (CodeGeneratorRequest mut) mut) where
     message (CodeGeneratorRequest'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (CodeGeneratorRequest msg)) where
+instance (Untyped.MessageDefault (CodeGeneratorRequest mut) mut) where
     messageDefault msg = (CodeGeneratorRequest'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (CodeGeneratorRequest msg)) where
     fromPtr msg ptr = (CodeGeneratorRequest'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (CodeGeneratorRequest (Message.MutMsg s))) where
+instance (Classes.ToPtr s (CodeGeneratorRequest (Message.Mut s))) where
     toPtr msg (CodeGeneratorRequest'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (CodeGeneratorRequest (Message.MutMsg s))) where
+instance (Classes.Allocate s (CodeGeneratorRequest (Message.Mut s))) where
     new msg = (CodeGeneratorRequest'newtype_ <$> (Untyped.allocStruct msg 0 4))
-instance (Basics.ListElem msg (CodeGeneratorRequest msg)) where
-    newtype List msg (CodeGeneratorRequest msg)
-        = CodeGeneratorRequest'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (CodeGeneratorRequest mut)) where
+    newtype List mut (CodeGeneratorRequest mut)
+        = CodeGeneratorRequest'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (CodeGeneratorRequest'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (CodeGeneratorRequest'List_ l) = (Untyped.ListStruct l)
     length (CodeGeneratorRequest'List_ l) = (Untyped.length l)
@@ -2308,7 +2277,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (CodeGeneratorRequest (Message.MutMsg s))) where
+instance (Basics.MutListElem s (CodeGeneratorRequest (Message.Mut s))) where
     setIndex (CodeGeneratorRequest'newtype_ elt) i (CodeGeneratorRequest'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (CodeGeneratorRequest'List_ <$> (Untyped.allocCompositeList msg 0 4 len))
 get_CodeGeneratorRequest'nodes :: ((Untyped.ReadCtx m msg)
@@ -2318,14 +2287,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_CodeGeneratorRequest'nodes :: ((Untyped.RWCtx m s)
-                                  ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Node (Message.MutMsg s))))) => (CodeGeneratorRequest (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Node (Message.MutMsg s))) -> (m ())
+                                  ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Node (Message.Mut s))))) => (CodeGeneratorRequest (Message.Mut s)) -> (Basics.List (Message.Mut s) (Node (Message.Mut s))) -> (m ())
 set_CodeGeneratorRequest'nodes (CodeGeneratorRequest'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_CodeGeneratorRequest'nodes :: ((Untyped.ReadCtx m msg)) => (CodeGeneratorRequest msg) -> (m Std_.Bool)
 has_CodeGeneratorRequest'nodes (CodeGeneratorRequest'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_CodeGeneratorRequest'nodes :: ((Untyped.RWCtx m s)) => Std_.Int -> (CodeGeneratorRequest (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Node (Message.MutMsg s))))
+new_CodeGeneratorRequest'nodes :: ((Untyped.RWCtx m s)) => Std_.Int -> (CodeGeneratorRequest (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Node (Message.Mut s))))
 new_CodeGeneratorRequest'nodes len struct = (do
     result <- (Classes.newList (Untyped.message struct) len)
     (set_CodeGeneratorRequest'nodes struct result)
@@ -2338,14 +2307,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_CodeGeneratorRequest'requestedFiles :: ((Untyped.RWCtx m s)
-                                           ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (CodeGeneratorRequest'RequestedFile (Message.MutMsg s))))) => (CodeGeneratorRequest (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (CodeGeneratorRequest'RequestedFile (Message.MutMsg s))) -> (m ())
+                                           ,(Classes.ToPtr s (Basics.List (Message.Mut s) (CodeGeneratorRequest'RequestedFile (Message.Mut s))))) => (CodeGeneratorRequest (Message.Mut s)) -> (Basics.List (Message.Mut s) (CodeGeneratorRequest'RequestedFile (Message.Mut s))) -> (m ())
 set_CodeGeneratorRequest'requestedFiles (CodeGeneratorRequest'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 1 struct)
     )
 has_CodeGeneratorRequest'requestedFiles :: ((Untyped.ReadCtx m msg)) => (CodeGeneratorRequest msg) -> (m Std_.Bool)
 has_CodeGeneratorRequest'requestedFiles (CodeGeneratorRequest'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_CodeGeneratorRequest'requestedFiles :: ((Untyped.RWCtx m s)) => Std_.Int -> (CodeGeneratorRequest (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (CodeGeneratorRequest'RequestedFile (Message.MutMsg s))))
+new_CodeGeneratorRequest'requestedFiles :: ((Untyped.RWCtx m s)) => Std_.Int -> (CodeGeneratorRequest (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (CodeGeneratorRequest'RequestedFile (Message.Mut s))))
 new_CodeGeneratorRequest'requestedFiles len struct = (do
     result <- (Classes.newList (Untyped.message struct) len)
     (set_CodeGeneratorRequest'requestedFiles struct result)
@@ -2358,14 +2327,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_CodeGeneratorRequest'capnpVersion :: ((Untyped.RWCtx m s)
-                                         ,(Classes.ToPtr s (CapnpVersion (Message.MutMsg s)))) => (CodeGeneratorRequest (Message.MutMsg s)) -> (CapnpVersion (Message.MutMsg s)) -> (m ())
+                                         ,(Classes.ToPtr s (CapnpVersion (Message.Mut s)))) => (CodeGeneratorRequest (Message.Mut s)) -> (CapnpVersion (Message.Mut s)) -> (m ())
 set_CodeGeneratorRequest'capnpVersion (CodeGeneratorRequest'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 2 struct)
     )
 has_CodeGeneratorRequest'capnpVersion :: ((Untyped.ReadCtx m msg)) => (CodeGeneratorRequest msg) -> (m Std_.Bool)
 has_CodeGeneratorRequest'capnpVersion (CodeGeneratorRequest'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 2 struct))
-new_CodeGeneratorRequest'capnpVersion :: ((Untyped.RWCtx m s)) => (CodeGeneratorRequest (Message.MutMsg s)) -> (m (CapnpVersion (Message.MutMsg s)))
+new_CodeGeneratorRequest'capnpVersion :: ((Untyped.RWCtx m s)) => (CodeGeneratorRequest (Message.Mut s)) -> (m (CapnpVersion (Message.Mut s)))
 new_CodeGeneratorRequest'capnpVersion struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_CodeGeneratorRequest'capnpVersion struct result)
@@ -2378,14 +2347,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_CodeGeneratorRequest'sourceInfo :: ((Untyped.RWCtx m s)
-                                       ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Node'SourceInfo (Message.MutMsg s))))) => (CodeGeneratorRequest (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Node'SourceInfo (Message.MutMsg s))) -> (m ())
+                                       ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Node'SourceInfo (Message.Mut s))))) => (CodeGeneratorRequest (Message.Mut s)) -> (Basics.List (Message.Mut s) (Node'SourceInfo (Message.Mut s))) -> (m ())
 set_CodeGeneratorRequest'sourceInfo (CodeGeneratorRequest'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 3 struct)
     )
 has_CodeGeneratorRequest'sourceInfo :: ((Untyped.ReadCtx m msg)) => (CodeGeneratorRequest msg) -> (m Std_.Bool)
 has_CodeGeneratorRequest'sourceInfo (CodeGeneratorRequest'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 3 struct))
-new_CodeGeneratorRequest'sourceInfo :: ((Untyped.RWCtx m s)) => Std_.Int -> (CodeGeneratorRequest (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Node'SourceInfo (Message.MutMsg s))))
+new_CodeGeneratorRequest'sourceInfo :: ((Untyped.RWCtx m s)) => Std_.Int -> (CodeGeneratorRequest (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Node'SourceInfo (Message.Mut s))))
 new_CodeGeneratorRequest'sourceInfo len struct = (do
     result <- (Classes.newList (Untyped.message struct) len)
     (set_CodeGeneratorRequest'sourceInfo struct result)
@@ -2397,20 +2366,19 @@
     fromStruct struct = (Std_.pure (CodeGeneratorRequest'RequestedFile'newtype_ struct))
 instance (Classes.ToStruct msg (CodeGeneratorRequest'RequestedFile msg)) where
     toStruct (CodeGeneratorRequest'RequestedFile'newtype_ struct) = struct
-instance (Untyped.HasMessage (CodeGeneratorRequest'RequestedFile msg)) where
-    type InMessage (CodeGeneratorRequest'RequestedFile msg) = msg
+instance (Untyped.HasMessage (CodeGeneratorRequest'RequestedFile mut) mut) where
     message (CodeGeneratorRequest'RequestedFile'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (CodeGeneratorRequest'RequestedFile msg)) where
+instance (Untyped.MessageDefault (CodeGeneratorRequest'RequestedFile mut) mut) where
     messageDefault msg = (CodeGeneratorRequest'RequestedFile'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (CodeGeneratorRequest'RequestedFile msg)) where
     fromPtr msg ptr = (CodeGeneratorRequest'RequestedFile'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (CodeGeneratorRequest'RequestedFile (Message.MutMsg s))) where
+instance (Classes.ToPtr s (CodeGeneratorRequest'RequestedFile (Message.Mut s))) where
     toPtr msg (CodeGeneratorRequest'RequestedFile'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (CodeGeneratorRequest'RequestedFile (Message.MutMsg s))) where
+instance (Classes.Allocate s (CodeGeneratorRequest'RequestedFile (Message.Mut s))) where
     new msg = (CodeGeneratorRequest'RequestedFile'newtype_ <$> (Untyped.allocStruct msg 1 2))
-instance (Basics.ListElem msg (CodeGeneratorRequest'RequestedFile msg)) where
-    newtype List msg (CodeGeneratorRequest'RequestedFile msg)
-        = CodeGeneratorRequest'RequestedFile'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (CodeGeneratorRequest'RequestedFile mut)) where
+    newtype List mut (CodeGeneratorRequest'RequestedFile mut)
+        = CodeGeneratorRequest'RequestedFile'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (CodeGeneratorRequest'RequestedFile'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (CodeGeneratorRequest'RequestedFile'List_ l) = (Untyped.ListStruct l)
     length (CodeGeneratorRequest'RequestedFile'List_ l) = (Untyped.length l)
@@ -2418,12 +2386,12 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (CodeGeneratorRequest'RequestedFile (Message.MutMsg s))) where
+instance (Basics.MutListElem s (CodeGeneratorRequest'RequestedFile (Message.Mut s))) where
     setIndex (CodeGeneratorRequest'RequestedFile'newtype_ elt) i (CodeGeneratorRequest'RequestedFile'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (CodeGeneratorRequest'RequestedFile'List_ <$> (Untyped.allocCompositeList msg 1 2 len))
 get_CodeGeneratorRequest'RequestedFile'id :: ((Untyped.ReadCtx m msg)) => (CodeGeneratorRequest'RequestedFile msg) -> (m Std_.Word64)
 get_CodeGeneratorRequest'RequestedFile'id (CodeGeneratorRequest'RequestedFile'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_CodeGeneratorRequest'RequestedFile'id :: ((Untyped.RWCtx m s)) => (CodeGeneratorRequest'RequestedFile (Message.MutMsg s)) -> Std_.Word64 -> (m ())
+set_CodeGeneratorRequest'RequestedFile'id :: ((Untyped.RWCtx m s)) => (CodeGeneratorRequest'RequestedFile (Message.Mut s)) -> Std_.Word64 -> (m ())
 set_CodeGeneratorRequest'RequestedFile'id (CodeGeneratorRequest'RequestedFile'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 0 0 0)
 get_CodeGeneratorRequest'RequestedFile'filename :: ((Untyped.ReadCtx m msg)
                                                    ,(Classes.FromPtr msg (Basics.Text msg))) => (CodeGeneratorRequest'RequestedFile msg) -> (m (Basics.Text msg))
@@ -2432,14 +2400,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_CodeGeneratorRequest'RequestedFile'filename :: ((Untyped.RWCtx m s)
-                                                   ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (CodeGeneratorRequest'RequestedFile (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
+                                                   ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (CodeGeneratorRequest'RequestedFile (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
 set_CodeGeneratorRequest'RequestedFile'filename (CodeGeneratorRequest'RequestedFile'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_CodeGeneratorRequest'RequestedFile'filename :: ((Untyped.ReadCtx m msg)) => (CodeGeneratorRequest'RequestedFile msg) -> (m Std_.Bool)
 has_CodeGeneratorRequest'RequestedFile'filename (CodeGeneratorRequest'RequestedFile'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_CodeGeneratorRequest'RequestedFile'filename :: ((Untyped.RWCtx m s)) => Std_.Int -> (CodeGeneratorRequest'RequestedFile (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
+new_CodeGeneratorRequest'RequestedFile'filename :: ((Untyped.RWCtx m s)) => Std_.Int -> (CodeGeneratorRequest'RequestedFile (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
 new_CodeGeneratorRequest'RequestedFile'filename len struct = (do
     result <- (Basics.newText (Untyped.message struct) len)
     (set_CodeGeneratorRequest'RequestedFile'filename struct result)
@@ -2452,14 +2420,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_CodeGeneratorRequest'RequestedFile'imports :: ((Untyped.RWCtx m s)
-                                                  ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (CodeGeneratorRequest'RequestedFile'Import (Message.MutMsg s))))) => (CodeGeneratorRequest'RequestedFile (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (CodeGeneratorRequest'RequestedFile'Import (Message.MutMsg s))) -> (m ())
+                                                  ,(Classes.ToPtr s (Basics.List (Message.Mut s) (CodeGeneratorRequest'RequestedFile'Import (Message.Mut s))))) => (CodeGeneratorRequest'RequestedFile (Message.Mut s)) -> (Basics.List (Message.Mut s) (CodeGeneratorRequest'RequestedFile'Import (Message.Mut s))) -> (m ())
 set_CodeGeneratorRequest'RequestedFile'imports (CodeGeneratorRequest'RequestedFile'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 1 struct)
     )
 has_CodeGeneratorRequest'RequestedFile'imports :: ((Untyped.ReadCtx m msg)) => (CodeGeneratorRequest'RequestedFile msg) -> (m Std_.Bool)
 has_CodeGeneratorRequest'RequestedFile'imports (CodeGeneratorRequest'RequestedFile'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_CodeGeneratorRequest'RequestedFile'imports :: ((Untyped.RWCtx m s)) => Std_.Int -> (CodeGeneratorRequest'RequestedFile (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (CodeGeneratorRequest'RequestedFile'Import (Message.MutMsg s))))
+new_CodeGeneratorRequest'RequestedFile'imports :: ((Untyped.RWCtx m s)) => Std_.Int -> (CodeGeneratorRequest'RequestedFile (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (CodeGeneratorRequest'RequestedFile'Import (Message.Mut s))))
 new_CodeGeneratorRequest'RequestedFile'imports len struct = (do
     result <- (Classes.newList (Untyped.message struct) len)
     (set_CodeGeneratorRequest'RequestedFile'imports struct result)
@@ -2471,20 +2439,19 @@
     fromStruct struct = (Std_.pure (CodeGeneratorRequest'RequestedFile'Import'newtype_ struct))
 instance (Classes.ToStruct msg (CodeGeneratorRequest'RequestedFile'Import msg)) where
     toStruct (CodeGeneratorRequest'RequestedFile'Import'newtype_ struct) = struct
-instance (Untyped.HasMessage (CodeGeneratorRequest'RequestedFile'Import msg)) where
-    type InMessage (CodeGeneratorRequest'RequestedFile'Import msg) = msg
+instance (Untyped.HasMessage (CodeGeneratorRequest'RequestedFile'Import mut) mut) where
     message (CodeGeneratorRequest'RequestedFile'Import'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (CodeGeneratorRequest'RequestedFile'Import msg)) where
+instance (Untyped.MessageDefault (CodeGeneratorRequest'RequestedFile'Import mut) mut) where
     messageDefault msg = (CodeGeneratorRequest'RequestedFile'Import'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (CodeGeneratorRequest'RequestedFile'Import msg)) where
     fromPtr msg ptr = (CodeGeneratorRequest'RequestedFile'Import'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (CodeGeneratorRequest'RequestedFile'Import (Message.MutMsg s))) where
+instance (Classes.ToPtr s (CodeGeneratorRequest'RequestedFile'Import (Message.Mut s))) where
     toPtr msg (CodeGeneratorRequest'RequestedFile'Import'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (CodeGeneratorRequest'RequestedFile'Import (Message.MutMsg s))) where
+instance (Classes.Allocate s (CodeGeneratorRequest'RequestedFile'Import (Message.Mut s))) where
     new msg = (CodeGeneratorRequest'RequestedFile'Import'newtype_ <$> (Untyped.allocStruct msg 1 1))
-instance (Basics.ListElem msg (CodeGeneratorRequest'RequestedFile'Import msg)) where
-    newtype List msg (CodeGeneratorRequest'RequestedFile'Import msg)
-        = CodeGeneratorRequest'RequestedFile'Import'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (CodeGeneratorRequest'RequestedFile'Import mut)) where
+    newtype List mut (CodeGeneratorRequest'RequestedFile'Import mut)
+        = CodeGeneratorRequest'RequestedFile'Import'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (CodeGeneratorRequest'RequestedFile'Import'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (CodeGeneratorRequest'RequestedFile'Import'List_ l) = (Untyped.ListStruct l)
     length (CodeGeneratorRequest'RequestedFile'Import'List_ l) = (Untyped.length l)
@@ -2492,12 +2459,12 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (CodeGeneratorRequest'RequestedFile'Import (Message.MutMsg s))) where
+instance (Basics.MutListElem s (CodeGeneratorRequest'RequestedFile'Import (Message.Mut s))) where
     setIndex (CodeGeneratorRequest'RequestedFile'Import'newtype_ elt) i (CodeGeneratorRequest'RequestedFile'Import'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (CodeGeneratorRequest'RequestedFile'Import'List_ <$> (Untyped.allocCompositeList msg 1 1 len))
 get_CodeGeneratorRequest'RequestedFile'Import'id :: ((Untyped.ReadCtx m msg)) => (CodeGeneratorRequest'RequestedFile'Import msg) -> (m Std_.Word64)
 get_CodeGeneratorRequest'RequestedFile'Import'id (CodeGeneratorRequest'RequestedFile'Import'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_CodeGeneratorRequest'RequestedFile'Import'id :: ((Untyped.RWCtx m s)) => (CodeGeneratorRequest'RequestedFile'Import (Message.MutMsg s)) -> Std_.Word64 -> (m ())
+set_CodeGeneratorRequest'RequestedFile'Import'id :: ((Untyped.RWCtx m s)) => (CodeGeneratorRequest'RequestedFile'Import (Message.Mut s)) -> Std_.Word64 -> (m ())
 set_CodeGeneratorRequest'RequestedFile'Import'id (CodeGeneratorRequest'RequestedFile'Import'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 0 0 0)
 get_CodeGeneratorRequest'RequestedFile'Import'name :: ((Untyped.ReadCtx m msg)
                                                       ,(Classes.FromPtr msg (Basics.Text msg))) => (CodeGeneratorRequest'RequestedFile'Import msg) -> (m (Basics.Text msg))
@@ -2506,14 +2473,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_CodeGeneratorRequest'RequestedFile'Import'name :: ((Untyped.RWCtx m s)
-                                                      ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (CodeGeneratorRequest'RequestedFile'Import (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
+                                                      ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (CodeGeneratorRequest'RequestedFile'Import (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
 set_CodeGeneratorRequest'RequestedFile'Import'name (CodeGeneratorRequest'RequestedFile'Import'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_CodeGeneratorRequest'RequestedFile'Import'name :: ((Untyped.ReadCtx m msg)) => (CodeGeneratorRequest'RequestedFile'Import msg) -> (m Std_.Bool)
 has_CodeGeneratorRequest'RequestedFile'Import'name (CodeGeneratorRequest'RequestedFile'Import'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_CodeGeneratorRequest'RequestedFile'Import'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (CodeGeneratorRequest'RequestedFile'Import (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
+new_CodeGeneratorRequest'RequestedFile'Import'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (CodeGeneratorRequest'RequestedFile'Import (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
 new_CodeGeneratorRequest'RequestedFile'Import'name len struct = (do
     result <- (Basics.newText (Untyped.message struct) len)
     (set_CodeGeneratorRequest'RequestedFile'Import'name struct result)
diff --git a/gen/lib/Capnp/Gen/Capnp/Schema/Pure.hs b/gen/lib/Capnp/Gen/Capnp/Schema/Pure.hs
--- a/gen/lib/Capnp/Gen/Capnp/Schema/Pure.hs
+++ b/gen/lib/Capnp/Gen/Capnp/Schema/Pure.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds #-}
 {-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE DuplicateRecordFields #-}
 {-# LANGUAGE FlexibleContexts #-}
@@ -11,6 +12,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.Capnp.Schema.Pure(Capnp.Gen.ById.Xa93fc509624c72d9.ElementSize(..)
                                   ,Node(..)
                                   ,Node'(..)
@@ -84,7 +86,7 @@
             ,Generics.Generic)
 instance (Default.Default (Node)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Node)) where
+instance (Classes.FromStruct Message.Const (Node)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Node)) where
     type Cerial msg (Node) = (Capnp.Gen.ById.Xa93fc509624c72d9.Node msg)
@@ -142,7 +144,7 @@
             ,Generics.Generic)
 instance (Default.Default (Node')) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Node')) where
+instance (Classes.FromStruct Message.Const (Node')) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Node')) where
     type Cerial msg (Node') = (Capnp.Gen.ById.Xa93fc509624c72d9.Node msg)
@@ -209,7 +211,7 @@
             ,Generics.Generic)
 instance (Default.Default (Node'struct)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Node'struct)) where
+instance (Classes.FromStruct Message.Const (Node'struct)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Node'struct)) where
     type Cerial msg (Node'struct) = (Capnp.Gen.ById.Xa93fc509624c72d9.Node'struct msg)
@@ -241,7 +243,7 @@
             ,Generics.Generic)
 instance (Default.Default (Node'enum)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Node'enum)) where
+instance (Classes.FromStruct Message.Const (Node'enum)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Node'enum)) where
     type Cerial msg (Node'enum) = (Capnp.Gen.ById.Xa93fc509624c72d9.Node'enum msg)
@@ -262,7 +264,7 @@
             ,Generics.Generic)
 instance (Default.Default (Node'interface)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Node'interface)) where
+instance (Classes.FromStruct Message.Const (Node'interface)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Node'interface)) where
     type Cerial msg (Node'interface) = (Capnp.Gen.ById.Xa93fc509624c72d9.Node'interface msg)
@@ -285,7 +287,7 @@
             ,Generics.Generic)
 instance (Default.Default (Node'const)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Node'const)) where
+instance (Classes.FromStruct Message.Const (Node'const)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Node'const)) where
     type Cerial msg (Node'const) = (Capnp.Gen.ById.Xa93fc509624c72d9.Node'const msg)
@@ -319,7 +321,7 @@
             ,Generics.Generic)
 instance (Default.Default (Node'annotation)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Node'annotation)) where
+instance (Classes.FromStruct Message.Const (Node'annotation)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Node'annotation)) where
     type Cerial msg (Node'annotation) = (Capnp.Gen.ById.Xa93fc509624c72d9.Node'annotation msg)
@@ -363,7 +365,7 @@
             ,Generics.Generic)
 instance (Default.Default (Node'Parameter)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Node'Parameter)) where
+instance (Classes.FromStruct Message.Const (Node'Parameter)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Node'Parameter)) where
     type Cerial msg (Node'Parameter) = (Capnp.Gen.ById.Xa93fc509624c72d9.Node'Parameter msg)
@@ -399,7 +401,7 @@
             ,Generics.Generic)
 instance (Default.Default (Node'NestedNode)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Node'NestedNode)) where
+instance (Classes.FromStruct Message.Const (Node'NestedNode)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Node'NestedNode)) where
     type Cerial msg (Node'NestedNode) = (Capnp.Gen.ById.Xa93fc509624c72d9.Node'NestedNode msg)
@@ -438,7 +440,7 @@
             ,Generics.Generic)
 instance (Default.Default (Node'SourceInfo)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Node'SourceInfo)) where
+instance (Classes.FromStruct Message.Const (Node'SourceInfo)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Node'SourceInfo)) where
     type Cerial msg (Node'SourceInfo) = (Capnp.Gen.ById.Xa93fc509624c72d9.Node'SourceInfo msg)
@@ -477,7 +479,7 @@
             ,Generics.Generic)
 instance (Default.Default (Node'SourceInfo'Member)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Node'SourceInfo'Member)) where
+instance (Classes.FromStruct Message.Const (Node'SourceInfo'Member)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Node'SourceInfo'Member)) where
     type Cerial msg (Node'SourceInfo'Member) = (Capnp.Gen.ById.Xa93fc509624c72d9.Node'SourceInfo'Member msg)
@@ -517,7 +519,7 @@
             ,Generics.Generic)
 instance (Default.Default (Field)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Field)) where
+instance (Classes.FromStruct Message.Const (Field)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Field)) where
     type Cerial msg (Field) = (Capnp.Gen.ById.Xa93fc509624c72d9.Field msg)
@@ -568,7 +570,7 @@
             ,Generics.Generic)
 instance (Default.Default (Field')) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Field')) where
+instance (Classes.FromStruct Message.Const (Field')) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Field')) where
     type Cerial msg (Field') = (Capnp.Gen.ById.Xa93fc509624c72d9.Field msg)
@@ -607,7 +609,7 @@
             ,Generics.Generic)
 instance (Default.Default (Field'slot)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Field'slot)) where
+instance (Classes.FromStruct Message.Const (Field'slot)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Field'slot)) where
     type Cerial msg (Field'slot) = (Capnp.Gen.ById.Xa93fc509624c72d9.Field'slot msg)
@@ -633,7 +635,7 @@
             ,Generics.Generic)
 instance (Default.Default (Field'group)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Field'group)) where
+instance (Classes.FromStruct Message.Const (Field'group)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Field'group)) where
     type Cerial msg (Field'group) = (Capnp.Gen.ById.Xa93fc509624c72d9.Field'group msg)
@@ -654,7 +656,7 @@
             ,Generics.Generic)
 instance (Default.Default (Field'ordinal)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Field'ordinal)) where
+instance (Classes.FromStruct Message.Const (Field'ordinal)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Field'ordinal)) where
     type Cerial msg (Field'ordinal) = (Capnp.Gen.ById.Xa93fc509624c72d9.Field'ordinal msg)
@@ -686,7 +688,7 @@
             ,Generics.Generic)
 instance (Default.Default (Enumerant)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Enumerant)) where
+instance (Classes.FromStruct Message.Const (Enumerant)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Enumerant)) where
     type Cerial msg (Enumerant) = (Capnp.Gen.ById.Xa93fc509624c72d9.Enumerant msg)
@@ -726,7 +728,7 @@
             ,Generics.Generic)
 instance (Default.Default (Superclass)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Superclass)) where
+instance (Classes.FromStruct Message.Const (Superclass)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Superclass)) where
     type Cerial msg (Superclass) = (Capnp.Gen.ById.Xa93fc509624c72d9.Superclass msg)
@@ -770,7 +772,7 @@
             ,Generics.Generic)
 instance (Default.Default (Method)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Method)) where
+instance (Classes.FromStruct Message.Const (Method)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Method)) where
     type Cerial msg (Method) = (Capnp.Gen.ById.Xa93fc509624c72d9.Method msg)
@@ -837,7 +839,7 @@
             ,Generics.Generic)
 instance (Default.Default (Type)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Type)) where
+instance (Classes.FromStruct Message.Const (Type)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Type)) where
     type Cerial msg (Type) = (Capnp.Gen.ById.Xa93fc509624c72d9.Type msg)
@@ -965,7 +967,7 @@
             ,Generics.Generic)
 instance (Default.Default (Type'list)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Type'list)) where
+instance (Classes.FromStruct Message.Const (Type'list)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Type'list)) where
     type Cerial msg (Type'list) = (Capnp.Gen.ById.Xa93fc509624c72d9.Type'list msg)
@@ -986,7 +988,7 @@
             ,Generics.Generic)
 instance (Default.Default (Type'enum)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Type'enum)) where
+instance (Classes.FromStruct Message.Const (Type'enum)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Type'enum)) where
     type Cerial msg (Type'enum) = (Capnp.Gen.ById.Xa93fc509624c72d9.Type'enum msg)
@@ -1009,7 +1011,7 @@
             ,Generics.Generic)
 instance (Default.Default (Type'struct)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Type'struct)) where
+instance (Classes.FromStruct Message.Const (Type'struct)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Type'struct)) where
     type Cerial msg (Type'struct) = (Capnp.Gen.ById.Xa93fc509624c72d9.Type'struct msg)
@@ -1032,7 +1034,7 @@
             ,Generics.Generic)
 instance (Default.Default (Type'interface)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Type'interface)) where
+instance (Classes.FromStruct Message.Const (Type'interface)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Type'interface)) where
     type Cerial msg (Type'interface) = (Capnp.Gen.ById.Xa93fc509624c72d9.Type'interface msg)
@@ -1056,7 +1058,7 @@
             ,Generics.Generic)
 instance (Default.Default (Type'anyPointer)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Type'anyPointer)) where
+instance (Classes.FromStruct Message.Const (Type'anyPointer)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Type'anyPointer)) where
     type Cerial msg (Type'anyPointer) = (Capnp.Gen.ById.Xa93fc509624c72d9.Type'anyPointer msg)
@@ -1102,7 +1104,7 @@
             ,Generics.Generic)
 instance (Default.Default (Type'anyPointer'unconstrained)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Type'anyPointer'unconstrained)) where
+instance (Classes.FromStruct Message.Const (Type'anyPointer'unconstrained)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Type'anyPointer'unconstrained)) where
     type Cerial msg (Type'anyPointer'unconstrained) = (Capnp.Gen.ById.Xa93fc509624c72d9.Type'anyPointer'unconstrained msg)
@@ -1141,7 +1143,7 @@
             ,Generics.Generic)
 instance (Default.Default (Type'anyPointer'parameter)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Type'anyPointer'parameter)) where
+instance (Classes.FromStruct Message.Const (Type'anyPointer'parameter)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Type'anyPointer'parameter)) where
     type Cerial msg (Type'anyPointer'parameter) = (Capnp.Gen.ById.Xa93fc509624c72d9.Type'anyPointer'parameter msg)
@@ -1163,7 +1165,7 @@
             ,Generics.Generic)
 instance (Default.Default (Type'anyPointer'implicitMethodParameter)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Type'anyPointer'implicitMethodParameter)) where
+instance (Classes.FromStruct Message.Const (Type'anyPointer'implicitMethodParameter)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Type'anyPointer'implicitMethodParameter)) where
     type Cerial msg (Type'anyPointer'implicitMethodParameter) = (Capnp.Gen.ById.Xa93fc509624c72d9.Type'anyPointer'implicitMethodParameter msg)
@@ -1183,7 +1185,7 @@
             ,Generics.Generic)
 instance (Default.Default (Brand)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Brand)) where
+instance (Classes.FromStruct Message.Const (Brand)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Brand)) where
     type Cerial msg (Brand) = (Capnp.Gen.ById.Xa93fc509624c72d9.Brand msg)
@@ -1219,7 +1221,7 @@
             ,Generics.Generic)
 instance (Default.Default (Brand'Scope)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Brand'Scope)) where
+instance (Classes.FromStruct Message.Const (Brand'Scope)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Brand'Scope)) where
     type Cerial msg (Brand'Scope) = (Capnp.Gen.ById.Xa93fc509624c72d9.Brand'Scope msg)
@@ -1259,7 +1261,7 @@
             ,Generics.Generic)
 instance (Default.Default (Brand'Scope')) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Brand'Scope')) where
+instance (Classes.FromStruct Message.Const (Brand'Scope')) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Brand'Scope')) where
     type Cerial msg (Brand'Scope') = (Capnp.Gen.ById.Xa93fc509624c72d9.Brand'Scope msg)
@@ -1290,7 +1292,7 @@
             ,Generics.Generic)
 instance (Default.Default (Brand'Binding)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Brand'Binding)) where
+instance (Classes.FromStruct Message.Const (Brand'Binding)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Brand'Binding)) where
     type Cerial msg (Brand'Binding) = (Capnp.Gen.ById.Xa93fc509624c72d9.Brand'Binding msg)
@@ -1353,7 +1355,7 @@
             ,Generics.Generic)
 instance (Default.Default (Value)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Value)) where
+instance (Classes.FromStruct Message.Const (Value)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Value)) where
     type Cerial msg (Value) = (Capnp.Gen.ById.Xa93fc509624c72d9.Value msg)
@@ -1468,7 +1470,7 @@
             ,Generics.Generic)
 instance (Default.Default (Annotation)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Annotation)) where
+instance (Classes.FromStruct Message.Const (Annotation)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Annotation)) where
     type Cerial msg (Annotation) = (Capnp.Gen.ById.Xa93fc509624c72d9.Annotation msg)
@@ -1509,7 +1511,7 @@
             ,Generics.Generic)
 instance (Default.Default (CapnpVersion)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (CapnpVersion)) where
+instance (Classes.FromStruct Message.Const (CapnpVersion)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (CapnpVersion)) where
     type Cerial msg (CapnpVersion) = (Capnp.Gen.ById.Xa93fc509624c72d9.CapnpVersion msg)
@@ -1551,7 +1553,7 @@
             ,Generics.Generic)
 instance (Default.Default (CodeGeneratorRequest)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (CodeGeneratorRequest)) where
+instance (Classes.FromStruct Message.Const (CodeGeneratorRequest)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (CodeGeneratorRequest)) where
     type Cerial msg (CodeGeneratorRequest) = (Capnp.Gen.ById.Xa93fc509624c72d9.CodeGeneratorRequest msg)
@@ -1594,7 +1596,7 @@
             ,Generics.Generic)
 instance (Default.Default (CodeGeneratorRequest'RequestedFile)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (CodeGeneratorRequest'RequestedFile)) where
+instance (Classes.FromStruct Message.Const (CodeGeneratorRequest'RequestedFile)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (CodeGeneratorRequest'RequestedFile)) where
     type Cerial msg (CodeGeneratorRequest'RequestedFile) = (Capnp.Gen.ById.Xa93fc509624c72d9.CodeGeneratorRequest'RequestedFile msg)
@@ -1634,7 +1636,7 @@
             ,Generics.Generic)
 instance (Default.Default (CodeGeneratorRequest'RequestedFile'Import)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (CodeGeneratorRequest'RequestedFile'Import)) where
+instance (Classes.FromStruct Message.Const (CodeGeneratorRequest'RequestedFile'Import)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (CodeGeneratorRequest'RequestedFile'Import)) where
     type Cerial msg (CodeGeneratorRequest'RequestedFile'Import) = (Capnp.Gen.ById.Xa93fc509624c72d9.CodeGeneratorRequest'RequestedFile'Import msg)
diff --git a/gen/lib/Capnp/Gen/Capnp/Stream.hs b/gen/lib/Capnp/Gen/Capnp/Stream.hs
--- a/gen/lib/Capnp/Gen/Capnp/Stream.hs
+++ b/gen/lib/Capnp/Gen/Capnp/Stream.hs
@@ -3,11 +3,13 @@
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE DataKinds #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# OPTIONS_GHC -Wno-unused-imports #-}
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.Capnp.Stream where
 import qualified Capnp.Message as Message
 import qualified Capnp.Untyped as Untyped
@@ -28,20 +30,19 @@
     fromStruct struct = (Std_.pure (StreamResult'newtype_ struct))
 instance (Classes.ToStruct msg (StreamResult msg)) where
     toStruct (StreamResult'newtype_ struct) = struct
-instance (Untyped.HasMessage (StreamResult msg)) where
-    type InMessage (StreamResult msg) = msg
+instance (Untyped.HasMessage (StreamResult mut) mut) where
     message (StreamResult'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (StreamResult msg)) where
+instance (Untyped.MessageDefault (StreamResult mut) mut) where
     messageDefault msg = (StreamResult'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (StreamResult msg)) where
     fromPtr msg ptr = (StreamResult'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (StreamResult (Message.MutMsg s))) where
+instance (Classes.ToPtr s (StreamResult (Message.Mut s))) where
     toPtr msg (StreamResult'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (StreamResult (Message.MutMsg s))) where
+instance (Classes.Allocate s (StreamResult (Message.Mut s))) where
     new msg = (StreamResult'newtype_ <$> (Untyped.allocStruct msg 0 0))
-instance (Basics.ListElem msg (StreamResult msg)) where
-    newtype List msg (StreamResult msg)
-        = StreamResult'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (StreamResult mut)) where
+    newtype List mut (StreamResult mut)
+        = StreamResult'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (StreamResult'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (StreamResult'List_ l) = (Untyped.ListStruct l)
     length (StreamResult'List_ l) = (Untyped.length l)
@@ -49,6 +50,6 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (StreamResult (Message.MutMsg s))) where
+instance (Basics.MutListElem s (StreamResult (Message.Mut s))) where
     setIndex (StreamResult'newtype_ elt) i (StreamResult'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (StreamResult'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
diff --git a/gen/lib/Capnp/Gen/Capnp/Stream/Pure.hs b/gen/lib/Capnp/Gen/Capnp/Stream/Pure.hs
--- a/gen/lib/Capnp/Gen/Capnp/Stream/Pure.hs
+++ b/gen/lib/Capnp/Gen/Capnp/Stream/Pure.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds #-}
 {-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE DuplicateRecordFields #-}
 {-# LANGUAGE FlexibleContexts #-}
@@ -11,6 +12,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.Capnp.Stream.Pure(StreamResult(..)) where
 import qualified Capnp.GenHelpers.ReExports.Data.Vector as V
 import qualified Capnp.GenHelpers.ReExports.Data.Text as T
@@ -37,7 +39,7 @@
             ,Generics.Generic)
 instance (Default.Default (StreamResult)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (StreamResult)) where
+instance (Classes.FromStruct Message.Const (StreamResult)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (StreamResult)) where
     type Cerial msg (StreamResult) = (Capnp.Gen.ById.X86c366a91393f3f8.StreamResult msg)
diff --git a/gen/tests/Capnp/Gen/Aircraft.hs b/gen/tests/Capnp/Gen/Aircraft.hs
--- a/gen/tests/Capnp/Gen/Aircraft.hs
+++ b/gen/tests/Capnp/Gen/Aircraft.hs
@@ -3,3776 +3,3718 @@
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE DeriveGeneric #-}
-{-# LANGUAGE OverloadedStrings #-}
-{-# OPTIONS_GHC -Wno-unused-imports #-}
-{-# OPTIONS_GHC -Wno-dodgy-exports #-}
-{-# OPTIONS_GHC -Wno-unused-matches #-}
-{-# OPTIONS_GHC -Wno-orphans #-}
-module Capnp.Gen.Aircraft where
-import qualified Capnp.Message as Message
-import qualified Capnp.Untyped as Untyped
-import qualified Capnp.Basics as Basics
-import qualified Capnp.GenHelpers as GenHelpers
-import qualified Capnp.Classes as Classes
-import qualified GHC.Generics as Generics
-import qualified Capnp.Bits as Std_
-import qualified Data.Maybe as Std_
-import qualified Capnp.GenHelpers.ReExports.Data.ByteString as BS
-import qualified Prelude as Std_
-import qualified Data.Word as Std_
-import qualified Data.Int as Std_
-import Prelude ((<$>), (<*>), (>>=))
-constDate :: (Zdate Message.ConstMsg)
-constDate  = (GenHelpers.getPtrConst ("\NUL\NUL\NUL\NUL\ETX\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\SOH\NUL\NUL\NUL\NUL\NUL\SOH\NUL\NUL\NUL\223\a\b\ESC\NUL\NUL\NUL\NUL" :: BS.ByteString))
-constList :: (Basics.List Message.ConstMsg (Zdate Message.ConstMsg))
-constList  = (GenHelpers.getPtrConst ("\NUL\NUL\NUL\NUL\ENQ\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\SOH\NUL\SOH\NUL\NUL\NUL\ETB\NUL\NUL\NUL\b\NUL\NUL\NUL\SOH\NUL\NUL\NUL\223\a\b\ESC\NUL\NUL\NUL\NUL\223\a\b\FS\NUL\NUL\NUL\NUL" :: BS.ByteString))
-constEnum :: Airport
-constEnum  = (Classes.fromWord 1)
-newtype Zdate msg
-    = Zdate'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Zdate msg)) where
-    fromStruct struct = (Std_.pure (Zdate'newtype_ struct))
-instance (Classes.ToStruct msg (Zdate msg)) where
-    toStruct (Zdate'newtype_ struct) = struct
-instance (Untyped.HasMessage (Zdate msg)) where
-    type InMessage (Zdate msg) = msg
-    message (Zdate'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Zdate msg)) where
-    messageDefault msg = (Zdate'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Zdate msg)) where
-    fromPtr msg ptr = (Zdate'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Zdate (Message.MutMsg s))) where
-    toPtr msg (Zdate'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Zdate (Message.MutMsg s))) where
-    new msg = (Zdate'newtype_ <$> (Untyped.allocStruct msg 1 0))
-instance (Basics.ListElem msg (Zdate msg)) where
-    newtype List msg (Zdate msg)
-        = Zdate'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Zdate'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Zdate'List_ l) = (Untyped.ListStruct l)
-    length (Zdate'List_ l) = (Untyped.length l)
-    index i (Zdate'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Zdate (Message.MutMsg s))) where
-    setIndex (Zdate'newtype_ elt) i (Zdate'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Zdate'List_ <$> (Untyped.allocCompositeList msg 1 0 len))
-get_Zdate'year :: ((Untyped.ReadCtx m msg)) => (Zdate msg) -> (m Std_.Int16)
-get_Zdate'year (Zdate'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Zdate'year :: ((Untyped.RWCtx m s)) => (Zdate (Message.MutMsg s)) -> Std_.Int16 -> (m ())
-set_Zdate'year (Zdate'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
-get_Zdate'month :: ((Untyped.ReadCtx m msg)) => (Zdate msg) -> (m Std_.Word8)
-get_Zdate'month (Zdate'newtype_ struct) = (GenHelpers.getWordField struct 0 16 0)
-set_Zdate'month :: ((Untyped.RWCtx m s)) => (Zdate (Message.MutMsg s)) -> Std_.Word8 -> (m ())
-set_Zdate'month (Zdate'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word8) 0 16 0)
-get_Zdate'day :: ((Untyped.ReadCtx m msg)) => (Zdate msg) -> (m Std_.Word8)
-get_Zdate'day (Zdate'newtype_ struct) = (GenHelpers.getWordField struct 0 24 0)
-set_Zdate'day :: ((Untyped.RWCtx m s)) => (Zdate (Message.MutMsg s)) -> Std_.Word8 -> (m ())
-set_Zdate'day (Zdate'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word8) 0 24 0)
-newtype Zdata msg
-    = Zdata'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Zdata msg)) where
-    fromStruct struct = (Std_.pure (Zdata'newtype_ struct))
-instance (Classes.ToStruct msg (Zdata msg)) where
-    toStruct (Zdata'newtype_ struct) = struct
-instance (Untyped.HasMessage (Zdata msg)) where
-    type InMessage (Zdata msg) = msg
-    message (Zdata'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Zdata msg)) where
-    messageDefault msg = (Zdata'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Zdata msg)) where
-    fromPtr msg ptr = (Zdata'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Zdata (Message.MutMsg s))) where
-    toPtr msg (Zdata'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Zdata (Message.MutMsg s))) where
-    new msg = (Zdata'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Zdata msg)) where
-    newtype List msg (Zdata msg)
-        = Zdata'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Zdata'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Zdata'List_ l) = (Untyped.ListStruct l)
-    length (Zdata'List_ l) = (Untyped.length l)
-    index i (Zdata'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Zdata (Message.MutMsg s))) where
-    setIndex (Zdata'newtype_ elt) i (Zdata'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Zdata'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_Zdata'data_ :: ((Untyped.ReadCtx m msg)
-                   ,(Classes.FromPtr msg (Basics.Data msg))) => (Zdata msg) -> (m (Basics.Data msg))
-get_Zdata'data_ (Zdata'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_Zdata'data_ :: ((Untyped.RWCtx m s)
-                   ,(Classes.ToPtr s (Basics.Data (Message.MutMsg s)))) => (Zdata (Message.MutMsg s)) -> (Basics.Data (Message.MutMsg s)) -> (m ())
-set_Zdata'data_ (Zdata'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_Zdata'data_ :: ((Untyped.ReadCtx m msg)) => (Zdata msg) -> (m Std_.Bool)
-has_Zdata'data_ (Zdata'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Zdata'data_ :: ((Untyped.RWCtx m s)) => Std_.Int -> (Zdata (Message.MutMsg s)) -> (m (Basics.Data (Message.MutMsg s)))
-new_Zdata'data_ len struct = (do
-    result <- (Basics.newData (Untyped.message struct) len)
-    (set_Zdata'data_ struct result)
-    (Std_.pure result)
-    )
-data Airport 
-    = Airport'none 
-    | Airport'jfk 
-    | Airport'lax 
-    | Airport'sfo 
-    | Airport'luv 
-    | Airport'dfw 
-    | Airport'test 
-    | Airport'unknown' Std_.Word16
-    deriving(Std_.Show
-            ,Std_.Read
-            ,Std_.Eq
-            ,Generics.Generic)
-instance (Classes.IsWord Airport) where
-    fromWord n = case ((Std_.fromIntegral n) :: Std_.Word16) of
-        0 ->
-            Airport'none
-        1 ->
-            Airport'jfk
-        2 ->
-            Airport'lax
-        3 ->
-            Airport'sfo
-        4 ->
-            Airport'luv
-        5 ->
-            Airport'dfw
-        6 ->
-            Airport'test
-        tag ->
-            (Airport'unknown' tag)
-    toWord (Airport'none) = 0
-    toWord (Airport'jfk) = 1
-    toWord (Airport'lax) = 2
-    toWord (Airport'sfo) = 3
-    toWord (Airport'luv) = 4
-    toWord (Airport'dfw) = 5
-    toWord (Airport'test) = 6
-    toWord (Airport'unknown' tag) = (Std_.fromIntegral tag)
-instance (Std_.Enum Airport) where
-    fromEnum x = (Std_.fromIntegral (Classes.toWord x))
-    toEnum x = (Classes.fromWord (Std_.fromIntegral x))
-instance (Basics.ListElem msg Airport) where
-    newtype List msg Airport
-        = Airport'List_ (Untyped.ListOf msg Std_.Word16)
-    index i (Airport'List_ l) = (Classes.fromWord <$> (Std_.fromIntegral <$> (Untyped.index i l)))
-    listFromPtr msg ptr = (Airport'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Airport'List_ l) = (Untyped.List16 l)
-    length (Airport'List_ l) = (Untyped.length l)
-instance (Classes.MutListElem s Airport) where
-    setIndex elt i (Airport'List_ l) = (Untyped.setIndex (Std_.fromIntegral (Classes.toWord elt)) i l)
-    newList msg size = (Airport'List_ <$> (Untyped.allocList16 msg size))
-newtype PlaneBase msg
-    = PlaneBase'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (PlaneBase msg)) where
-    fromStruct struct = (Std_.pure (PlaneBase'newtype_ struct))
-instance (Classes.ToStruct msg (PlaneBase msg)) where
-    toStruct (PlaneBase'newtype_ struct) = struct
-instance (Untyped.HasMessage (PlaneBase msg)) where
-    type InMessage (PlaneBase msg) = msg
-    message (PlaneBase'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (PlaneBase msg)) where
-    messageDefault msg = (PlaneBase'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (PlaneBase msg)) where
-    fromPtr msg ptr = (PlaneBase'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (PlaneBase (Message.MutMsg s))) where
-    toPtr msg (PlaneBase'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (PlaneBase (Message.MutMsg s))) where
-    new msg = (PlaneBase'newtype_ <$> (Untyped.allocStruct msg 4 2))
-instance (Basics.ListElem msg (PlaneBase msg)) where
-    newtype List msg (PlaneBase msg)
-        = PlaneBase'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (PlaneBase'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (PlaneBase'List_ l) = (Untyped.ListStruct l)
-    length (PlaneBase'List_ l) = (Untyped.length l)
-    index i (PlaneBase'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (PlaneBase (Message.MutMsg s))) where
-    setIndex (PlaneBase'newtype_ elt) i (PlaneBase'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (PlaneBase'List_ <$> (Untyped.allocCompositeList msg 4 2 len))
-get_PlaneBase'name :: ((Untyped.ReadCtx m msg)
-                      ,(Classes.FromPtr msg (Basics.Text msg))) => (PlaneBase msg) -> (m (Basics.Text msg))
-get_PlaneBase'name (PlaneBase'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_PlaneBase'name :: ((Untyped.RWCtx m s)
-                      ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (PlaneBase (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
-set_PlaneBase'name (PlaneBase'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_PlaneBase'name :: ((Untyped.ReadCtx m msg)) => (PlaneBase msg) -> (m Std_.Bool)
-has_PlaneBase'name (PlaneBase'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_PlaneBase'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (PlaneBase (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
-new_PlaneBase'name len struct = (do
-    result <- (Basics.newText (Untyped.message struct) len)
-    (set_PlaneBase'name struct result)
-    (Std_.pure result)
-    )
-get_PlaneBase'homes :: ((Untyped.ReadCtx m msg)
-                       ,(Classes.FromPtr msg (Basics.List msg Airport))) => (PlaneBase msg) -> (m (Basics.List msg Airport))
-get_PlaneBase'homes (PlaneBase'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 1 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_PlaneBase'homes :: ((Untyped.RWCtx m s)
-                       ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) Airport))) => (PlaneBase (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) Airport) -> (m ())
-set_PlaneBase'homes (PlaneBase'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 1 struct)
-    )
-has_PlaneBase'homes :: ((Untyped.ReadCtx m msg)) => (PlaneBase msg) -> (m Std_.Bool)
-has_PlaneBase'homes (PlaneBase'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_PlaneBase'homes :: ((Untyped.RWCtx m s)) => Std_.Int -> (PlaneBase (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) Airport))
-new_PlaneBase'homes len struct = (do
-    result <- (Classes.newList (Untyped.message struct) len)
-    (set_PlaneBase'homes struct result)
-    (Std_.pure result)
-    )
-get_PlaneBase'rating :: ((Untyped.ReadCtx m msg)) => (PlaneBase msg) -> (m Std_.Int64)
-get_PlaneBase'rating (PlaneBase'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_PlaneBase'rating :: ((Untyped.RWCtx m s)) => (PlaneBase (Message.MutMsg s)) -> Std_.Int64 -> (m ())
-set_PlaneBase'rating (PlaneBase'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 0 0 0)
-get_PlaneBase'canFly :: ((Untyped.ReadCtx m msg)) => (PlaneBase msg) -> (m Std_.Bool)
-get_PlaneBase'canFly (PlaneBase'newtype_ struct) = (GenHelpers.getWordField struct 1 0 0)
-set_PlaneBase'canFly :: ((Untyped.RWCtx m s)) => (PlaneBase (Message.MutMsg s)) -> Std_.Bool -> (m ())
-set_PlaneBase'canFly (PlaneBase'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 1 0 0)
-get_PlaneBase'capacity :: ((Untyped.ReadCtx m msg)) => (PlaneBase msg) -> (m Std_.Int64)
-get_PlaneBase'capacity (PlaneBase'newtype_ struct) = (GenHelpers.getWordField struct 2 0 0)
-set_PlaneBase'capacity :: ((Untyped.RWCtx m s)) => (PlaneBase (Message.MutMsg s)) -> Std_.Int64 -> (m ())
-set_PlaneBase'capacity (PlaneBase'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 2 0 0)
-get_PlaneBase'maxSpeed :: ((Untyped.ReadCtx m msg)) => (PlaneBase msg) -> (m Std_.Double)
-get_PlaneBase'maxSpeed (PlaneBase'newtype_ struct) = (GenHelpers.getWordField struct 3 0 0)
-set_PlaneBase'maxSpeed :: ((Untyped.RWCtx m s)) => (PlaneBase (Message.MutMsg s)) -> Std_.Double -> (m ())
-set_PlaneBase'maxSpeed (PlaneBase'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 3 0 0)
-newtype B737 msg
-    = B737'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (B737 msg)) where
-    fromStruct struct = (Std_.pure (B737'newtype_ struct))
-instance (Classes.ToStruct msg (B737 msg)) where
-    toStruct (B737'newtype_ struct) = struct
-instance (Untyped.HasMessage (B737 msg)) where
-    type InMessage (B737 msg) = msg
-    message (B737'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (B737 msg)) where
-    messageDefault msg = (B737'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (B737 msg)) where
-    fromPtr msg ptr = (B737'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (B737 (Message.MutMsg s))) where
-    toPtr msg (B737'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (B737 (Message.MutMsg s))) where
-    new msg = (B737'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (B737 msg)) where
-    newtype List msg (B737 msg)
-        = B737'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (B737'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (B737'List_ l) = (Untyped.ListStruct l)
-    length (B737'List_ l) = (Untyped.length l)
-    index i (B737'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (B737 (Message.MutMsg s))) where
-    setIndex (B737'newtype_ elt) i (B737'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (B737'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_B737'base :: ((Untyped.ReadCtx m msg)
-                 ,(Classes.FromPtr msg (PlaneBase msg))) => (B737 msg) -> (m (PlaneBase msg))
-get_B737'base (B737'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_B737'base :: ((Untyped.RWCtx m s)
-                 ,(Classes.ToPtr s (PlaneBase (Message.MutMsg s)))) => (B737 (Message.MutMsg s)) -> (PlaneBase (Message.MutMsg s)) -> (m ())
-set_B737'base (B737'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_B737'base :: ((Untyped.ReadCtx m msg)) => (B737 msg) -> (m Std_.Bool)
-has_B737'base (B737'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_B737'base :: ((Untyped.RWCtx m s)) => (B737 (Message.MutMsg s)) -> (m (PlaneBase (Message.MutMsg s)))
-new_B737'base struct = (do
-    result <- (Classes.new (Untyped.message struct))
-    (set_B737'base struct result)
-    (Std_.pure result)
-    )
-newtype A320 msg
-    = A320'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (A320 msg)) where
-    fromStruct struct = (Std_.pure (A320'newtype_ struct))
-instance (Classes.ToStruct msg (A320 msg)) where
-    toStruct (A320'newtype_ struct) = struct
-instance (Untyped.HasMessage (A320 msg)) where
-    type InMessage (A320 msg) = msg
-    message (A320'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (A320 msg)) where
-    messageDefault msg = (A320'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (A320 msg)) where
-    fromPtr msg ptr = (A320'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (A320 (Message.MutMsg s))) where
-    toPtr msg (A320'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (A320 (Message.MutMsg s))) where
-    new msg = (A320'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (A320 msg)) where
-    newtype List msg (A320 msg)
-        = A320'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (A320'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (A320'List_ l) = (Untyped.ListStruct l)
-    length (A320'List_ l) = (Untyped.length l)
-    index i (A320'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (A320 (Message.MutMsg s))) where
-    setIndex (A320'newtype_ elt) i (A320'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (A320'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_A320'base :: ((Untyped.ReadCtx m msg)
-                 ,(Classes.FromPtr msg (PlaneBase msg))) => (A320 msg) -> (m (PlaneBase msg))
-get_A320'base (A320'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_A320'base :: ((Untyped.RWCtx m s)
-                 ,(Classes.ToPtr s (PlaneBase (Message.MutMsg s)))) => (A320 (Message.MutMsg s)) -> (PlaneBase (Message.MutMsg s)) -> (m ())
-set_A320'base (A320'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_A320'base :: ((Untyped.ReadCtx m msg)) => (A320 msg) -> (m Std_.Bool)
-has_A320'base (A320'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_A320'base :: ((Untyped.RWCtx m s)) => (A320 (Message.MutMsg s)) -> (m (PlaneBase (Message.MutMsg s)))
-new_A320'base struct = (do
-    result <- (Classes.new (Untyped.message struct))
-    (set_A320'base struct result)
-    (Std_.pure result)
-    )
-newtype F16 msg
-    = F16'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (F16 msg)) where
-    fromStruct struct = (Std_.pure (F16'newtype_ struct))
-instance (Classes.ToStruct msg (F16 msg)) where
-    toStruct (F16'newtype_ struct) = struct
-instance (Untyped.HasMessage (F16 msg)) where
-    type InMessage (F16 msg) = msg
-    message (F16'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (F16 msg)) where
-    messageDefault msg = (F16'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (F16 msg)) where
-    fromPtr msg ptr = (F16'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (F16 (Message.MutMsg s))) where
-    toPtr msg (F16'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (F16 (Message.MutMsg s))) where
-    new msg = (F16'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (F16 msg)) where
-    newtype List msg (F16 msg)
-        = F16'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (F16'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (F16'List_ l) = (Untyped.ListStruct l)
-    length (F16'List_ l) = (Untyped.length l)
-    index i (F16'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (F16 (Message.MutMsg s))) where
-    setIndex (F16'newtype_ elt) i (F16'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (F16'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_F16'base :: ((Untyped.ReadCtx m msg)
-                ,(Classes.FromPtr msg (PlaneBase msg))) => (F16 msg) -> (m (PlaneBase msg))
-get_F16'base (F16'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_F16'base :: ((Untyped.RWCtx m s)
-                ,(Classes.ToPtr s (PlaneBase (Message.MutMsg s)))) => (F16 (Message.MutMsg s)) -> (PlaneBase (Message.MutMsg s)) -> (m ())
-set_F16'base (F16'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_F16'base :: ((Untyped.ReadCtx m msg)) => (F16 msg) -> (m Std_.Bool)
-has_F16'base (F16'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_F16'base :: ((Untyped.RWCtx m s)) => (F16 (Message.MutMsg s)) -> (m (PlaneBase (Message.MutMsg s)))
-new_F16'base struct = (do
-    result <- (Classes.new (Untyped.message struct))
-    (set_F16'base struct result)
-    (Std_.pure result)
-    )
-newtype Regression msg
-    = Regression'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Regression msg)) where
-    fromStruct struct = (Std_.pure (Regression'newtype_ struct))
-instance (Classes.ToStruct msg (Regression msg)) where
-    toStruct (Regression'newtype_ struct) = struct
-instance (Untyped.HasMessage (Regression msg)) where
-    type InMessage (Regression msg) = msg
-    message (Regression'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Regression msg)) where
-    messageDefault msg = (Regression'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Regression msg)) where
-    fromPtr msg ptr = (Regression'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Regression (Message.MutMsg s))) where
-    toPtr msg (Regression'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Regression (Message.MutMsg s))) where
-    new msg = (Regression'newtype_ <$> (Untyped.allocStruct msg 3 3))
-instance (Basics.ListElem msg (Regression msg)) where
-    newtype List msg (Regression msg)
-        = Regression'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Regression'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Regression'List_ l) = (Untyped.ListStruct l)
-    length (Regression'List_ l) = (Untyped.length l)
-    index i (Regression'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Regression (Message.MutMsg s))) where
-    setIndex (Regression'newtype_ elt) i (Regression'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Regression'List_ <$> (Untyped.allocCompositeList msg 3 3 len))
-get_Regression'base :: ((Untyped.ReadCtx m msg)
-                       ,(Classes.FromPtr msg (PlaneBase msg))) => (Regression msg) -> (m (PlaneBase msg))
-get_Regression'base (Regression'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_Regression'base :: ((Untyped.RWCtx m s)
-                       ,(Classes.ToPtr s (PlaneBase (Message.MutMsg s)))) => (Regression (Message.MutMsg s)) -> (PlaneBase (Message.MutMsg s)) -> (m ())
-set_Regression'base (Regression'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_Regression'base :: ((Untyped.ReadCtx m msg)) => (Regression msg) -> (m Std_.Bool)
-has_Regression'base (Regression'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Regression'base :: ((Untyped.RWCtx m s)) => (Regression (Message.MutMsg s)) -> (m (PlaneBase (Message.MutMsg s)))
-new_Regression'base struct = (do
-    result <- (Classes.new (Untyped.message struct))
-    (set_Regression'base struct result)
-    (Std_.pure result)
-    )
-get_Regression'b0 :: ((Untyped.ReadCtx m msg)) => (Regression msg) -> (m Std_.Double)
-get_Regression'b0 (Regression'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Regression'b0 :: ((Untyped.RWCtx m s)) => (Regression (Message.MutMsg s)) -> Std_.Double -> (m ())
-set_Regression'b0 (Regression'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 0 0 0)
-get_Regression'beta :: ((Untyped.ReadCtx m msg)
-                       ,(Classes.FromPtr msg (Basics.List msg Std_.Double))) => (Regression msg) -> (m (Basics.List msg Std_.Double))
-get_Regression'beta (Regression'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 1 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_Regression'beta :: ((Untyped.RWCtx m s)
-                       ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) Std_.Double))) => (Regression (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) Std_.Double) -> (m ())
-set_Regression'beta (Regression'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 1 struct)
-    )
-has_Regression'beta :: ((Untyped.ReadCtx m msg)) => (Regression msg) -> (m Std_.Bool)
-has_Regression'beta (Regression'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_Regression'beta :: ((Untyped.RWCtx m s)) => Std_.Int -> (Regression (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) Std_.Double))
-new_Regression'beta len struct = (do
-    result <- (Classes.newList (Untyped.message struct) len)
-    (set_Regression'beta struct result)
-    (Std_.pure result)
-    )
-get_Regression'planes :: ((Untyped.ReadCtx m msg)
-                         ,(Classes.FromPtr msg (Basics.List msg (Aircraft msg)))) => (Regression msg) -> (m (Basics.List msg (Aircraft msg)))
-get_Regression'planes (Regression'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 2 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_Regression'planes :: ((Untyped.RWCtx m s)
-                         ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Aircraft (Message.MutMsg s))))) => (Regression (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Aircraft (Message.MutMsg s))) -> (m ())
-set_Regression'planes (Regression'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 2 struct)
-    )
-has_Regression'planes :: ((Untyped.ReadCtx m msg)) => (Regression msg) -> (m Std_.Bool)
-has_Regression'planes (Regression'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 2 struct))
-new_Regression'planes :: ((Untyped.RWCtx m s)) => Std_.Int -> (Regression (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Aircraft (Message.MutMsg s))))
-new_Regression'planes len struct = (do
-    result <- (Classes.newList (Untyped.message struct) len)
-    (set_Regression'planes struct result)
-    (Std_.pure result)
-    )
-get_Regression'ymu :: ((Untyped.ReadCtx m msg)) => (Regression msg) -> (m Std_.Double)
-get_Regression'ymu (Regression'newtype_ struct) = (GenHelpers.getWordField struct 1 0 0)
-set_Regression'ymu :: ((Untyped.RWCtx m s)) => (Regression (Message.MutMsg s)) -> Std_.Double -> (m ())
-set_Regression'ymu (Regression'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
-get_Regression'ysd :: ((Untyped.ReadCtx m msg)) => (Regression msg) -> (m Std_.Double)
-get_Regression'ysd (Regression'newtype_ struct) = (GenHelpers.getWordField struct 2 0 0)
-set_Regression'ysd :: ((Untyped.RWCtx m s)) => (Regression (Message.MutMsg s)) -> Std_.Double -> (m ())
-set_Regression'ysd (Regression'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 2 0 0)
-newtype Aircraft msg
-    = Aircraft'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Aircraft msg)) where
-    fromStruct struct = (Std_.pure (Aircraft'newtype_ struct))
-instance (Classes.ToStruct msg (Aircraft msg)) where
-    toStruct (Aircraft'newtype_ struct) = struct
-instance (Untyped.HasMessage (Aircraft msg)) where
-    type InMessage (Aircraft msg) = msg
-    message (Aircraft'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Aircraft msg)) where
-    messageDefault msg = (Aircraft'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Aircraft msg)) where
-    fromPtr msg ptr = (Aircraft'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Aircraft (Message.MutMsg s))) where
-    toPtr msg (Aircraft'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Aircraft (Message.MutMsg s))) where
-    new msg = (Aircraft'newtype_ <$> (Untyped.allocStruct msg 1 1))
-instance (Basics.ListElem msg (Aircraft msg)) where
-    newtype List msg (Aircraft msg)
-        = Aircraft'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Aircraft'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Aircraft'List_ l) = (Untyped.ListStruct l)
-    length (Aircraft'List_ l) = (Untyped.length l)
-    index i (Aircraft'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Aircraft (Message.MutMsg s))) where
-    setIndex (Aircraft'newtype_ elt) i (Aircraft'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Aircraft'List_ <$> (Untyped.allocCompositeList msg 1 1 len))
-data Aircraft' msg
-    = Aircraft'void 
-    | Aircraft'b737 (B737 msg)
-    | Aircraft'a320 (A320 msg)
-    | Aircraft'f16 (F16 msg)
-    | Aircraft'unknown' Std_.Word16
-instance (Classes.FromStruct msg (Aircraft' msg)) where
-    fromStruct struct = (do
-        tag <- (GenHelpers.getTag struct 0)
-        case tag of
-            0 ->
-                (Std_.pure Aircraft'void)
-            1 ->
-                (Aircraft'b737 <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            2 ->
-                (Aircraft'a320 <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            3 ->
-                (Aircraft'f16 <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            _ ->
-                (Std_.pure (Aircraft'unknown' (Std_.fromIntegral tag)))
-        )
-get_Aircraft' :: ((Untyped.ReadCtx m msg)
-                 ,(Classes.FromStruct msg (Aircraft' msg))) => (Aircraft msg) -> (m (Aircraft' msg))
-get_Aircraft' (Aircraft'newtype_ struct) = (Classes.fromStruct struct)
-set_Aircraft'void :: ((Untyped.RWCtx m s)) => (Aircraft (Message.MutMsg s)) -> (m ())
-set_Aircraft'void (Aircraft'newtype_ struct) = (do
-    (GenHelpers.setWordField struct (0 :: Std_.Word16) 0 0 0)
-    (Std_.pure ())
-    )
-set_Aircraft'b737 :: ((Untyped.RWCtx m s)
-                     ,(Classes.ToPtr s (B737 (Message.MutMsg s)))) => (Aircraft (Message.MutMsg s)) -> (B737 (Message.MutMsg s)) -> (m ())
-set_Aircraft'b737 (Aircraft'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (1 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Aircraft'a320 :: ((Untyped.RWCtx m s)
-                     ,(Classes.ToPtr s (A320 (Message.MutMsg s)))) => (Aircraft (Message.MutMsg s)) -> (A320 (Message.MutMsg s)) -> (m ())
-set_Aircraft'a320 (Aircraft'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (2 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Aircraft'f16 :: ((Untyped.RWCtx m s)
-                    ,(Classes.ToPtr s (F16 (Message.MutMsg s)))) => (Aircraft (Message.MutMsg s)) -> (F16 (Message.MutMsg s)) -> (m ())
-set_Aircraft'f16 (Aircraft'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (3 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Aircraft'unknown' :: ((Untyped.RWCtx m s)) => (Aircraft (Message.MutMsg s)) -> Std_.Word16 -> (m ())
-set_Aircraft'unknown' (Aircraft'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
-newtype Z msg
-    = Z'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Z msg)) where
-    fromStruct struct = (Std_.pure (Z'newtype_ struct))
-instance (Classes.ToStruct msg (Z msg)) where
-    toStruct (Z'newtype_ struct) = struct
-instance (Untyped.HasMessage (Z msg)) where
-    type InMessage (Z msg) = msg
-    message (Z'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Z msg)) where
-    messageDefault msg = (Z'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Z msg)) where
-    fromPtr msg ptr = (Z'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Z (Message.MutMsg s))) where
-    toPtr msg (Z'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Z (Message.MutMsg s))) where
-    new msg = (Z'newtype_ <$> (Untyped.allocStruct msg 3 1))
-instance (Basics.ListElem msg (Z msg)) where
-    newtype List msg (Z msg)
-        = Z'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Z'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Z'List_ l) = (Untyped.ListStruct l)
-    length (Z'List_ l) = (Untyped.length l)
-    index i (Z'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Z (Message.MutMsg s))) where
-    setIndex (Z'newtype_ elt) i (Z'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Z'List_ <$> (Untyped.allocCompositeList msg 3 1 len))
-data Z' msg
-    = Z'void 
-    | Z'zz (Z msg)
-    | Z'f64 Std_.Double
-    | Z'f32 Std_.Float
-    | Z'i64 Std_.Int64
-    | Z'i32 Std_.Int32
-    | Z'i16 Std_.Int16
-    | Z'i8 Std_.Int8
-    | Z'u64 Std_.Word64
-    | Z'u32 Std_.Word32
-    | Z'u16 Std_.Word16
-    | Z'u8 Std_.Word8
-    | Z'bool Std_.Bool
-    | Z'text (Basics.Text msg)
-    | Z'blob (Basics.Data msg)
-    | Z'f64vec (Basics.List msg Std_.Double)
-    | Z'f32vec (Basics.List msg Std_.Float)
-    | Z'i64vec (Basics.List msg Std_.Int64)
-    | Z'i32vec (Basics.List msg Std_.Int32)
-    | Z'i16vec (Basics.List msg Std_.Int16)
-    | Z'i8vec (Basics.List msg Std_.Int8)
-    | Z'u64vec (Basics.List msg Std_.Word64)
-    | Z'u32vec (Basics.List msg Std_.Word32)
-    | Z'u16vec (Basics.List msg Std_.Word16)
-    | Z'u8vec (Basics.List msg Std_.Word8)
-    | Z'zvec (Basics.List msg (Z msg))
-    | Z'zvecvec (Basics.List msg (Basics.List msg (Z msg)))
-    | Z'zdate (Zdate msg)
-    | Z'zdata (Zdata msg)
-    | Z'aircraftvec (Basics.List msg (Aircraft msg))
-    | Z'aircraft (Aircraft msg)
-    | Z'regression (Regression msg)
-    | Z'planebase (PlaneBase msg)
-    | Z'airport Airport
-    | Z'b737 (B737 msg)
-    | Z'a320 (A320 msg)
-    | Z'f16 (F16 msg)
-    | Z'zdatevec (Basics.List msg (Zdate msg))
-    | Z'zdatavec (Basics.List msg (Zdata msg))
-    | Z'boolvec (Basics.List msg Std_.Bool)
-    | Z'datavec (Basics.List msg (Basics.Data msg))
-    | Z'textvec (Basics.List msg (Basics.Text msg))
-    | Z'grp (Z'grp msg)
-    | Z'echo (Echo msg)
-    | Z'echoBases (EchoBases msg)
-    | Z'unknown' Std_.Word16
-instance (Classes.FromStruct msg (Z' msg)) where
-    fromStruct struct = (do
-        tag <- (GenHelpers.getTag struct 0)
-        case tag of
-            0 ->
-                (Std_.pure Z'void)
-            1 ->
-                (Z'zz <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            2 ->
-                (Z'f64 <$> (GenHelpers.getWordField struct 1 0 0))
-            3 ->
-                (Z'f32 <$> (GenHelpers.getWordField struct 1 0 0))
-            4 ->
-                (Z'i64 <$> (GenHelpers.getWordField struct 1 0 0))
-            5 ->
-                (Z'i32 <$> (GenHelpers.getWordField struct 1 0 0))
-            6 ->
-                (Z'i16 <$> (GenHelpers.getWordField struct 1 0 0))
-            7 ->
-                (Z'i8 <$> (GenHelpers.getWordField struct 1 0 0))
-            8 ->
-                (Z'u64 <$> (GenHelpers.getWordField struct 1 0 0))
-            9 ->
-                (Z'u32 <$> (GenHelpers.getWordField struct 1 0 0))
-            10 ->
-                (Z'u16 <$> (GenHelpers.getWordField struct 1 0 0))
-            11 ->
-                (Z'u8 <$> (GenHelpers.getWordField struct 1 0 0))
-            12 ->
-                (Z'bool <$> (GenHelpers.getWordField struct 1 0 0))
-            13 ->
-                (Z'text <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            14 ->
-                (Z'blob <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            15 ->
-                (Z'f64vec <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            16 ->
-                (Z'f32vec <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            17 ->
-                (Z'i64vec <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            18 ->
-                (Z'i32vec <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            19 ->
-                (Z'i16vec <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            20 ->
-                (Z'i8vec <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            21 ->
-                (Z'u64vec <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            22 ->
-                (Z'u32vec <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            23 ->
-                (Z'u16vec <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            24 ->
-                (Z'u8vec <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            25 ->
-                (Z'zvec <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            26 ->
-                (Z'zvecvec <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            27 ->
-                (Z'zdate <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            28 ->
-                (Z'zdata <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            29 ->
-                (Z'aircraftvec <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            30 ->
-                (Z'aircraft <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            31 ->
-                (Z'regression <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            32 ->
-                (Z'planebase <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            33 ->
-                (Z'airport <$> (GenHelpers.getWordField struct 1 0 0))
-            34 ->
-                (Z'b737 <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            35 ->
-                (Z'a320 <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            36 ->
-                (Z'f16 <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            37 ->
-                (Z'zdatevec <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            38 ->
-                (Z'zdatavec <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            39 ->
-                (Z'boolvec <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            40 ->
-                (Z'datavec <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            41 ->
-                (Z'textvec <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            42 ->
-                (Z'grp <$> (Classes.fromStruct struct))
-            43 ->
-                (Z'echo <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            44 ->
-                (Z'echoBases <$> (do
-                    ptr <- (Untyped.getPtr 0 struct)
-                    (Classes.fromPtr (Untyped.message struct) ptr)
-                    ))
-            _ ->
-                (Std_.pure (Z'unknown' (Std_.fromIntegral tag)))
-        )
-get_Z' :: ((Untyped.ReadCtx m msg)
-          ,(Classes.FromStruct msg (Z' msg))) => (Z msg) -> (m (Z' msg))
-get_Z' (Z'newtype_ struct) = (Classes.fromStruct struct)
-set_Z'void :: ((Untyped.RWCtx m s)) => (Z (Message.MutMsg s)) -> (m ())
-set_Z'void (Z'newtype_ struct) = (do
-    (GenHelpers.setWordField struct (0 :: Std_.Word16) 0 0 0)
-    (Std_.pure ())
-    )
-set_Z'zz :: ((Untyped.RWCtx m s)
-            ,(Classes.ToPtr s (Z (Message.MutMsg s)))) => (Z (Message.MutMsg s)) -> (Z (Message.MutMsg s)) -> (m ())
-set_Z'zz (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (1 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'f64 :: ((Untyped.RWCtx m s)) => (Z (Message.MutMsg s)) -> Std_.Double -> (m ())
-set_Z'f64 (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (2 :: Std_.Word16) 0 0 0)
-    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
-    )
-set_Z'f32 :: ((Untyped.RWCtx m s)) => (Z (Message.MutMsg s)) -> Std_.Float -> (m ())
-set_Z'f32 (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (3 :: Std_.Word16) 0 0 0)
-    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 1 0 0)
-    )
-set_Z'i64 :: ((Untyped.RWCtx m s)) => (Z (Message.MutMsg s)) -> Std_.Int64 -> (m ())
-set_Z'i64 (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (4 :: Std_.Word16) 0 0 0)
-    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
-    )
-set_Z'i32 :: ((Untyped.RWCtx m s)) => (Z (Message.MutMsg s)) -> Std_.Int32 -> (m ())
-set_Z'i32 (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (5 :: Std_.Word16) 0 0 0)
-    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 1 0 0)
-    )
-set_Z'i16 :: ((Untyped.RWCtx m s)) => (Z (Message.MutMsg s)) -> Std_.Int16 -> (m ())
-set_Z'i16 (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (6 :: Std_.Word16) 0 0 0)
-    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 1 0 0)
-    )
-set_Z'i8 :: ((Untyped.RWCtx m s)) => (Z (Message.MutMsg s)) -> Std_.Int8 -> (m ())
-set_Z'i8 (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (7 :: Std_.Word16) 0 0 0)
-    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word8) 1 0 0)
-    )
-set_Z'u64 :: ((Untyped.RWCtx m s)) => (Z (Message.MutMsg s)) -> Std_.Word64 -> (m ())
-set_Z'u64 (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (8 :: Std_.Word16) 0 0 0)
-    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
-    )
-set_Z'u32 :: ((Untyped.RWCtx m s)) => (Z (Message.MutMsg s)) -> Std_.Word32 -> (m ())
-set_Z'u32 (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (9 :: Std_.Word16) 0 0 0)
-    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 1 0 0)
-    )
-set_Z'u16 :: ((Untyped.RWCtx m s)) => (Z (Message.MutMsg s)) -> Std_.Word16 -> (m ())
-set_Z'u16 (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (10 :: Std_.Word16) 0 0 0)
-    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 1 0 0)
-    )
-set_Z'u8 :: ((Untyped.RWCtx m s)) => (Z (Message.MutMsg s)) -> Std_.Word8 -> (m ())
-set_Z'u8 (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (11 :: Std_.Word16) 0 0 0)
-    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word8) 1 0 0)
-    )
-set_Z'bool :: ((Untyped.RWCtx m s)) => (Z (Message.MutMsg s)) -> Std_.Bool -> (m ())
-set_Z'bool (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (12 :: Std_.Word16) 0 0 0)
-    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 1 0 0)
-    )
-set_Z'text :: ((Untyped.RWCtx m s)
-              ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (Z (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
-set_Z'text (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (13 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'blob :: ((Untyped.RWCtx m s)
-              ,(Classes.ToPtr s (Basics.Data (Message.MutMsg s)))) => (Z (Message.MutMsg s)) -> (Basics.Data (Message.MutMsg s)) -> (m ())
-set_Z'blob (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (14 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'f64vec :: ((Untyped.RWCtx m s)
-                ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) Std_.Double))) => (Z (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) Std_.Double) -> (m ())
-set_Z'f64vec (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (15 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'f32vec :: ((Untyped.RWCtx m s)
-                ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) Std_.Float))) => (Z (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) Std_.Float) -> (m ())
-set_Z'f32vec (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (16 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'i64vec :: ((Untyped.RWCtx m s)
-                ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) Std_.Int64))) => (Z (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) Std_.Int64) -> (m ())
-set_Z'i64vec (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (17 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'i32vec :: ((Untyped.RWCtx m s)
-                ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) Std_.Int32))) => (Z (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) Std_.Int32) -> (m ())
-set_Z'i32vec (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (18 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'i16vec :: ((Untyped.RWCtx m s)
-                ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) Std_.Int16))) => (Z (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) Std_.Int16) -> (m ())
-set_Z'i16vec (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (19 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'i8vec :: ((Untyped.RWCtx m s)
-               ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) Std_.Int8))) => (Z (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) Std_.Int8) -> (m ())
-set_Z'i8vec (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (20 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'u64vec :: ((Untyped.RWCtx m s)
-                ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) Std_.Word64))) => (Z (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) Std_.Word64) -> (m ())
-set_Z'u64vec (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (21 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'u32vec :: ((Untyped.RWCtx m s)
-                ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) Std_.Word32))) => (Z (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) Std_.Word32) -> (m ())
-set_Z'u32vec (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (22 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'u16vec :: ((Untyped.RWCtx m s)
-                ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) Std_.Word16))) => (Z (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) Std_.Word16) -> (m ())
-set_Z'u16vec (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (23 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'u8vec :: ((Untyped.RWCtx m s)
-               ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) Std_.Word8))) => (Z (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) Std_.Word8) -> (m ())
-set_Z'u8vec (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (24 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'zvec :: ((Untyped.RWCtx m s)
-              ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Z (Message.MutMsg s))))) => (Z (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Z (Message.MutMsg s))) -> (m ())
-set_Z'zvec (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (25 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'zvecvec :: ((Untyped.RWCtx m s)
-                 ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Basics.List (Message.MutMsg s) (Z (Message.MutMsg s)))))) => (Z (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Basics.List (Message.MutMsg s) (Z (Message.MutMsg s)))) -> (m ())
-set_Z'zvecvec (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (26 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'zdate :: ((Untyped.RWCtx m s)
-               ,(Classes.ToPtr s (Zdate (Message.MutMsg s)))) => (Z (Message.MutMsg s)) -> (Zdate (Message.MutMsg s)) -> (m ())
-set_Z'zdate (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (27 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'zdata :: ((Untyped.RWCtx m s)
-               ,(Classes.ToPtr s (Zdata (Message.MutMsg s)))) => (Z (Message.MutMsg s)) -> (Zdata (Message.MutMsg s)) -> (m ())
-set_Z'zdata (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (28 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'aircraftvec :: ((Untyped.RWCtx m s)
-                     ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Aircraft (Message.MutMsg s))))) => (Z (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Aircraft (Message.MutMsg s))) -> (m ())
-set_Z'aircraftvec (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (29 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'aircraft :: ((Untyped.RWCtx m s)
-                  ,(Classes.ToPtr s (Aircraft (Message.MutMsg s)))) => (Z (Message.MutMsg s)) -> (Aircraft (Message.MutMsg s)) -> (m ())
-set_Z'aircraft (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (30 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'regression :: ((Untyped.RWCtx m s)
-                    ,(Classes.ToPtr s (Regression (Message.MutMsg s)))) => (Z (Message.MutMsg s)) -> (Regression (Message.MutMsg s)) -> (m ())
-set_Z'regression (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (31 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'planebase :: ((Untyped.RWCtx m s)
-                   ,(Classes.ToPtr s (PlaneBase (Message.MutMsg s)))) => (Z (Message.MutMsg s)) -> (PlaneBase (Message.MutMsg s)) -> (m ())
-set_Z'planebase (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (32 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'airport :: ((Untyped.RWCtx m s)) => (Z (Message.MutMsg s)) -> Airport -> (m ())
-set_Z'airport (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (33 :: Std_.Word16) 0 0 0)
-    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 1 0 0)
-    )
-set_Z'b737 :: ((Untyped.RWCtx m s)
-              ,(Classes.ToPtr s (B737 (Message.MutMsg s)))) => (Z (Message.MutMsg s)) -> (B737 (Message.MutMsg s)) -> (m ())
-set_Z'b737 (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (34 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'a320 :: ((Untyped.RWCtx m s)
-              ,(Classes.ToPtr s (A320 (Message.MutMsg s)))) => (Z (Message.MutMsg s)) -> (A320 (Message.MutMsg s)) -> (m ())
-set_Z'a320 (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (35 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'f16 :: ((Untyped.RWCtx m s)
-             ,(Classes.ToPtr s (F16 (Message.MutMsg s)))) => (Z (Message.MutMsg s)) -> (F16 (Message.MutMsg s)) -> (m ())
-set_Z'f16 (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (36 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'zdatevec :: ((Untyped.RWCtx m s)
-                  ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Zdate (Message.MutMsg s))))) => (Z (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Zdate (Message.MutMsg s))) -> (m ())
-set_Z'zdatevec (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (37 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'zdatavec :: ((Untyped.RWCtx m s)
-                  ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Zdata (Message.MutMsg s))))) => (Z (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Zdata (Message.MutMsg s))) -> (m ())
-set_Z'zdatavec (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (38 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'boolvec :: ((Untyped.RWCtx m s)
-                 ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) Std_.Bool))) => (Z (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) Std_.Bool) -> (m ())
-set_Z'boolvec (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (39 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'datavec :: ((Untyped.RWCtx m s)
-                 ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Basics.Data (Message.MutMsg s))))) => (Z (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Basics.Data (Message.MutMsg s))) -> (m ())
-set_Z'datavec (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (40 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'textvec :: ((Untyped.RWCtx m s)
-                 ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Basics.Text (Message.MutMsg s))))) => (Z (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Basics.Text (Message.MutMsg s))) -> (m ())
-set_Z'textvec (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (41 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'grp :: ((Untyped.RWCtx m s)
-             ,(Classes.FromStruct (Message.MutMsg s) (Z'grp (Message.MutMsg s)))) => (Z (Message.MutMsg s)) -> (m (Z'grp (Message.MutMsg s)))
-set_Z'grp (Z'newtype_ struct) = (do
-    (GenHelpers.setWordField struct (42 :: Std_.Word16) 0 0 0)
-    (Classes.fromStruct struct)
-    )
-set_Z'echo :: ((Untyped.RWCtx m s)
-              ,(Classes.ToPtr s (Echo (Message.MutMsg s)))) => (Z (Message.MutMsg s)) -> (Echo (Message.MutMsg s)) -> (m ())
-set_Z'echo (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (43 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'echoBases :: ((Untyped.RWCtx m s)
-                   ,(Classes.ToPtr s (EchoBases (Message.MutMsg s)))) => (Z (Message.MutMsg s)) -> (EchoBases (Message.MutMsg s)) -> (m ())
-set_Z'echoBases (Z'newtype_ struct) value = (do
-    (GenHelpers.setWordField struct (44 :: Std_.Word16) 0 0 0)
-    (do
-        ptr <- (Classes.toPtr (Untyped.message struct) value)
-        (Untyped.setPtr ptr 0 struct)
-        )
-    )
-set_Z'unknown' :: ((Untyped.RWCtx m s)) => (Z (Message.MutMsg s)) -> Std_.Word16 -> (m ())
-set_Z'unknown' (Z'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
-newtype Z'grp msg
-    = Z'grp'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Z'grp msg)) where
-    fromStruct struct = (Std_.pure (Z'grp'newtype_ struct))
-instance (Classes.ToStruct msg (Z'grp msg)) where
-    toStruct (Z'grp'newtype_ struct) = struct
-instance (Untyped.HasMessage (Z'grp msg)) where
-    type InMessage (Z'grp msg) = msg
-    message (Z'grp'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Z'grp msg)) where
-    messageDefault msg = (Z'grp'newtype_ <$> (Untyped.messageDefault msg))
-get_Z'grp'first :: ((Untyped.ReadCtx m msg)) => (Z'grp msg) -> (m Std_.Word64)
-get_Z'grp'first (Z'grp'newtype_ struct) = (GenHelpers.getWordField struct 1 0 0)
-set_Z'grp'first :: ((Untyped.RWCtx m s)) => (Z'grp (Message.MutMsg s)) -> Std_.Word64 -> (m ())
-set_Z'grp'first (Z'grp'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
-get_Z'grp'second :: ((Untyped.ReadCtx m msg)) => (Z'grp msg) -> (m Std_.Word64)
-get_Z'grp'second (Z'grp'newtype_ struct) = (GenHelpers.getWordField struct 2 0 0)
-set_Z'grp'second :: ((Untyped.RWCtx m s)) => (Z'grp (Message.MutMsg s)) -> Std_.Word64 -> (m ())
-set_Z'grp'second (Z'grp'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 2 0 0)
-newtype Counter msg
-    = Counter'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Counter msg)) where
-    fromStruct struct = (Std_.pure (Counter'newtype_ struct))
-instance (Classes.ToStruct msg (Counter msg)) where
-    toStruct (Counter'newtype_ struct) = struct
-instance (Untyped.HasMessage (Counter msg)) where
-    type InMessage (Counter msg) = msg
-    message (Counter'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Counter msg)) where
-    messageDefault msg = (Counter'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Counter msg)) where
-    fromPtr msg ptr = (Counter'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Counter (Message.MutMsg s))) where
-    toPtr msg (Counter'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Counter (Message.MutMsg s))) where
-    new msg = (Counter'newtype_ <$> (Untyped.allocStruct msg 1 2))
-instance (Basics.ListElem msg (Counter msg)) where
-    newtype List msg (Counter msg)
-        = Counter'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Counter'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Counter'List_ l) = (Untyped.ListStruct l)
-    length (Counter'List_ l) = (Untyped.length l)
-    index i (Counter'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Counter (Message.MutMsg s))) where
-    setIndex (Counter'newtype_ elt) i (Counter'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Counter'List_ <$> (Untyped.allocCompositeList msg 1 2 len))
-get_Counter'size :: ((Untyped.ReadCtx m msg)) => (Counter msg) -> (m Std_.Int64)
-get_Counter'size (Counter'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_Counter'size :: ((Untyped.RWCtx m s)) => (Counter (Message.MutMsg s)) -> Std_.Int64 -> (m ())
-set_Counter'size (Counter'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 0 0 0)
-get_Counter'words :: ((Untyped.ReadCtx m msg)
-                     ,(Classes.FromPtr msg (Basics.Text msg))) => (Counter msg) -> (m (Basics.Text msg))
-get_Counter'words (Counter'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_Counter'words :: ((Untyped.RWCtx m s)
-                     ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (Counter (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
-set_Counter'words (Counter'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_Counter'words :: ((Untyped.ReadCtx m msg)) => (Counter msg) -> (m Std_.Bool)
-has_Counter'words (Counter'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Counter'words :: ((Untyped.RWCtx m s)) => Std_.Int -> (Counter (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
-new_Counter'words len struct = (do
-    result <- (Basics.newText (Untyped.message struct) len)
-    (set_Counter'words struct result)
-    (Std_.pure result)
-    )
-get_Counter'wordlist :: ((Untyped.ReadCtx m msg)
-                        ,(Classes.FromPtr msg (Basics.List msg (Basics.Text msg)))) => (Counter msg) -> (m (Basics.List msg (Basics.Text msg)))
-get_Counter'wordlist (Counter'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 1 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_Counter'wordlist :: ((Untyped.RWCtx m s)
-                        ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Basics.Text (Message.MutMsg s))))) => (Counter (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Basics.Text (Message.MutMsg s))) -> (m ())
-set_Counter'wordlist (Counter'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 1 struct)
-    )
-has_Counter'wordlist :: ((Untyped.ReadCtx m msg)) => (Counter msg) -> (m Std_.Bool)
-has_Counter'wordlist (Counter'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_Counter'wordlist :: ((Untyped.RWCtx m s)) => Std_.Int -> (Counter (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Basics.Text (Message.MutMsg s))))
-new_Counter'wordlist len struct = (do
-    result <- (Classes.newList (Untyped.message struct) len)
-    (set_Counter'wordlist struct result)
-    (Std_.pure result)
-    )
-newtype Bag msg
-    = Bag'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Bag msg)) where
-    fromStruct struct = (Std_.pure (Bag'newtype_ struct))
-instance (Classes.ToStruct msg (Bag msg)) where
-    toStruct (Bag'newtype_ struct) = struct
-instance (Untyped.HasMessage (Bag msg)) where
-    type InMessage (Bag msg) = msg
-    message (Bag'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Bag msg)) where
-    messageDefault msg = (Bag'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Bag msg)) where
-    fromPtr msg ptr = (Bag'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Bag (Message.MutMsg s))) where
-    toPtr msg (Bag'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Bag (Message.MutMsg s))) where
-    new msg = (Bag'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Bag msg)) where
-    newtype List msg (Bag msg)
-        = Bag'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Bag'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Bag'List_ l) = (Untyped.ListStruct l)
-    length (Bag'List_ l) = (Untyped.length l)
-    index i (Bag'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Bag (Message.MutMsg s))) where
-    setIndex (Bag'newtype_ elt) i (Bag'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Bag'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_Bag'counter :: ((Untyped.ReadCtx m msg)
-                   ,(Classes.FromPtr msg (Counter msg))) => (Bag msg) -> (m (Counter msg))
-get_Bag'counter (Bag'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_Bag'counter :: ((Untyped.RWCtx m s)
-                   ,(Classes.ToPtr s (Counter (Message.MutMsg s)))) => (Bag (Message.MutMsg s)) -> (Counter (Message.MutMsg s)) -> (m ())
-set_Bag'counter (Bag'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_Bag'counter :: ((Untyped.ReadCtx m msg)) => (Bag msg) -> (m Std_.Bool)
-has_Bag'counter (Bag'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Bag'counter :: ((Untyped.RWCtx m s)) => (Bag (Message.MutMsg s)) -> (m (Counter (Message.MutMsg s)))
-new_Bag'counter struct = (do
-    result <- (Classes.new (Untyped.message struct))
-    (set_Bag'counter struct result)
-    (Std_.pure result)
-    )
-newtype Zserver msg
-    = Zserver'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Zserver msg)) where
-    fromStruct struct = (Std_.pure (Zserver'newtype_ struct))
-instance (Classes.ToStruct msg (Zserver msg)) where
-    toStruct (Zserver'newtype_ struct) = struct
-instance (Untyped.HasMessage (Zserver msg)) where
-    type InMessage (Zserver msg) = msg
-    message (Zserver'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Zserver msg)) where
-    messageDefault msg = (Zserver'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Zserver msg)) where
-    fromPtr msg ptr = (Zserver'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Zserver (Message.MutMsg s))) where
-    toPtr msg (Zserver'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Zserver (Message.MutMsg s))) where
-    new msg = (Zserver'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Zserver msg)) where
-    newtype List msg (Zserver msg)
-        = Zserver'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Zserver'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Zserver'List_ l) = (Untyped.ListStruct l)
-    length (Zserver'List_ l) = (Untyped.length l)
-    index i (Zserver'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Zserver (Message.MutMsg s))) where
-    setIndex (Zserver'newtype_ elt) i (Zserver'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Zserver'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_Zserver'waitingjobs :: ((Untyped.ReadCtx m msg)
-                           ,(Classes.FromPtr msg (Basics.List msg (Zjob msg)))) => (Zserver msg) -> (m (Basics.List msg (Zjob msg)))
-get_Zserver'waitingjobs (Zserver'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_Zserver'waitingjobs :: ((Untyped.RWCtx m s)
-                           ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Zjob (Message.MutMsg s))))) => (Zserver (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Zjob (Message.MutMsg s))) -> (m ())
-set_Zserver'waitingjobs (Zserver'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_Zserver'waitingjobs :: ((Untyped.ReadCtx m msg)) => (Zserver msg) -> (m Std_.Bool)
-has_Zserver'waitingjobs (Zserver'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Zserver'waitingjobs :: ((Untyped.RWCtx m s)) => Std_.Int -> (Zserver (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Zjob (Message.MutMsg s))))
-new_Zserver'waitingjobs len struct = (do
-    result <- (Classes.newList (Untyped.message struct) len)
-    (set_Zserver'waitingjobs struct result)
-    (Std_.pure result)
-    )
-newtype Zjob msg
-    = Zjob'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Zjob msg)) where
-    fromStruct struct = (Std_.pure (Zjob'newtype_ struct))
-instance (Classes.ToStruct msg (Zjob msg)) where
-    toStruct (Zjob'newtype_ struct) = struct
-instance (Untyped.HasMessage (Zjob msg)) where
-    type InMessage (Zjob msg) = msg
-    message (Zjob'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Zjob msg)) where
-    messageDefault msg = (Zjob'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Zjob msg)) where
-    fromPtr msg ptr = (Zjob'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Zjob (Message.MutMsg s))) where
-    toPtr msg (Zjob'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Zjob (Message.MutMsg s))) where
-    new msg = (Zjob'newtype_ <$> (Untyped.allocStruct msg 0 2))
-instance (Basics.ListElem msg (Zjob msg)) where
-    newtype List msg (Zjob msg)
-        = Zjob'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Zjob'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Zjob'List_ l) = (Untyped.ListStruct l)
-    length (Zjob'List_ l) = (Untyped.length l)
-    index i (Zjob'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Zjob (Message.MutMsg s))) where
-    setIndex (Zjob'newtype_ elt) i (Zjob'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Zjob'List_ <$> (Untyped.allocCompositeList msg 0 2 len))
-get_Zjob'cmd :: ((Untyped.ReadCtx m msg)
-                ,(Classes.FromPtr msg (Basics.Text msg))) => (Zjob msg) -> (m (Basics.Text msg))
-get_Zjob'cmd (Zjob'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_Zjob'cmd :: ((Untyped.RWCtx m s)
-                ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (Zjob (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
-set_Zjob'cmd (Zjob'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_Zjob'cmd :: ((Untyped.ReadCtx m msg)) => (Zjob msg) -> (m Std_.Bool)
-has_Zjob'cmd (Zjob'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Zjob'cmd :: ((Untyped.RWCtx m s)) => Std_.Int -> (Zjob (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
-new_Zjob'cmd len struct = (do
-    result <- (Basics.newText (Untyped.message struct) len)
-    (set_Zjob'cmd struct result)
-    (Std_.pure result)
-    )
-get_Zjob'args :: ((Untyped.ReadCtx m msg)
-                 ,(Classes.FromPtr msg (Basics.List msg (Basics.Text msg)))) => (Zjob msg) -> (m (Basics.List msg (Basics.Text msg)))
-get_Zjob'args (Zjob'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 1 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_Zjob'args :: ((Untyped.RWCtx m s)
-                 ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Basics.Text (Message.MutMsg s))))) => (Zjob (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Basics.Text (Message.MutMsg s))) -> (m ())
-set_Zjob'args (Zjob'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 1 struct)
-    )
-has_Zjob'args :: ((Untyped.ReadCtx m msg)) => (Zjob msg) -> (m Std_.Bool)
-has_Zjob'args (Zjob'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_Zjob'args :: ((Untyped.RWCtx m s)) => Std_.Int -> (Zjob (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Basics.Text (Message.MutMsg s))))
-new_Zjob'args len struct = (do
-    result <- (Classes.newList (Untyped.message struct) len)
-    (set_Zjob'args struct result)
-    (Std_.pure result)
-    )
-newtype VerEmpty msg
-    = VerEmpty'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (VerEmpty msg)) where
-    fromStruct struct = (Std_.pure (VerEmpty'newtype_ struct))
-instance (Classes.ToStruct msg (VerEmpty msg)) where
-    toStruct (VerEmpty'newtype_ struct) = struct
-instance (Untyped.HasMessage (VerEmpty msg)) where
-    type InMessage (VerEmpty msg) = msg
-    message (VerEmpty'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (VerEmpty msg)) where
-    messageDefault msg = (VerEmpty'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (VerEmpty msg)) where
-    fromPtr msg ptr = (VerEmpty'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (VerEmpty (Message.MutMsg s))) where
-    toPtr msg (VerEmpty'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (VerEmpty (Message.MutMsg s))) where
-    new msg = (VerEmpty'newtype_ <$> (Untyped.allocStruct msg 0 0))
-instance (Basics.ListElem msg (VerEmpty msg)) where
-    newtype List msg (VerEmpty msg)
-        = VerEmpty'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (VerEmpty'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (VerEmpty'List_ l) = (Untyped.ListStruct l)
-    length (VerEmpty'List_ l) = (Untyped.length l)
-    index i (VerEmpty'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (VerEmpty (Message.MutMsg s))) where
-    setIndex (VerEmpty'newtype_ elt) i (VerEmpty'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (VerEmpty'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
-newtype VerOneData msg
-    = VerOneData'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (VerOneData msg)) where
-    fromStruct struct = (Std_.pure (VerOneData'newtype_ struct))
-instance (Classes.ToStruct msg (VerOneData msg)) where
-    toStruct (VerOneData'newtype_ struct) = struct
-instance (Untyped.HasMessage (VerOneData msg)) where
-    type InMessage (VerOneData msg) = msg
-    message (VerOneData'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (VerOneData msg)) where
-    messageDefault msg = (VerOneData'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (VerOneData msg)) where
-    fromPtr msg ptr = (VerOneData'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (VerOneData (Message.MutMsg s))) where
-    toPtr msg (VerOneData'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (VerOneData (Message.MutMsg s))) where
-    new msg = (VerOneData'newtype_ <$> (Untyped.allocStruct msg 1 0))
-instance (Basics.ListElem msg (VerOneData msg)) where
-    newtype List msg (VerOneData msg)
-        = VerOneData'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (VerOneData'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (VerOneData'List_ l) = (Untyped.ListStruct l)
-    length (VerOneData'List_ l) = (Untyped.length l)
-    index i (VerOneData'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (VerOneData (Message.MutMsg s))) where
-    setIndex (VerOneData'newtype_ elt) i (VerOneData'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (VerOneData'List_ <$> (Untyped.allocCompositeList msg 1 0 len))
-get_VerOneData'val :: ((Untyped.ReadCtx m msg)) => (VerOneData msg) -> (m Std_.Int16)
-get_VerOneData'val (VerOneData'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_VerOneData'val :: ((Untyped.RWCtx m s)) => (VerOneData (Message.MutMsg s)) -> Std_.Int16 -> (m ())
-set_VerOneData'val (VerOneData'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
-newtype VerTwoData msg
-    = VerTwoData'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (VerTwoData msg)) where
-    fromStruct struct = (Std_.pure (VerTwoData'newtype_ struct))
-instance (Classes.ToStruct msg (VerTwoData msg)) where
-    toStruct (VerTwoData'newtype_ struct) = struct
-instance (Untyped.HasMessage (VerTwoData msg)) where
-    type InMessage (VerTwoData msg) = msg
-    message (VerTwoData'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (VerTwoData msg)) where
-    messageDefault msg = (VerTwoData'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (VerTwoData msg)) where
-    fromPtr msg ptr = (VerTwoData'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (VerTwoData (Message.MutMsg s))) where
-    toPtr msg (VerTwoData'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (VerTwoData (Message.MutMsg s))) where
-    new msg = (VerTwoData'newtype_ <$> (Untyped.allocStruct msg 2 0))
-instance (Basics.ListElem msg (VerTwoData msg)) where
-    newtype List msg (VerTwoData msg)
-        = VerTwoData'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (VerTwoData'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (VerTwoData'List_ l) = (Untyped.ListStruct l)
-    length (VerTwoData'List_ l) = (Untyped.length l)
-    index i (VerTwoData'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (VerTwoData (Message.MutMsg s))) where
-    setIndex (VerTwoData'newtype_ elt) i (VerTwoData'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (VerTwoData'List_ <$> (Untyped.allocCompositeList msg 2 0 len))
-get_VerTwoData'val :: ((Untyped.ReadCtx m msg)) => (VerTwoData msg) -> (m Std_.Int16)
-get_VerTwoData'val (VerTwoData'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_VerTwoData'val :: ((Untyped.RWCtx m s)) => (VerTwoData (Message.MutMsg s)) -> Std_.Int16 -> (m ())
-set_VerTwoData'val (VerTwoData'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
-get_VerTwoData'duo :: ((Untyped.ReadCtx m msg)) => (VerTwoData msg) -> (m Std_.Int64)
-get_VerTwoData'duo (VerTwoData'newtype_ struct) = (GenHelpers.getWordField struct 1 0 0)
-set_VerTwoData'duo :: ((Untyped.RWCtx m s)) => (VerTwoData (Message.MutMsg s)) -> Std_.Int64 -> (m ())
-set_VerTwoData'duo (VerTwoData'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
-newtype VerOnePtr msg
-    = VerOnePtr'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (VerOnePtr msg)) where
-    fromStruct struct = (Std_.pure (VerOnePtr'newtype_ struct))
-instance (Classes.ToStruct msg (VerOnePtr msg)) where
-    toStruct (VerOnePtr'newtype_ struct) = struct
-instance (Untyped.HasMessage (VerOnePtr msg)) where
-    type InMessage (VerOnePtr msg) = msg
-    message (VerOnePtr'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (VerOnePtr msg)) where
-    messageDefault msg = (VerOnePtr'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (VerOnePtr msg)) where
-    fromPtr msg ptr = (VerOnePtr'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (VerOnePtr (Message.MutMsg s))) where
-    toPtr msg (VerOnePtr'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (VerOnePtr (Message.MutMsg s))) where
-    new msg = (VerOnePtr'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (VerOnePtr msg)) where
-    newtype List msg (VerOnePtr msg)
-        = VerOnePtr'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (VerOnePtr'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (VerOnePtr'List_ l) = (Untyped.ListStruct l)
-    length (VerOnePtr'List_ l) = (Untyped.length l)
-    index i (VerOnePtr'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (VerOnePtr (Message.MutMsg s))) where
-    setIndex (VerOnePtr'newtype_ elt) i (VerOnePtr'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (VerOnePtr'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_VerOnePtr'ptr :: ((Untyped.ReadCtx m msg)
-                     ,(Classes.FromPtr msg (VerOneData msg))) => (VerOnePtr msg) -> (m (VerOneData msg))
-get_VerOnePtr'ptr (VerOnePtr'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_VerOnePtr'ptr :: ((Untyped.RWCtx m s)
-                     ,(Classes.ToPtr s (VerOneData (Message.MutMsg s)))) => (VerOnePtr (Message.MutMsg s)) -> (VerOneData (Message.MutMsg s)) -> (m ())
-set_VerOnePtr'ptr (VerOnePtr'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_VerOnePtr'ptr :: ((Untyped.ReadCtx m msg)) => (VerOnePtr msg) -> (m Std_.Bool)
-has_VerOnePtr'ptr (VerOnePtr'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_VerOnePtr'ptr :: ((Untyped.RWCtx m s)) => (VerOnePtr (Message.MutMsg s)) -> (m (VerOneData (Message.MutMsg s)))
-new_VerOnePtr'ptr struct = (do
-    result <- (Classes.new (Untyped.message struct))
-    (set_VerOnePtr'ptr struct result)
-    (Std_.pure result)
-    )
-newtype VerTwoPtr msg
-    = VerTwoPtr'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (VerTwoPtr msg)) where
-    fromStruct struct = (Std_.pure (VerTwoPtr'newtype_ struct))
-instance (Classes.ToStruct msg (VerTwoPtr msg)) where
-    toStruct (VerTwoPtr'newtype_ struct) = struct
-instance (Untyped.HasMessage (VerTwoPtr msg)) where
-    type InMessage (VerTwoPtr msg) = msg
-    message (VerTwoPtr'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (VerTwoPtr msg)) where
-    messageDefault msg = (VerTwoPtr'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (VerTwoPtr msg)) where
-    fromPtr msg ptr = (VerTwoPtr'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (VerTwoPtr (Message.MutMsg s))) where
-    toPtr msg (VerTwoPtr'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (VerTwoPtr (Message.MutMsg s))) where
-    new msg = (VerTwoPtr'newtype_ <$> (Untyped.allocStruct msg 0 2))
-instance (Basics.ListElem msg (VerTwoPtr msg)) where
-    newtype List msg (VerTwoPtr msg)
-        = VerTwoPtr'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (VerTwoPtr'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (VerTwoPtr'List_ l) = (Untyped.ListStruct l)
-    length (VerTwoPtr'List_ l) = (Untyped.length l)
-    index i (VerTwoPtr'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (VerTwoPtr (Message.MutMsg s))) where
-    setIndex (VerTwoPtr'newtype_ elt) i (VerTwoPtr'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (VerTwoPtr'List_ <$> (Untyped.allocCompositeList msg 0 2 len))
-get_VerTwoPtr'ptr1 :: ((Untyped.ReadCtx m msg)
-                      ,(Classes.FromPtr msg (VerOneData msg))) => (VerTwoPtr msg) -> (m (VerOneData msg))
-get_VerTwoPtr'ptr1 (VerTwoPtr'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_VerTwoPtr'ptr1 :: ((Untyped.RWCtx m s)
-                      ,(Classes.ToPtr s (VerOneData (Message.MutMsg s)))) => (VerTwoPtr (Message.MutMsg s)) -> (VerOneData (Message.MutMsg s)) -> (m ())
-set_VerTwoPtr'ptr1 (VerTwoPtr'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_VerTwoPtr'ptr1 :: ((Untyped.ReadCtx m msg)) => (VerTwoPtr msg) -> (m Std_.Bool)
-has_VerTwoPtr'ptr1 (VerTwoPtr'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_VerTwoPtr'ptr1 :: ((Untyped.RWCtx m s)) => (VerTwoPtr (Message.MutMsg s)) -> (m (VerOneData (Message.MutMsg s)))
-new_VerTwoPtr'ptr1 struct = (do
-    result <- (Classes.new (Untyped.message struct))
-    (set_VerTwoPtr'ptr1 struct result)
-    (Std_.pure result)
-    )
-get_VerTwoPtr'ptr2 :: ((Untyped.ReadCtx m msg)
-                      ,(Classes.FromPtr msg (VerOneData msg))) => (VerTwoPtr msg) -> (m (VerOneData msg))
-get_VerTwoPtr'ptr2 (VerTwoPtr'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 1 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_VerTwoPtr'ptr2 :: ((Untyped.RWCtx m s)
-                      ,(Classes.ToPtr s (VerOneData (Message.MutMsg s)))) => (VerTwoPtr (Message.MutMsg s)) -> (VerOneData (Message.MutMsg s)) -> (m ())
-set_VerTwoPtr'ptr2 (VerTwoPtr'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 1 struct)
-    )
-has_VerTwoPtr'ptr2 :: ((Untyped.ReadCtx m msg)) => (VerTwoPtr msg) -> (m Std_.Bool)
-has_VerTwoPtr'ptr2 (VerTwoPtr'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_VerTwoPtr'ptr2 :: ((Untyped.RWCtx m s)) => (VerTwoPtr (Message.MutMsg s)) -> (m (VerOneData (Message.MutMsg s)))
-new_VerTwoPtr'ptr2 struct = (do
-    result <- (Classes.new (Untyped.message struct))
-    (set_VerTwoPtr'ptr2 struct result)
-    (Std_.pure result)
-    )
-newtype VerTwoDataTwoPtr msg
-    = VerTwoDataTwoPtr'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (VerTwoDataTwoPtr msg)) where
-    fromStruct struct = (Std_.pure (VerTwoDataTwoPtr'newtype_ struct))
-instance (Classes.ToStruct msg (VerTwoDataTwoPtr msg)) where
-    toStruct (VerTwoDataTwoPtr'newtype_ struct) = struct
-instance (Untyped.HasMessage (VerTwoDataTwoPtr msg)) where
-    type InMessage (VerTwoDataTwoPtr msg) = msg
-    message (VerTwoDataTwoPtr'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (VerTwoDataTwoPtr msg)) where
-    messageDefault msg = (VerTwoDataTwoPtr'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (VerTwoDataTwoPtr msg)) where
-    fromPtr msg ptr = (VerTwoDataTwoPtr'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (VerTwoDataTwoPtr (Message.MutMsg s))) where
-    toPtr msg (VerTwoDataTwoPtr'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (VerTwoDataTwoPtr (Message.MutMsg s))) where
-    new msg = (VerTwoDataTwoPtr'newtype_ <$> (Untyped.allocStruct msg 2 2))
-instance (Basics.ListElem msg (VerTwoDataTwoPtr msg)) where
-    newtype List msg (VerTwoDataTwoPtr msg)
-        = VerTwoDataTwoPtr'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (VerTwoDataTwoPtr'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (VerTwoDataTwoPtr'List_ l) = (Untyped.ListStruct l)
-    length (VerTwoDataTwoPtr'List_ l) = (Untyped.length l)
-    index i (VerTwoDataTwoPtr'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (VerTwoDataTwoPtr (Message.MutMsg s))) where
-    setIndex (VerTwoDataTwoPtr'newtype_ elt) i (VerTwoDataTwoPtr'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (VerTwoDataTwoPtr'List_ <$> (Untyped.allocCompositeList msg 2 2 len))
-get_VerTwoDataTwoPtr'val :: ((Untyped.ReadCtx m msg)) => (VerTwoDataTwoPtr msg) -> (m Std_.Int16)
-get_VerTwoDataTwoPtr'val (VerTwoDataTwoPtr'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_VerTwoDataTwoPtr'val :: ((Untyped.RWCtx m s)) => (VerTwoDataTwoPtr (Message.MutMsg s)) -> Std_.Int16 -> (m ())
-set_VerTwoDataTwoPtr'val (VerTwoDataTwoPtr'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
-get_VerTwoDataTwoPtr'duo :: ((Untyped.ReadCtx m msg)) => (VerTwoDataTwoPtr msg) -> (m Std_.Int64)
-get_VerTwoDataTwoPtr'duo (VerTwoDataTwoPtr'newtype_ struct) = (GenHelpers.getWordField struct 1 0 0)
-set_VerTwoDataTwoPtr'duo :: ((Untyped.RWCtx m s)) => (VerTwoDataTwoPtr (Message.MutMsg s)) -> Std_.Int64 -> (m ())
-set_VerTwoDataTwoPtr'duo (VerTwoDataTwoPtr'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
-get_VerTwoDataTwoPtr'ptr1 :: ((Untyped.ReadCtx m msg)
-                             ,(Classes.FromPtr msg (VerOneData msg))) => (VerTwoDataTwoPtr msg) -> (m (VerOneData msg))
-get_VerTwoDataTwoPtr'ptr1 (VerTwoDataTwoPtr'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_VerTwoDataTwoPtr'ptr1 :: ((Untyped.RWCtx m s)
-                             ,(Classes.ToPtr s (VerOneData (Message.MutMsg s)))) => (VerTwoDataTwoPtr (Message.MutMsg s)) -> (VerOneData (Message.MutMsg s)) -> (m ())
-set_VerTwoDataTwoPtr'ptr1 (VerTwoDataTwoPtr'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_VerTwoDataTwoPtr'ptr1 :: ((Untyped.ReadCtx m msg)) => (VerTwoDataTwoPtr msg) -> (m Std_.Bool)
-has_VerTwoDataTwoPtr'ptr1 (VerTwoDataTwoPtr'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_VerTwoDataTwoPtr'ptr1 :: ((Untyped.RWCtx m s)) => (VerTwoDataTwoPtr (Message.MutMsg s)) -> (m (VerOneData (Message.MutMsg s)))
-new_VerTwoDataTwoPtr'ptr1 struct = (do
-    result <- (Classes.new (Untyped.message struct))
-    (set_VerTwoDataTwoPtr'ptr1 struct result)
-    (Std_.pure result)
-    )
-get_VerTwoDataTwoPtr'ptr2 :: ((Untyped.ReadCtx m msg)
-                             ,(Classes.FromPtr msg (VerOneData msg))) => (VerTwoDataTwoPtr msg) -> (m (VerOneData msg))
-get_VerTwoDataTwoPtr'ptr2 (VerTwoDataTwoPtr'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 1 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_VerTwoDataTwoPtr'ptr2 :: ((Untyped.RWCtx m s)
-                             ,(Classes.ToPtr s (VerOneData (Message.MutMsg s)))) => (VerTwoDataTwoPtr (Message.MutMsg s)) -> (VerOneData (Message.MutMsg s)) -> (m ())
-set_VerTwoDataTwoPtr'ptr2 (VerTwoDataTwoPtr'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 1 struct)
-    )
-has_VerTwoDataTwoPtr'ptr2 :: ((Untyped.ReadCtx m msg)) => (VerTwoDataTwoPtr msg) -> (m Std_.Bool)
-has_VerTwoDataTwoPtr'ptr2 (VerTwoDataTwoPtr'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_VerTwoDataTwoPtr'ptr2 :: ((Untyped.RWCtx m s)) => (VerTwoDataTwoPtr (Message.MutMsg s)) -> (m (VerOneData (Message.MutMsg s)))
-new_VerTwoDataTwoPtr'ptr2 struct = (do
-    result <- (Classes.new (Untyped.message struct))
-    (set_VerTwoDataTwoPtr'ptr2 struct result)
-    (Std_.pure result)
-    )
-newtype HoldsVerEmptyList msg
-    = HoldsVerEmptyList'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (HoldsVerEmptyList msg)) where
-    fromStruct struct = (Std_.pure (HoldsVerEmptyList'newtype_ struct))
-instance (Classes.ToStruct msg (HoldsVerEmptyList msg)) where
-    toStruct (HoldsVerEmptyList'newtype_ struct) = struct
-instance (Untyped.HasMessage (HoldsVerEmptyList msg)) where
-    type InMessage (HoldsVerEmptyList msg) = msg
-    message (HoldsVerEmptyList'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (HoldsVerEmptyList msg)) where
-    messageDefault msg = (HoldsVerEmptyList'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (HoldsVerEmptyList msg)) where
-    fromPtr msg ptr = (HoldsVerEmptyList'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (HoldsVerEmptyList (Message.MutMsg s))) where
-    toPtr msg (HoldsVerEmptyList'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (HoldsVerEmptyList (Message.MutMsg s))) where
-    new msg = (HoldsVerEmptyList'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (HoldsVerEmptyList msg)) where
-    newtype List msg (HoldsVerEmptyList msg)
-        = HoldsVerEmptyList'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (HoldsVerEmptyList'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (HoldsVerEmptyList'List_ l) = (Untyped.ListStruct l)
-    length (HoldsVerEmptyList'List_ l) = (Untyped.length l)
-    index i (HoldsVerEmptyList'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (HoldsVerEmptyList (Message.MutMsg s))) where
-    setIndex (HoldsVerEmptyList'newtype_ elt) i (HoldsVerEmptyList'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (HoldsVerEmptyList'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_HoldsVerEmptyList'mylist :: ((Untyped.ReadCtx m msg)
-                                ,(Classes.FromPtr msg (Basics.List msg (VerEmpty msg)))) => (HoldsVerEmptyList msg) -> (m (Basics.List msg (VerEmpty msg)))
-get_HoldsVerEmptyList'mylist (HoldsVerEmptyList'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_HoldsVerEmptyList'mylist :: ((Untyped.RWCtx m s)
-                                ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (VerEmpty (Message.MutMsg s))))) => (HoldsVerEmptyList (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (VerEmpty (Message.MutMsg s))) -> (m ())
-set_HoldsVerEmptyList'mylist (HoldsVerEmptyList'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_HoldsVerEmptyList'mylist :: ((Untyped.ReadCtx m msg)) => (HoldsVerEmptyList msg) -> (m Std_.Bool)
-has_HoldsVerEmptyList'mylist (HoldsVerEmptyList'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_HoldsVerEmptyList'mylist :: ((Untyped.RWCtx m s)) => Std_.Int -> (HoldsVerEmptyList (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (VerEmpty (Message.MutMsg s))))
-new_HoldsVerEmptyList'mylist len struct = (do
-    result <- (Classes.newList (Untyped.message struct) len)
-    (set_HoldsVerEmptyList'mylist struct result)
-    (Std_.pure result)
-    )
-newtype HoldsVerOneDataList msg
-    = HoldsVerOneDataList'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (HoldsVerOneDataList msg)) where
-    fromStruct struct = (Std_.pure (HoldsVerOneDataList'newtype_ struct))
-instance (Classes.ToStruct msg (HoldsVerOneDataList msg)) where
-    toStruct (HoldsVerOneDataList'newtype_ struct) = struct
-instance (Untyped.HasMessage (HoldsVerOneDataList msg)) where
-    type InMessage (HoldsVerOneDataList msg) = msg
-    message (HoldsVerOneDataList'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (HoldsVerOneDataList msg)) where
-    messageDefault msg = (HoldsVerOneDataList'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (HoldsVerOneDataList msg)) where
-    fromPtr msg ptr = (HoldsVerOneDataList'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (HoldsVerOneDataList (Message.MutMsg s))) where
-    toPtr msg (HoldsVerOneDataList'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (HoldsVerOneDataList (Message.MutMsg s))) where
-    new msg = (HoldsVerOneDataList'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (HoldsVerOneDataList msg)) where
-    newtype List msg (HoldsVerOneDataList msg)
-        = HoldsVerOneDataList'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (HoldsVerOneDataList'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (HoldsVerOneDataList'List_ l) = (Untyped.ListStruct l)
-    length (HoldsVerOneDataList'List_ l) = (Untyped.length l)
-    index i (HoldsVerOneDataList'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (HoldsVerOneDataList (Message.MutMsg s))) where
-    setIndex (HoldsVerOneDataList'newtype_ elt) i (HoldsVerOneDataList'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (HoldsVerOneDataList'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_HoldsVerOneDataList'mylist :: ((Untyped.ReadCtx m msg)
-                                  ,(Classes.FromPtr msg (Basics.List msg (VerOneData msg)))) => (HoldsVerOneDataList msg) -> (m (Basics.List msg (VerOneData msg)))
-get_HoldsVerOneDataList'mylist (HoldsVerOneDataList'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_HoldsVerOneDataList'mylist :: ((Untyped.RWCtx m s)
-                                  ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (VerOneData (Message.MutMsg s))))) => (HoldsVerOneDataList (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (VerOneData (Message.MutMsg s))) -> (m ())
-set_HoldsVerOneDataList'mylist (HoldsVerOneDataList'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_HoldsVerOneDataList'mylist :: ((Untyped.ReadCtx m msg)) => (HoldsVerOneDataList msg) -> (m Std_.Bool)
-has_HoldsVerOneDataList'mylist (HoldsVerOneDataList'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_HoldsVerOneDataList'mylist :: ((Untyped.RWCtx m s)) => Std_.Int -> (HoldsVerOneDataList (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (VerOneData (Message.MutMsg s))))
-new_HoldsVerOneDataList'mylist len struct = (do
-    result <- (Classes.newList (Untyped.message struct) len)
-    (set_HoldsVerOneDataList'mylist struct result)
-    (Std_.pure result)
-    )
-newtype HoldsVerTwoDataList msg
-    = HoldsVerTwoDataList'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (HoldsVerTwoDataList msg)) where
-    fromStruct struct = (Std_.pure (HoldsVerTwoDataList'newtype_ struct))
-instance (Classes.ToStruct msg (HoldsVerTwoDataList msg)) where
-    toStruct (HoldsVerTwoDataList'newtype_ struct) = struct
-instance (Untyped.HasMessage (HoldsVerTwoDataList msg)) where
-    type InMessage (HoldsVerTwoDataList msg) = msg
-    message (HoldsVerTwoDataList'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (HoldsVerTwoDataList msg)) where
-    messageDefault msg = (HoldsVerTwoDataList'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (HoldsVerTwoDataList msg)) where
-    fromPtr msg ptr = (HoldsVerTwoDataList'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (HoldsVerTwoDataList (Message.MutMsg s))) where
-    toPtr msg (HoldsVerTwoDataList'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (HoldsVerTwoDataList (Message.MutMsg s))) where
-    new msg = (HoldsVerTwoDataList'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (HoldsVerTwoDataList msg)) where
-    newtype List msg (HoldsVerTwoDataList msg)
-        = HoldsVerTwoDataList'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (HoldsVerTwoDataList'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (HoldsVerTwoDataList'List_ l) = (Untyped.ListStruct l)
-    length (HoldsVerTwoDataList'List_ l) = (Untyped.length l)
-    index i (HoldsVerTwoDataList'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (HoldsVerTwoDataList (Message.MutMsg s))) where
-    setIndex (HoldsVerTwoDataList'newtype_ elt) i (HoldsVerTwoDataList'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (HoldsVerTwoDataList'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_HoldsVerTwoDataList'mylist :: ((Untyped.ReadCtx m msg)
-                                  ,(Classes.FromPtr msg (Basics.List msg (VerTwoData msg)))) => (HoldsVerTwoDataList msg) -> (m (Basics.List msg (VerTwoData msg)))
-get_HoldsVerTwoDataList'mylist (HoldsVerTwoDataList'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_HoldsVerTwoDataList'mylist :: ((Untyped.RWCtx m s)
-                                  ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (VerTwoData (Message.MutMsg s))))) => (HoldsVerTwoDataList (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (VerTwoData (Message.MutMsg s))) -> (m ())
-set_HoldsVerTwoDataList'mylist (HoldsVerTwoDataList'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_HoldsVerTwoDataList'mylist :: ((Untyped.ReadCtx m msg)) => (HoldsVerTwoDataList msg) -> (m Std_.Bool)
-has_HoldsVerTwoDataList'mylist (HoldsVerTwoDataList'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_HoldsVerTwoDataList'mylist :: ((Untyped.RWCtx m s)) => Std_.Int -> (HoldsVerTwoDataList (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (VerTwoData (Message.MutMsg s))))
-new_HoldsVerTwoDataList'mylist len struct = (do
-    result <- (Classes.newList (Untyped.message struct) len)
-    (set_HoldsVerTwoDataList'mylist struct result)
-    (Std_.pure result)
-    )
-newtype HoldsVerOnePtrList msg
-    = HoldsVerOnePtrList'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (HoldsVerOnePtrList msg)) where
-    fromStruct struct = (Std_.pure (HoldsVerOnePtrList'newtype_ struct))
-instance (Classes.ToStruct msg (HoldsVerOnePtrList msg)) where
-    toStruct (HoldsVerOnePtrList'newtype_ struct) = struct
-instance (Untyped.HasMessage (HoldsVerOnePtrList msg)) where
-    type InMessage (HoldsVerOnePtrList msg) = msg
-    message (HoldsVerOnePtrList'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (HoldsVerOnePtrList msg)) where
-    messageDefault msg = (HoldsVerOnePtrList'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (HoldsVerOnePtrList msg)) where
-    fromPtr msg ptr = (HoldsVerOnePtrList'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (HoldsVerOnePtrList (Message.MutMsg s))) where
-    toPtr msg (HoldsVerOnePtrList'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (HoldsVerOnePtrList (Message.MutMsg s))) where
-    new msg = (HoldsVerOnePtrList'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (HoldsVerOnePtrList msg)) where
-    newtype List msg (HoldsVerOnePtrList msg)
-        = HoldsVerOnePtrList'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (HoldsVerOnePtrList'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (HoldsVerOnePtrList'List_ l) = (Untyped.ListStruct l)
-    length (HoldsVerOnePtrList'List_ l) = (Untyped.length l)
-    index i (HoldsVerOnePtrList'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (HoldsVerOnePtrList (Message.MutMsg s))) where
-    setIndex (HoldsVerOnePtrList'newtype_ elt) i (HoldsVerOnePtrList'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (HoldsVerOnePtrList'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_HoldsVerOnePtrList'mylist :: ((Untyped.ReadCtx m msg)
-                                 ,(Classes.FromPtr msg (Basics.List msg (VerOnePtr msg)))) => (HoldsVerOnePtrList msg) -> (m (Basics.List msg (VerOnePtr msg)))
-get_HoldsVerOnePtrList'mylist (HoldsVerOnePtrList'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_HoldsVerOnePtrList'mylist :: ((Untyped.RWCtx m s)
-                                 ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (VerOnePtr (Message.MutMsg s))))) => (HoldsVerOnePtrList (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (VerOnePtr (Message.MutMsg s))) -> (m ())
-set_HoldsVerOnePtrList'mylist (HoldsVerOnePtrList'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_HoldsVerOnePtrList'mylist :: ((Untyped.ReadCtx m msg)) => (HoldsVerOnePtrList msg) -> (m Std_.Bool)
-has_HoldsVerOnePtrList'mylist (HoldsVerOnePtrList'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_HoldsVerOnePtrList'mylist :: ((Untyped.RWCtx m s)) => Std_.Int -> (HoldsVerOnePtrList (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (VerOnePtr (Message.MutMsg s))))
-new_HoldsVerOnePtrList'mylist len struct = (do
-    result <- (Classes.newList (Untyped.message struct) len)
-    (set_HoldsVerOnePtrList'mylist struct result)
-    (Std_.pure result)
-    )
-newtype HoldsVerTwoPtrList msg
-    = HoldsVerTwoPtrList'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (HoldsVerTwoPtrList msg)) where
-    fromStruct struct = (Std_.pure (HoldsVerTwoPtrList'newtype_ struct))
-instance (Classes.ToStruct msg (HoldsVerTwoPtrList msg)) where
-    toStruct (HoldsVerTwoPtrList'newtype_ struct) = struct
-instance (Untyped.HasMessage (HoldsVerTwoPtrList msg)) where
-    type InMessage (HoldsVerTwoPtrList msg) = msg
-    message (HoldsVerTwoPtrList'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (HoldsVerTwoPtrList msg)) where
-    messageDefault msg = (HoldsVerTwoPtrList'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (HoldsVerTwoPtrList msg)) where
-    fromPtr msg ptr = (HoldsVerTwoPtrList'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (HoldsVerTwoPtrList (Message.MutMsg s))) where
-    toPtr msg (HoldsVerTwoPtrList'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (HoldsVerTwoPtrList (Message.MutMsg s))) where
-    new msg = (HoldsVerTwoPtrList'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (HoldsVerTwoPtrList msg)) where
-    newtype List msg (HoldsVerTwoPtrList msg)
-        = HoldsVerTwoPtrList'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (HoldsVerTwoPtrList'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (HoldsVerTwoPtrList'List_ l) = (Untyped.ListStruct l)
-    length (HoldsVerTwoPtrList'List_ l) = (Untyped.length l)
-    index i (HoldsVerTwoPtrList'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (HoldsVerTwoPtrList (Message.MutMsg s))) where
-    setIndex (HoldsVerTwoPtrList'newtype_ elt) i (HoldsVerTwoPtrList'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (HoldsVerTwoPtrList'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_HoldsVerTwoPtrList'mylist :: ((Untyped.ReadCtx m msg)
-                                 ,(Classes.FromPtr msg (Basics.List msg (VerTwoPtr msg)))) => (HoldsVerTwoPtrList msg) -> (m (Basics.List msg (VerTwoPtr msg)))
-get_HoldsVerTwoPtrList'mylist (HoldsVerTwoPtrList'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_HoldsVerTwoPtrList'mylist :: ((Untyped.RWCtx m s)
-                                 ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (VerTwoPtr (Message.MutMsg s))))) => (HoldsVerTwoPtrList (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (VerTwoPtr (Message.MutMsg s))) -> (m ())
-set_HoldsVerTwoPtrList'mylist (HoldsVerTwoPtrList'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_HoldsVerTwoPtrList'mylist :: ((Untyped.ReadCtx m msg)) => (HoldsVerTwoPtrList msg) -> (m Std_.Bool)
-has_HoldsVerTwoPtrList'mylist (HoldsVerTwoPtrList'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_HoldsVerTwoPtrList'mylist :: ((Untyped.RWCtx m s)) => Std_.Int -> (HoldsVerTwoPtrList (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (VerTwoPtr (Message.MutMsg s))))
-new_HoldsVerTwoPtrList'mylist len struct = (do
-    result <- (Classes.newList (Untyped.message struct) len)
-    (set_HoldsVerTwoPtrList'mylist struct result)
-    (Std_.pure result)
-    )
-newtype HoldsVerTwoTwoList msg
-    = HoldsVerTwoTwoList'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (HoldsVerTwoTwoList msg)) where
-    fromStruct struct = (Std_.pure (HoldsVerTwoTwoList'newtype_ struct))
-instance (Classes.ToStruct msg (HoldsVerTwoTwoList msg)) where
-    toStruct (HoldsVerTwoTwoList'newtype_ struct) = struct
-instance (Untyped.HasMessage (HoldsVerTwoTwoList msg)) where
-    type InMessage (HoldsVerTwoTwoList msg) = msg
-    message (HoldsVerTwoTwoList'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (HoldsVerTwoTwoList msg)) where
-    messageDefault msg = (HoldsVerTwoTwoList'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (HoldsVerTwoTwoList msg)) where
-    fromPtr msg ptr = (HoldsVerTwoTwoList'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (HoldsVerTwoTwoList (Message.MutMsg s))) where
-    toPtr msg (HoldsVerTwoTwoList'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (HoldsVerTwoTwoList (Message.MutMsg s))) where
-    new msg = (HoldsVerTwoTwoList'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (HoldsVerTwoTwoList msg)) where
-    newtype List msg (HoldsVerTwoTwoList msg)
-        = HoldsVerTwoTwoList'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (HoldsVerTwoTwoList'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (HoldsVerTwoTwoList'List_ l) = (Untyped.ListStruct l)
-    length (HoldsVerTwoTwoList'List_ l) = (Untyped.length l)
-    index i (HoldsVerTwoTwoList'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (HoldsVerTwoTwoList (Message.MutMsg s))) where
-    setIndex (HoldsVerTwoTwoList'newtype_ elt) i (HoldsVerTwoTwoList'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (HoldsVerTwoTwoList'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_HoldsVerTwoTwoList'mylist :: ((Untyped.ReadCtx m msg)
-                                 ,(Classes.FromPtr msg (Basics.List msg (VerTwoDataTwoPtr msg)))) => (HoldsVerTwoTwoList msg) -> (m (Basics.List msg (VerTwoDataTwoPtr msg)))
-get_HoldsVerTwoTwoList'mylist (HoldsVerTwoTwoList'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_HoldsVerTwoTwoList'mylist :: ((Untyped.RWCtx m s)
-                                 ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (VerTwoDataTwoPtr (Message.MutMsg s))))) => (HoldsVerTwoTwoList (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (VerTwoDataTwoPtr (Message.MutMsg s))) -> (m ())
-set_HoldsVerTwoTwoList'mylist (HoldsVerTwoTwoList'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_HoldsVerTwoTwoList'mylist :: ((Untyped.ReadCtx m msg)) => (HoldsVerTwoTwoList msg) -> (m Std_.Bool)
-has_HoldsVerTwoTwoList'mylist (HoldsVerTwoTwoList'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_HoldsVerTwoTwoList'mylist :: ((Untyped.RWCtx m s)) => Std_.Int -> (HoldsVerTwoTwoList (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (VerTwoDataTwoPtr (Message.MutMsg s))))
-new_HoldsVerTwoTwoList'mylist len struct = (do
-    result <- (Classes.newList (Untyped.message struct) len)
-    (set_HoldsVerTwoTwoList'mylist struct result)
-    (Std_.pure result)
-    )
-newtype HoldsVerTwoTwoPlus msg
-    = HoldsVerTwoTwoPlus'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (HoldsVerTwoTwoPlus msg)) where
-    fromStruct struct = (Std_.pure (HoldsVerTwoTwoPlus'newtype_ struct))
-instance (Classes.ToStruct msg (HoldsVerTwoTwoPlus msg)) where
-    toStruct (HoldsVerTwoTwoPlus'newtype_ struct) = struct
-instance (Untyped.HasMessage (HoldsVerTwoTwoPlus msg)) where
-    type InMessage (HoldsVerTwoTwoPlus msg) = msg
-    message (HoldsVerTwoTwoPlus'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (HoldsVerTwoTwoPlus msg)) where
-    messageDefault msg = (HoldsVerTwoTwoPlus'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (HoldsVerTwoTwoPlus msg)) where
-    fromPtr msg ptr = (HoldsVerTwoTwoPlus'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (HoldsVerTwoTwoPlus (Message.MutMsg s))) where
-    toPtr msg (HoldsVerTwoTwoPlus'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (HoldsVerTwoTwoPlus (Message.MutMsg s))) where
-    new msg = (HoldsVerTwoTwoPlus'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (HoldsVerTwoTwoPlus msg)) where
-    newtype List msg (HoldsVerTwoTwoPlus msg)
-        = HoldsVerTwoTwoPlus'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (HoldsVerTwoTwoPlus'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (HoldsVerTwoTwoPlus'List_ l) = (Untyped.ListStruct l)
-    length (HoldsVerTwoTwoPlus'List_ l) = (Untyped.length l)
-    index i (HoldsVerTwoTwoPlus'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (HoldsVerTwoTwoPlus (Message.MutMsg s))) where
-    setIndex (HoldsVerTwoTwoPlus'newtype_ elt) i (HoldsVerTwoTwoPlus'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (HoldsVerTwoTwoPlus'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_HoldsVerTwoTwoPlus'mylist :: ((Untyped.ReadCtx m msg)
-                                 ,(Classes.FromPtr msg (Basics.List msg (VerTwoTwoPlus msg)))) => (HoldsVerTwoTwoPlus msg) -> (m (Basics.List msg (VerTwoTwoPlus msg)))
-get_HoldsVerTwoTwoPlus'mylist (HoldsVerTwoTwoPlus'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_HoldsVerTwoTwoPlus'mylist :: ((Untyped.RWCtx m s)
-                                 ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (VerTwoTwoPlus (Message.MutMsg s))))) => (HoldsVerTwoTwoPlus (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (VerTwoTwoPlus (Message.MutMsg s))) -> (m ())
-set_HoldsVerTwoTwoPlus'mylist (HoldsVerTwoTwoPlus'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_HoldsVerTwoTwoPlus'mylist :: ((Untyped.ReadCtx m msg)) => (HoldsVerTwoTwoPlus msg) -> (m Std_.Bool)
-has_HoldsVerTwoTwoPlus'mylist (HoldsVerTwoTwoPlus'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_HoldsVerTwoTwoPlus'mylist :: ((Untyped.RWCtx m s)) => Std_.Int -> (HoldsVerTwoTwoPlus (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (VerTwoTwoPlus (Message.MutMsg s))))
-new_HoldsVerTwoTwoPlus'mylist len struct = (do
-    result <- (Classes.newList (Untyped.message struct) len)
-    (set_HoldsVerTwoTwoPlus'mylist struct result)
-    (Std_.pure result)
-    )
-newtype VerTwoTwoPlus msg
-    = VerTwoTwoPlus'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (VerTwoTwoPlus msg)) where
-    fromStruct struct = (Std_.pure (VerTwoTwoPlus'newtype_ struct))
-instance (Classes.ToStruct msg (VerTwoTwoPlus msg)) where
-    toStruct (VerTwoTwoPlus'newtype_ struct) = struct
-instance (Untyped.HasMessage (VerTwoTwoPlus msg)) where
-    type InMessage (VerTwoTwoPlus msg) = msg
-    message (VerTwoTwoPlus'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (VerTwoTwoPlus msg)) where
-    messageDefault msg = (VerTwoTwoPlus'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (VerTwoTwoPlus msg)) where
-    fromPtr msg ptr = (VerTwoTwoPlus'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (VerTwoTwoPlus (Message.MutMsg s))) where
-    toPtr msg (VerTwoTwoPlus'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (VerTwoTwoPlus (Message.MutMsg s))) where
-    new msg = (VerTwoTwoPlus'newtype_ <$> (Untyped.allocStruct msg 3 3))
-instance (Basics.ListElem msg (VerTwoTwoPlus msg)) where
-    newtype List msg (VerTwoTwoPlus msg)
-        = VerTwoTwoPlus'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (VerTwoTwoPlus'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (VerTwoTwoPlus'List_ l) = (Untyped.ListStruct l)
-    length (VerTwoTwoPlus'List_ l) = (Untyped.length l)
-    index i (VerTwoTwoPlus'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (VerTwoTwoPlus (Message.MutMsg s))) where
-    setIndex (VerTwoTwoPlus'newtype_ elt) i (VerTwoTwoPlus'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (VerTwoTwoPlus'List_ <$> (Untyped.allocCompositeList msg 3 3 len))
-get_VerTwoTwoPlus'val :: ((Untyped.ReadCtx m msg)) => (VerTwoTwoPlus msg) -> (m Std_.Int16)
-get_VerTwoTwoPlus'val (VerTwoTwoPlus'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_VerTwoTwoPlus'val :: ((Untyped.RWCtx m s)) => (VerTwoTwoPlus (Message.MutMsg s)) -> Std_.Int16 -> (m ())
-set_VerTwoTwoPlus'val (VerTwoTwoPlus'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
-get_VerTwoTwoPlus'duo :: ((Untyped.ReadCtx m msg)) => (VerTwoTwoPlus msg) -> (m Std_.Int64)
-get_VerTwoTwoPlus'duo (VerTwoTwoPlus'newtype_ struct) = (GenHelpers.getWordField struct 1 0 0)
-set_VerTwoTwoPlus'duo :: ((Untyped.RWCtx m s)) => (VerTwoTwoPlus (Message.MutMsg s)) -> Std_.Int64 -> (m ())
-set_VerTwoTwoPlus'duo (VerTwoTwoPlus'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
-get_VerTwoTwoPlus'ptr1 :: ((Untyped.ReadCtx m msg)
-                          ,(Classes.FromPtr msg (VerTwoDataTwoPtr msg))) => (VerTwoTwoPlus msg) -> (m (VerTwoDataTwoPtr msg))
-get_VerTwoTwoPlus'ptr1 (VerTwoTwoPlus'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_VerTwoTwoPlus'ptr1 :: ((Untyped.RWCtx m s)
-                          ,(Classes.ToPtr s (VerTwoDataTwoPtr (Message.MutMsg s)))) => (VerTwoTwoPlus (Message.MutMsg s)) -> (VerTwoDataTwoPtr (Message.MutMsg s)) -> (m ())
-set_VerTwoTwoPlus'ptr1 (VerTwoTwoPlus'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_VerTwoTwoPlus'ptr1 :: ((Untyped.ReadCtx m msg)) => (VerTwoTwoPlus msg) -> (m Std_.Bool)
-has_VerTwoTwoPlus'ptr1 (VerTwoTwoPlus'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_VerTwoTwoPlus'ptr1 :: ((Untyped.RWCtx m s)) => (VerTwoTwoPlus (Message.MutMsg s)) -> (m (VerTwoDataTwoPtr (Message.MutMsg s)))
-new_VerTwoTwoPlus'ptr1 struct = (do
-    result <- (Classes.new (Untyped.message struct))
-    (set_VerTwoTwoPlus'ptr1 struct result)
-    (Std_.pure result)
-    )
-get_VerTwoTwoPlus'ptr2 :: ((Untyped.ReadCtx m msg)
-                          ,(Classes.FromPtr msg (VerTwoDataTwoPtr msg))) => (VerTwoTwoPlus msg) -> (m (VerTwoDataTwoPtr msg))
-get_VerTwoTwoPlus'ptr2 (VerTwoTwoPlus'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 1 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_VerTwoTwoPlus'ptr2 :: ((Untyped.RWCtx m s)
-                          ,(Classes.ToPtr s (VerTwoDataTwoPtr (Message.MutMsg s)))) => (VerTwoTwoPlus (Message.MutMsg s)) -> (VerTwoDataTwoPtr (Message.MutMsg s)) -> (m ())
-set_VerTwoTwoPlus'ptr2 (VerTwoTwoPlus'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 1 struct)
-    )
-has_VerTwoTwoPlus'ptr2 :: ((Untyped.ReadCtx m msg)) => (VerTwoTwoPlus msg) -> (m Std_.Bool)
-has_VerTwoTwoPlus'ptr2 (VerTwoTwoPlus'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_VerTwoTwoPlus'ptr2 :: ((Untyped.RWCtx m s)) => (VerTwoTwoPlus (Message.MutMsg s)) -> (m (VerTwoDataTwoPtr (Message.MutMsg s)))
-new_VerTwoTwoPlus'ptr2 struct = (do
-    result <- (Classes.new (Untyped.message struct))
-    (set_VerTwoTwoPlus'ptr2 struct result)
-    (Std_.pure result)
-    )
-get_VerTwoTwoPlus'tre :: ((Untyped.ReadCtx m msg)) => (VerTwoTwoPlus msg) -> (m Std_.Int64)
-get_VerTwoTwoPlus'tre (VerTwoTwoPlus'newtype_ struct) = (GenHelpers.getWordField struct 2 0 0)
-set_VerTwoTwoPlus'tre :: ((Untyped.RWCtx m s)) => (VerTwoTwoPlus (Message.MutMsg s)) -> Std_.Int64 -> (m ())
-set_VerTwoTwoPlus'tre (VerTwoTwoPlus'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 2 0 0)
-get_VerTwoTwoPlus'lst3 :: ((Untyped.ReadCtx m msg)
-                          ,(Classes.FromPtr msg (Basics.List msg Std_.Int64))) => (VerTwoTwoPlus msg) -> (m (Basics.List msg Std_.Int64))
-get_VerTwoTwoPlus'lst3 (VerTwoTwoPlus'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 2 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_VerTwoTwoPlus'lst3 :: ((Untyped.RWCtx m s)
-                          ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) Std_.Int64))) => (VerTwoTwoPlus (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) Std_.Int64) -> (m ())
-set_VerTwoTwoPlus'lst3 (VerTwoTwoPlus'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 2 struct)
-    )
-has_VerTwoTwoPlus'lst3 :: ((Untyped.ReadCtx m msg)) => (VerTwoTwoPlus msg) -> (m Std_.Bool)
-has_VerTwoTwoPlus'lst3 (VerTwoTwoPlus'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 2 struct))
-new_VerTwoTwoPlus'lst3 :: ((Untyped.RWCtx m s)) => Std_.Int -> (VerTwoTwoPlus (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) Std_.Int64))
-new_VerTwoTwoPlus'lst3 len struct = (do
-    result <- (Classes.newList (Untyped.message struct) len)
-    (set_VerTwoTwoPlus'lst3 struct result)
-    (Std_.pure result)
-    )
-newtype HoldsText msg
-    = HoldsText'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (HoldsText msg)) where
-    fromStruct struct = (Std_.pure (HoldsText'newtype_ struct))
-instance (Classes.ToStruct msg (HoldsText msg)) where
-    toStruct (HoldsText'newtype_ struct) = struct
-instance (Untyped.HasMessage (HoldsText msg)) where
-    type InMessage (HoldsText msg) = msg
-    message (HoldsText'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (HoldsText msg)) where
-    messageDefault msg = (HoldsText'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (HoldsText msg)) where
-    fromPtr msg ptr = (HoldsText'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (HoldsText (Message.MutMsg s))) where
-    toPtr msg (HoldsText'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (HoldsText (Message.MutMsg s))) where
-    new msg = (HoldsText'newtype_ <$> (Untyped.allocStruct msg 0 3))
-instance (Basics.ListElem msg (HoldsText msg)) where
-    newtype List msg (HoldsText msg)
-        = HoldsText'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (HoldsText'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (HoldsText'List_ l) = (Untyped.ListStruct l)
-    length (HoldsText'List_ l) = (Untyped.length l)
-    index i (HoldsText'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (HoldsText (Message.MutMsg s))) where
-    setIndex (HoldsText'newtype_ elt) i (HoldsText'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (HoldsText'List_ <$> (Untyped.allocCompositeList msg 0 3 len))
-get_HoldsText'txt :: ((Untyped.ReadCtx m msg)
-                     ,(Classes.FromPtr msg (Basics.Text msg))) => (HoldsText msg) -> (m (Basics.Text msg))
-get_HoldsText'txt (HoldsText'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_HoldsText'txt :: ((Untyped.RWCtx m s)
-                     ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (HoldsText (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
-set_HoldsText'txt (HoldsText'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_HoldsText'txt :: ((Untyped.ReadCtx m msg)) => (HoldsText msg) -> (m Std_.Bool)
-has_HoldsText'txt (HoldsText'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_HoldsText'txt :: ((Untyped.RWCtx m s)) => Std_.Int -> (HoldsText (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
-new_HoldsText'txt len struct = (do
-    result <- (Basics.newText (Untyped.message struct) len)
-    (set_HoldsText'txt struct result)
-    (Std_.pure result)
-    )
-get_HoldsText'lst :: ((Untyped.ReadCtx m msg)
-                     ,(Classes.FromPtr msg (Basics.List msg (Basics.Text msg)))) => (HoldsText msg) -> (m (Basics.List msg (Basics.Text msg)))
-get_HoldsText'lst (HoldsText'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 1 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_HoldsText'lst :: ((Untyped.RWCtx m s)
-                     ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Basics.Text (Message.MutMsg s))))) => (HoldsText (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Basics.Text (Message.MutMsg s))) -> (m ())
-set_HoldsText'lst (HoldsText'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 1 struct)
-    )
-has_HoldsText'lst :: ((Untyped.ReadCtx m msg)) => (HoldsText msg) -> (m Std_.Bool)
-has_HoldsText'lst (HoldsText'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_HoldsText'lst :: ((Untyped.RWCtx m s)) => Std_.Int -> (HoldsText (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Basics.Text (Message.MutMsg s))))
-new_HoldsText'lst len struct = (do
-    result <- (Classes.newList (Untyped.message struct) len)
-    (set_HoldsText'lst struct result)
-    (Std_.pure result)
-    )
-get_HoldsText'lstlst :: ((Untyped.ReadCtx m msg)
-                        ,(Classes.FromPtr msg (Basics.List msg (Basics.List msg (Basics.Text msg))))) => (HoldsText msg) -> (m (Basics.List msg (Basics.List msg (Basics.Text msg))))
-get_HoldsText'lstlst (HoldsText'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 2 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_HoldsText'lstlst :: ((Untyped.RWCtx m s)
-                        ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Basics.List (Message.MutMsg s) (Basics.Text (Message.MutMsg s)))))) => (HoldsText (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Basics.List (Message.MutMsg s) (Basics.Text (Message.MutMsg s)))) -> (m ())
-set_HoldsText'lstlst (HoldsText'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 2 struct)
-    )
-has_HoldsText'lstlst :: ((Untyped.ReadCtx m msg)) => (HoldsText msg) -> (m Std_.Bool)
-has_HoldsText'lstlst (HoldsText'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 2 struct))
-new_HoldsText'lstlst :: ((Untyped.RWCtx m s)) => Std_.Int -> (HoldsText (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Basics.List (Message.MutMsg s) (Basics.Text (Message.MutMsg s)))))
-new_HoldsText'lstlst len struct = (do
-    result <- (Classes.newList (Untyped.message struct) len)
-    (set_HoldsText'lstlst struct result)
-    (Std_.pure result)
-    )
-newtype WrapEmpty msg
-    = WrapEmpty'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (WrapEmpty msg)) where
-    fromStruct struct = (Std_.pure (WrapEmpty'newtype_ struct))
-instance (Classes.ToStruct msg (WrapEmpty msg)) where
-    toStruct (WrapEmpty'newtype_ struct) = struct
-instance (Untyped.HasMessage (WrapEmpty msg)) where
-    type InMessage (WrapEmpty msg) = msg
-    message (WrapEmpty'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (WrapEmpty msg)) where
-    messageDefault msg = (WrapEmpty'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (WrapEmpty msg)) where
-    fromPtr msg ptr = (WrapEmpty'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (WrapEmpty (Message.MutMsg s))) where
-    toPtr msg (WrapEmpty'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (WrapEmpty (Message.MutMsg s))) where
-    new msg = (WrapEmpty'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (WrapEmpty msg)) where
-    newtype List msg (WrapEmpty msg)
-        = WrapEmpty'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (WrapEmpty'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (WrapEmpty'List_ l) = (Untyped.ListStruct l)
-    length (WrapEmpty'List_ l) = (Untyped.length l)
-    index i (WrapEmpty'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (WrapEmpty (Message.MutMsg s))) where
-    setIndex (WrapEmpty'newtype_ elt) i (WrapEmpty'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (WrapEmpty'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_WrapEmpty'mightNotBeReallyEmpty :: ((Untyped.ReadCtx m msg)
-                                       ,(Classes.FromPtr msg (VerEmpty msg))) => (WrapEmpty msg) -> (m (VerEmpty msg))
-get_WrapEmpty'mightNotBeReallyEmpty (WrapEmpty'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_WrapEmpty'mightNotBeReallyEmpty :: ((Untyped.RWCtx m s)
-                                       ,(Classes.ToPtr s (VerEmpty (Message.MutMsg s)))) => (WrapEmpty (Message.MutMsg s)) -> (VerEmpty (Message.MutMsg s)) -> (m ())
-set_WrapEmpty'mightNotBeReallyEmpty (WrapEmpty'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_WrapEmpty'mightNotBeReallyEmpty :: ((Untyped.ReadCtx m msg)) => (WrapEmpty msg) -> (m Std_.Bool)
-has_WrapEmpty'mightNotBeReallyEmpty (WrapEmpty'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_WrapEmpty'mightNotBeReallyEmpty :: ((Untyped.RWCtx m s)) => (WrapEmpty (Message.MutMsg s)) -> (m (VerEmpty (Message.MutMsg s)))
-new_WrapEmpty'mightNotBeReallyEmpty struct = (do
-    result <- (Classes.new (Untyped.message struct))
-    (set_WrapEmpty'mightNotBeReallyEmpty struct result)
-    (Std_.pure result)
-    )
-newtype Wrap2x2 msg
-    = Wrap2x2'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Wrap2x2 msg)) where
-    fromStruct struct = (Std_.pure (Wrap2x2'newtype_ struct))
-instance (Classes.ToStruct msg (Wrap2x2 msg)) where
-    toStruct (Wrap2x2'newtype_ struct) = struct
-instance (Untyped.HasMessage (Wrap2x2 msg)) where
-    type InMessage (Wrap2x2 msg) = msg
-    message (Wrap2x2'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Wrap2x2 msg)) where
-    messageDefault msg = (Wrap2x2'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Wrap2x2 msg)) where
-    fromPtr msg ptr = (Wrap2x2'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Wrap2x2 (Message.MutMsg s))) where
-    toPtr msg (Wrap2x2'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Wrap2x2 (Message.MutMsg s))) where
-    new msg = (Wrap2x2'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Wrap2x2 msg)) where
-    newtype List msg (Wrap2x2 msg)
-        = Wrap2x2'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Wrap2x2'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Wrap2x2'List_ l) = (Untyped.ListStruct l)
-    length (Wrap2x2'List_ l) = (Untyped.length l)
-    index i (Wrap2x2'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Wrap2x2 (Message.MutMsg s))) where
-    setIndex (Wrap2x2'newtype_ elt) i (Wrap2x2'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Wrap2x2'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_Wrap2x2'mightNotBeReallyEmpty :: ((Untyped.ReadCtx m msg)
-                                     ,(Classes.FromPtr msg (VerTwoDataTwoPtr msg))) => (Wrap2x2 msg) -> (m (VerTwoDataTwoPtr msg))
-get_Wrap2x2'mightNotBeReallyEmpty (Wrap2x2'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_Wrap2x2'mightNotBeReallyEmpty :: ((Untyped.RWCtx m s)
-                                     ,(Classes.ToPtr s (VerTwoDataTwoPtr (Message.MutMsg s)))) => (Wrap2x2 (Message.MutMsg s)) -> (VerTwoDataTwoPtr (Message.MutMsg s)) -> (m ())
-set_Wrap2x2'mightNotBeReallyEmpty (Wrap2x2'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_Wrap2x2'mightNotBeReallyEmpty :: ((Untyped.ReadCtx m msg)) => (Wrap2x2 msg) -> (m Std_.Bool)
-has_Wrap2x2'mightNotBeReallyEmpty (Wrap2x2'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Wrap2x2'mightNotBeReallyEmpty :: ((Untyped.RWCtx m s)) => (Wrap2x2 (Message.MutMsg s)) -> (m (VerTwoDataTwoPtr (Message.MutMsg s)))
-new_Wrap2x2'mightNotBeReallyEmpty struct = (do
-    result <- (Classes.new (Untyped.message struct))
-    (set_Wrap2x2'mightNotBeReallyEmpty struct result)
-    (Std_.pure result)
-    )
-newtype Wrap2x2plus msg
-    = Wrap2x2plus'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Wrap2x2plus msg)) where
-    fromStruct struct = (Std_.pure (Wrap2x2plus'newtype_ struct))
-instance (Classes.ToStruct msg (Wrap2x2plus msg)) where
-    toStruct (Wrap2x2plus'newtype_ struct) = struct
-instance (Untyped.HasMessage (Wrap2x2plus msg)) where
-    type InMessage (Wrap2x2plus msg) = msg
-    message (Wrap2x2plus'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Wrap2x2plus msg)) where
-    messageDefault msg = (Wrap2x2plus'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Wrap2x2plus msg)) where
-    fromPtr msg ptr = (Wrap2x2plus'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Wrap2x2plus (Message.MutMsg s))) where
-    toPtr msg (Wrap2x2plus'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Wrap2x2plus (Message.MutMsg s))) where
-    new msg = (Wrap2x2plus'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Wrap2x2plus msg)) where
-    newtype List msg (Wrap2x2plus msg)
-        = Wrap2x2plus'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Wrap2x2plus'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Wrap2x2plus'List_ l) = (Untyped.ListStruct l)
-    length (Wrap2x2plus'List_ l) = (Untyped.length l)
-    index i (Wrap2x2plus'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Wrap2x2plus (Message.MutMsg s))) where
-    setIndex (Wrap2x2plus'newtype_ elt) i (Wrap2x2plus'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Wrap2x2plus'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_Wrap2x2plus'mightNotBeReallyEmpty :: ((Untyped.ReadCtx m msg)
-                                         ,(Classes.FromPtr msg (VerTwoTwoPlus msg))) => (Wrap2x2plus msg) -> (m (VerTwoTwoPlus msg))
-get_Wrap2x2plus'mightNotBeReallyEmpty (Wrap2x2plus'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_Wrap2x2plus'mightNotBeReallyEmpty :: ((Untyped.RWCtx m s)
-                                         ,(Classes.ToPtr s (VerTwoTwoPlus (Message.MutMsg s)))) => (Wrap2x2plus (Message.MutMsg s)) -> (VerTwoTwoPlus (Message.MutMsg s)) -> (m ())
-set_Wrap2x2plus'mightNotBeReallyEmpty (Wrap2x2plus'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_Wrap2x2plus'mightNotBeReallyEmpty :: ((Untyped.ReadCtx m msg)) => (Wrap2x2plus msg) -> (m Std_.Bool)
-has_Wrap2x2plus'mightNotBeReallyEmpty (Wrap2x2plus'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Wrap2x2plus'mightNotBeReallyEmpty :: ((Untyped.RWCtx m s)) => (Wrap2x2plus (Message.MutMsg s)) -> (m (VerTwoTwoPlus (Message.MutMsg s)))
-new_Wrap2x2plus'mightNotBeReallyEmpty struct = (do
-    result <- (Classes.new (Untyped.message struct))
-    (set_Wrap2x2plus'mightNotBeReallyEmpty struct result)
-    (Std_.pure result)
-    )
-newtype VoidUnion msg
-    = VoidUnion'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (VoidUnion msg)) where
-    fromStruct struct = (Std_.pure (VoidUnion'newtype_ struct))
-instance (Classes.ToStruct msg (VoidUnion msg)) where
-    toStruct (VoidUnion'newtype_ struct) = struct
-instance (Untyped.HasMessage (VoidUnion msg)) where
-    type InMessage (VoidUnion msg) = msg
-    message (VoidUnion'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (VoidUnion msg)) where
-    messageDefault msg = (VoidUnion'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (VoidUnion msg)) where
-    fromPtr msg ptr = (VoidUnion'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (VoidUnion (Message.MutMsg s))) where
-    toPtr msg (VoidUnion'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (VoidUnion (Message.MutMsg s))) where
-    new msg = (VoidUnion'newtype_ <$> (Untyped.allocStruct msg 1 0))
-instance (Basics.ListElem msg (VoidUnion msg)) where
-    newtype List msg (VoidUnion msg)
-        = VoidUnion'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (VoidUnion'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (VoidUnion'List_ l) = (Untyped.ListStruct l)
-    length (VoidUnion'List_ l) = (Untyped.length l)
-    index i (VoidUnion'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (VoidUnion (Message.MutMsg s))) where
-    setIndex (VoidUnion'newtype_ elt) i (VoidUnion'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (VoidUnion'List_ <$> (Untyped.allocCompositeList msg 1 0 len))
-data VoidUnion' msg
-    = VoidUnion'a 
-    | VoidUnion'b 
-    | VoidUnion'unknown' Std_.Word16
-instance (Classes.FromStruct msg (VoidUnion' msg)) where
-    fromStruct struct = (do
-        tag <- (GenHelpers.getTag struct 0)
-        case tag of
-            0 ->
-                (Std_.pure VoidUnion'a)
-            1 ->
-                (Std_.pure VoidUnion'b)
-            _ ->
-                (Std_.pure (VoidUnion'unknown' (Std_.fromIntegral tag)))
-        )
-get_VoidUnion' :: ((Untyped.ReadCtx m msg)
-                  ,(Classes.FromStruct msg (VoidUnion' msg))) => (VoidUnion msg) -> (m (VoidUnion' msg))
-get_VoidUnion' (VoidUnion'newtype_ struct) = (Classes.fromStruct struct)
-set_VoidUnion'a :: ((Untyped.RWCtx m s)) => (VoidUnion (Message.MutMsg s)) -> (m ())
-set_VoidUnion'a (VoidUnion'newtype_ struct) = (do
-    (GenHelpers.setWordField struct (0 :: Std_.Word16) 0 0 0)
-    (Std_.pure ())
-    )
-set_VoidUnion'b :: ((Untyped.RWCtx m s)) => (VoidUnion (Message.MutMsg s)) -> (m ())
-set_VoidUnion'b (VoidUnion'newtype_ struct) = (do
-    (GenHelpers.setWordField struct (1 :: Std_.Word16) 0 0 0)
-    (Std_.pure ())
-    )
-set_VoidUnion'unknown' :: ((Untyped.RWCtx m s)) => (VoidUnion (Message.MutMsg s)) -> Std_.Word16 -> (m ())
-set_VoidUnion'unknown' (VoidUnion'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
-newtype Nester1Capn msg
-    = Nester1Capn'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Nester1Capn msg)) where
-    fromStruct struct = (Std_.pure (Nester1Capn'newtype_ struct))
-instance (Classes.ToStruct msg (Nester1Capn msg)) where
-    toStruct (Nester1Capn'newtype_ struct) = struct
-instance (Untyped.HasMessage (Nester1Capn msg)) where
-    type InMessage (Nester1Capn msg) = msg
-    message (Nester1Capn'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Nester1Capn msg)) where
-    messageDefault msg = (Nester1Capn'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Nester1Capn msg)) where
-    fromPtr msg ptr = (Nester1Capn'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Nester1Capn (Message.MutMsg s))) where
-    toPtr msg (Nester1Capn'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Nester1Capn (Message.MutMsg s))) where
-    new msg = (Nester1Capn'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Nester1Capn msg)) where
-    newtype List msg (Nester1Capn msg)
-        = Nester1Capn'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Nester1Capn'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Nester1Capn'List_ l) = (Untyped.ListStruct l)
-    length (Nester1Capn'List_ l) = (Untyped.length l)
-    index i (Nester1Capn'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Nester1Capn (Message.MutMsg s))) where
-    setIndex (Nester1Capn'newtype_ elt) i (Nester1Capn'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Nester1Capn'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_Nester1Capn'strs :: ((Untyped.ReadCtx m msg)
-                        ,(Classes.FromPtr msg (Basics.List msg (Basics.Text msg)))) => (Nester1Capn msg) -> (m (Basics.List msg (Basics.Text msg)))
-get_Nester1Capn'strs (Nester1Capn'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_Nester1Capn'strs :: ((Untyped.RWCtx m s)
-                        ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Basics.Text (Message.MutMsg s))))) => (Nester1Capn (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Basics.Text (Message.MutMsg s))) -> (m ())
-set_Nester1Capn'strs (Nester1Capn'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_Nester1Capn'strs :: ((Untyped.ReadCtx m msg)) => (Nester1Capn msg) -> (m Std_.Bool)
-has_Nester1Capn'strs (Nester1Capn'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Nester1Capn'strs :: ((Untyped.RWCtx m s)) => Std_.Int -> (Nester1Capn (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Basics.Text (Message.MutMsg s))))
-new_Nester1Capn'strs len struct = (do
-    result <- (Classes.newList (Untyped.message struct) len)
-    (set_Nester1Capn'strs struct result)
-    (Std_.pure result)
-    )
-newtype RWTestCapn msg
-    = RWTestCapn'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (RWTestCapn msg)) where
-    fromStruct struct = (Std_.pure (RWTestCapn'newtype_ struct))
-instance (Classes.ToStruct msg (RWTestCapn msg)) where
-    toStruct (RWTestCapn'newtype_ struct) = struct
-instance (Untyped.HasMessage (RWTestCapn msg)) where
-    type InMessage (RWTestCapn msg) = msg
-    message (RWTestCapn'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (RWTestCapn msg)) where
-    messageDefault msg = (RWTestCapn'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (RWTestCapn msg)) where
-    fromPtr msg ptr = (RWTestCapn'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (RWTestCapn (Message.MutMsg s))) where
-    toPtr msg (RWTestCapn'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (RWTestCapn (Message.MutMsg s))) where
-    new msg = (RWTestCapn'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (RWTestCapn msg)) where
-    newtype List msg (RWTestCapn msg)
-        = RWTestCapn'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (RWTestCapn'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (RWTestCapn'List_ l) = (Untyped.ListStruct l)
-    length (RWTestCapn'List_ l) = (Untyped.length l)
-    index i (RWTestCapn'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (RWTestCapn (Message.MutMsg s))) where
-    setIndex (RWTestCapn'newtype_ elt) i (RWTestCapn'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (RWTestCapn'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_RWTestCapn'nestMatrix :: ((Untyped.ReadCtx m msg)
-                             ,(Classes.FromPtr msg (Basics.List msg (Basics.List msg (Nester1Capn msg))))) => (RWTestCapn msg) -> (m (Basics.List msg (Basics.List msg (Nester1Capn msg))))
-get_RWTestCapn'nestMatrix (RWTestCapn'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_RWTestCapn'nestMatrix :: ((Untyped.RWCtx m s)
-                             ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Basics.List (Message.MutMsg s) (Nester1Capn (Message.MutMsg s)))))) => (RWTestCapn (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Basics.List (Message.MutMsg s) (Nester1Capn (Message.MutMsg s)))) -> (m ())
-set_RWTestCapn'nestMatrix (RWTestCapn'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_RWTestCapn'nestMatrix :: ((Untyped.ReadCtx m msg)) => (RWTestCapn msg) -> (m Std_.Bool)
-has_RWTestCapn'nestMatrix (RWTestCapn'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_RWTestCapn'nestMatrix :: ((Untyped.RWCtx m s)) => Std_.Int -> (RWTestCapn (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Basics.List (Message.MutMsg s) (Nester1Capn (Message.MutMsg s)))))
-new_RWTestCapn'nestMatrix len struct = (do
-    result <- (Classes.newList (Untyped.message struct) len)
-    (set_RWTestCapn'nestMatrix struct result)
-    (Std_.pure result)
-    )
-newtype ListStructCapn msg
-    = ListStructCapn'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (ListStructCapn msg)) where
-    fromStruct struct = (Std_.pure (ListStructCapn'newtype_ struct))
-instance (Classes.ToStruct msg (ListStructCapn msg)) where
-    toStruct (ListStructCapn'newtype_ struct) = struct
-instance (Untyped.HasMessage (ListStructCapn msg)) where
-    type InMessage (ListStructCapn msg) = msg
-    message (ListStructCapn'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (ListStructCapn msg)) where
-    messageDefault msg = (ListStructCapn'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (ListStructCapn msg)) where
-    fromPtr msg ptr = (ListStructCapn'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (ListStructCapn (Message.MutMsg s))) where
-    toPtr msg (ListStructCapn'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (ListStructCapn (Message.MutMsg s))) where
-    new msg = (ListStructCapn'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (ListStructCapn msg)) where
-    newtype List msg (ListStructCapn msg)
-        = ListStructCapn'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (ListStructCapn'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (ListStructCapn'List_ l) = (Untyped.ListStruct l)
-    length (ListStructCapn'List_ l) = (Untyped.length l)
-    index i (ListStructCapn'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (ListStructCapn (Message.MutMsg s))) where
-    setIndex (ListStructCapn'newtype_ elt) i (ListStructCapn'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (ListStructCapn'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_ListStructCapn'vec :: ((Untyped.ReadCtx m msg)
-                          ,(Classes.FromPtr msg (Basics.List msg (Nester1Capn msg)))) => (ListStructCapn msg) -> (m (Basics.List msg (Nester1Capn msg)))
-get_ListStructCapn'vec (ListStructCapn'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_ListStructCapn'vec :: ((Untyped.RWCtx m s)
-                          ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (Nester1Capn (Message.MutMsg s))))) => (ListStructCapn (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (Nester1Capn (Message.MutMsg s))) -> (m ())
-set_ListStructCapn'vec (ListStructCapn'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_ListStructCapn'vec :: ((Untyped.ReadCtx m msg)) => (ListStructCapn msg) -> (m Std_.Bool)
-has_ListStructCapn'vec (ListStructCapn'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_ListStructCapn'vec :: ((Untyped.RWCtx m s)) => Std_.Int -> (ListStructCapn (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (Nester1Capn (Message.MutMsg s))))
-new_ListStructCapn'vec len struct = (do
-    result <- (Classes.newList (Untyped.message struct) len)
-    (set_ListStructCapn'vec struct result)
-    (Std_.pure result)
-    )
-newtype Echo msg
-    = Echo'newtype_ (Std_.Maybe (Untyped.Cap msg))
-instance (Classes.FromPtr msg (Echo msg)) where
-    fromPtr msg ptr = (Echo'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Echo (Message.MutMsg s))) where
-    toPtr msg (Echo'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
-    toPtr msg (Echo'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
-newtype Echo'echo'params msg
-    = Echo'echo'params'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Echo'echo'params msg)) where
-    fromStruct struct = (Std_.pure (Echo'echo'params'newtype_ struct))
-instance (Classes.ToStruct msg (Echo'echo'params msg)) where
-    toStruct (Echo'echo'params'newtype_ struct) = struct
-instance (Untyped.HasMessage (Echo'echo'params msg)) where
-    type InMessage (Echo'echo'params msg) = msg
-    message (Echo'echo'params'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Echo'echo'params msg)) where
-    messageDefault msg = (Echo'echo'params'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Echo'echo'params msg)) where
-    fromPtr msg ptr = (Echo'echo'params'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Echo'echo'params (Message.MutMsg s))) where
-    toPtr msg (Echo'echo'params'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Echo'echo'params (Message.MutMsg s))) where
-    new msg = (Echo'echo'params'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Echo'echo'params msg)) where
-    newtype List msg (Echo'echo'params msg)
-        = Echo'echo'params'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Echo'echo'params'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Echo'echo'params'List_ l) = (Untyped.ListStruct l)
-    length (Echo'echo'params'List_ l) = (Untyped.length l)
-    index i (Echo'echo'params'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Echo'echo'params (Message.MutMsg s))) where
-    setIndex (Echo'echo'params'newtype_ elt) i (Echo'echo'params'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Echo'echo'params'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_Echo'echo'params'in_ :: ((Untyped.ReadCtx m msg)
-                            ,(Classes.FromPtr msg (Basics.Text msg))) => (Echo'echo'params msg) -> (m (Basics.Text msg))
-get_Echo'echo'params'in_ (Echo'echo'params'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_Echo'echo'params'in_ :: ((Untyped.RWCtx m s)
-                            ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (Echo'echo'params (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
-set_Echo'echo'params'in_ (Echo'echo'params'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_Echo'echo'params'in_ :: ((Untyped.ReadCtx m msg)) => (Echo'echo'params msg) -> (m Std_.Bool)
-has_Echo'echo'params'in_ (Echo'echo'params'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Echo'echo'params'in_ :: ((Untyped.RWCtx m s)) => Std_.Int -> (Echo'echo'params (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
-new_Echo'echo'params'in_ len struct = (do
-    result <- (Basics.newText (Untyped.message struct) len)
-    (set_Echo'echo'params'in_ struct result)
-    (Std_.pure result)
-    )
-newtype Echo'echo'results msg
-    = Echo'echo'results'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Echo'echo'results msg)) where
-    fromStruct struct = (Std_.pure (Echo'echo'results'newtype_ struct))
-instance (Classes.ToStruct msg (Echo'echo'results msg)) where
-    toStruct (Echo'echo'results'newtype_ struct) = struct
-instance (Untyped.HasMessage (Echo'echo'results msg)) where
-    type InMessage (Echo'echo'results msg) = msg
-    message (Echo'echo'results'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Echo'echo'results msg)) where
-    messageDefault msg = (Echo'echo'results'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Echo'echo'results msg)) where
-    fromPtr msg ptr = (Echo'echo'results'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Echo'echo'results (Message.MutMsg s))) where
-    toPtr msg (Echo'echo'results'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Echo'echo'results (Message.MutMsg s))) where
-    new msg = (Echo'echo'results'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Echo'echo'results msg)) where
-    newtype List msg (Echo'echo'results msg)
-        = Echo'echo'results'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Echo'echo'results'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Echo'echo'results'List_ l) = (Untyped.ListStruct l)
-    length (Echo'echo'results'List_ l) = (Untyped.length l)
-    index i (Echo'echo'results'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Echo'echo'results (Message.MutMsg s))) where
-    setIndex (Echo'echo'results'newtype_ elt) i (Echo'echo'results'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Echo'echo'results'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_Echo'echo'results'out :: ((Untyped.ReadCtx m msg)
-                             ,(Classes.FromPtr msg (Basics.Text msg))) => (Echo'echo'results msg) -> (m (Basics.Text msg))
-get_Echo'echo'results'out (Echo'echo'results'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_Echo'echo'results'out :: ((Untyped.RWCtx m s)
-                             ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (Echo'echo'results (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
-set_Echo'echo'results'out (Echo'echo'results'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_Echo'echo'results'out :: ((Untyped.ReadCtx m msg)) => (Echo'echo'results msg) -> (m Std_.Bool)
-has_Echo'echo'results'out (Echo'echo'results'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Echo'echo'results'out :: ((Untyped.RWCtx m s)) => Std_.Int -> (Echo'echo'results (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
-new_Echo'echo'results'out len struct = (do
-    result <- (Basics.newText (Untyped.message struct) len)
-    (set_Echo'echo'results'out struct result)
-    (Std_.pure result)
-    )
-newtype Hoth msg
-    = Hoth'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Hoth msg)) where
-    fromStruct struct = (Std_.pure (Hoth'newtype_ struct))
-instance (Classes.ToStruct msg (Hoth msg)) where
-    toStruct (Hoth'newtype_ struct) = struct
-instance (Untyped.HasMessage (Hoth msg)) where
-    type InMessage (Hoth msg) = msg
-    message (Hoth'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Hoth msg)) where
-    messageDefault msg = (Hoth'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Hoth msg)) where
-    fromPtr msg ptr = (Hoth'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Hoth (Message.MutMsg s))) where
-    toPtr msg (Hoth'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Hoth (Message.MutMsg s))) where
-    new msg = (Hoth'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Hoth msg)) where
-    newtype List msg (Hoth msg)
-        = Hoth'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Hoth'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Hoth'List_ l) = (Untyped.ListStruct l)
-    length (Hoth'List_ l) = (Untyped.length l)
-    index i (Hoth'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Hoth (Message.MutMsg s))) where
-    setIndex (Hoth'newtype_ elt) i (Hoth'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Hoth'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_Hoth'base :: ((Untyped.ReadCtx m msg)
-                 ,(Classes.FromPtr msg (EchoBase msg))) => (Hoth msg) -> (m (EchoBase msg))
-get_Hoth'base (Hoth'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_Hoth'base :: ((Untyped.RWCtx m s)
-                 ,(Classes.ToPtr s (EchoBase (Message.MutMsg s)))) => (Hoth (Message.MutMsg s)) -> (EchoBase (Message.MutMsg s)) -> (m ())
-set_Hoth'base (Hoth'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_Hoth'base :: ((Untyped.ReadCtx m msg)) => (Hoth msg) -> (m Std_.Bool)
-has_Hoth'base (Hoth'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Hoth'base :: ((Untyped.RWCtx m s)) => (Hoth (Message.MutMsg s)) -> (m (EchoBase (Message.MutMsg s)))
-new_Hoth'base struct = (do
-    result <- (Classes.new (Untyped.message struct))
-    (set_Hoth'base struct result)
-    (Std_.pure result)
-    )
-newtype EchoBase msg
-    = EchoBase'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (EchoBase msg)) where
-    fromStruct struct = (Std_.pure (EchoBase'newtype_ struct))
-instance (Classes.ToStruct msg (EchoBase msg)) where
-    toStruct (EchoBase'newtype_ struct) = struct
-instance (Untyped.HasMessage (EchoBase msg)) where
-    type InMessage (EchoBase msg) = msg
-    message (EchoBase'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (EchoBase msg)) where
-    messageDefault msg = (EchoBase'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (EchoBase msg)) where
-    fromPtr msg ptr = (EchoBase'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (EchoBase (Message.MutMsg s))) where
-    toPtr msg (EchoBase'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (EchoBase (Message.MutMsg s))) where
-    new msg = (EchoBase'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (EchoBase msg)) where
-    newtype List msg (EchoBase msg)
-        = EchoBase'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (EchoBase'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (EchoBase'List_ l) = (Untyped.ListStruct l)
-    length (EchoBase'List_ l) = (Untyped.length l)
-    index i (EchoBase'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (EchoBase (Message.MutMsg s))) where
-    setIndex (EchoBase'newtype_ elt) i (EchoBase'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (EchoBase'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_EchoBase'echo :: ((Untyped.ReadCtx m msg)
-                     ,(Classes.FromPtr msg (Echo msg))) => (EchoBase msg) -> (m (Echo msg))
-get_EchoBase'echo (EchoBase'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_EchoBase'echo :: ((Untyped.RWCtx m s)
-                     ,(Classes.ToPtr s (Echo (Message.MutMsg s)))) => (EchoBase (Message.MutMsg s)) -> (Echo (Message.MutMsg s)) -> (m ())
-set_EchoBase'echo (EchoBase'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_EchoBase'echo :: ((Untyped.ReadCtx m msg)) => (EchoBase msg) -> (m Std_.Bool)
-has_EchoBase'echo (EchoBase'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-newtype EchoBases msg
-    = EchoBases'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (EchoBases msg)) where
-    fromStruct struct = (Std_.pure (EchoBases'newtype_ struct))
-instance (Classes.ToStruct msg (EchoBases msg)) where
-    toStruct (EchoBases'newtype_ struct) = struct
-instance (Untyped.HasMessage (EchoBases msg)) where
-    type InMessage (EchoBases msg) = msg
-    message (EchoBases'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (EchoBases msg)) where
-    messageDefault msg = (EchoBases'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (EchoBases msg)) where
-    fromPtr msg ptr = (EchoBases'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (EchoBases (Message.MutMsg s))) where
-    toPtr msg (EchoBases'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (EchoBases (Message.MutMsg s))) where
-    new msg = (EchoBases'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (EchoBases msg)) where
-    newtype List msg (EchoBases msg)
-        = EchoBases'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (EchoBases'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (EchoBases'List_ l) = (Untyped.ListStruct l)
-    length (EchoBases'List_ l) = (Untyped.length l)
-    index i (EchoBases'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (EchoBases (Message.MutMsg s))) where
-    setIndex (EchoBases'newtype_ elt) i (EchoBases'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (EchoBases'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_EchoBases'bases :: ((Untyped.ReadCtx m msg)
-                       ,(Classes.FromPtr msg (Basics.List msg (EchoBase msg)))) => (EchoBases msg) -> (m (Basics.List msg (EchoBase msg)))
-get_EchoBases'bases (EchoBases'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_EchoBases'bases :: ((Untyped.RWCtx m s)
-                       ,(Classes.ToPtr s (Basics.List (Message.MutMsg s) (EchoBase (Message.MutMsg s))))) => (EchoBases (Message.MutMsg s)) -> (Basics.List (Message.MutMsg s) (EchoBase (Message.MutMsg s))) -> (m ())
-set_EchoBases'bases (EchoBases'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_EchoBases'bases :: ((Untyped.ReadCtx m msg)) => (EchoBases msg) -> (m Std_.Bool)
-has_EchoBases'bases (EchoBases'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_EchoBases'bases :: ((Untyped.RWCtx m s)) => Std_.Int -> (EchoBases (Message.MutMsg s)) -> (m (Basics.List (Message.MutMsg s) (EchoBase (Message.MutMsg s))))
-new_EchoBases'bases len struct = (do
-    result <- (Classes.newList (Untyped.message struct) len)
-    (set_EchoBases'bases struct result)
-    (Std_.pure result)
-    )
-newtype StackingRoot msg
-    = StackingRoot'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (StackingRoot msg)) where
-    fromStruct struct = (Std_.pure (StackingRoot'newtype_ struct))
-instance (Classes.ToStruct msg (StackingRoot msg)) where
-    toStruct (StackingRoot'newtype_ struct) = struct
-instance (Untyped.HasMessage (StackingRoot msg)) where
-    type InMessage (StackingRoot msg) = msg
-    message (StackingRoot'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (StackingRoot msg)) where
-    messageDefault msg = (StackingRoot'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (StackingRoot msg)) where
-    fromPtr msg ptr = (StackingRoot'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (StackingRoot (Message.MutMsg s))) where
-    toPtr msg (StackingRoot'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (StackingRoot (Message.MutMsg s))) where
-    new msg = (StackingRoot'newtype_ <$> (Untyped.allocStruct msg 0 2))
-instance (Basics.ListElem msg (StackingRoot msg)) where
-    newtype List msg (StackingRoot msg)
-        = StackingRoot'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (StackingRoot'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (StackingRoot'List_ l) = (Untyped.ListStruct l)
-    length (StackingRoot'List_ l) = (Untyped.length l)
-    index i (StackingRoot'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (StackingRoot (Message.MutMsg s))) where
-    setIndex (StackingRoot'newtype_ elt) i (StackingRoot'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (StackingRoot'List_ <$> (Untyped.allocCompositeList msg 0 2 len))
-get_StackingRoot'aWithDefault :: ((Untyped.ReadCtx m msg)
-                                 ,(Classes.FromPtr msg (StackingA msg))) => (StackingRoot msg) -> (m (StackingA msg))
-get_StackingRoot'aWithDefault (StackingRoot'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_StackingRoot'aWithDefault :: ((Untyped.RWCtx m s)
-                                 ,(Classes.ToPtr s (StackingA (Message.MutMsg s)))) => (StackingRoot (Message.MutMsg s)) -> (StackingA (Message.MutMsg s)) -> (m ())
-set_StackingRoot'aWithDefault (StackingRoot'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_StackingRoot'aWithDefault :: ((Untyped.ReadCtx m msg)) => (StackingRoot msg) -> (m Std_.Bool)
-has_StackingRoot'aWithDefault (StackingRoot'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_StackingRoot'aWithDefault :: ((Untyped.RWCtx m s)) => (StackingRoot (Message.MutMsg s)) -> (m (StackingA (Message.MutMsg s)))
-new_StackingRoot'aWithDefault struct = (do
-    result <- (Classes.new (Untyped.message struct))
-    (set_StackingRoot'aWithDefault struct result)
-    (Std_.pure result)
-    )
-get_StackingRoot'a :: ((Untyped.ReadCtx m msg)
-                      ,(Classes.FromPtr msg (StackingA msg))) => (StackingRoot msg) -> (m (StackingA msg))
-get_StackingRoot'a (StackingRoot'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 1 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_StackingRoot'a :: ((Untyped.RWCtx m s)
-                      ,(Classes.ToPtr s (StackingA (Message.MutMsg s)))) => (StackingRoot (Message.MutMsg s)) -> (StackingA (Message.MutMsg s)) -> (m ())
-set_StackingRoot'a (StackingRoot'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 1 struct)
-    )
-has_StackingRoot'a :: ((Untyped.ReadCtx m msg)) => (StackingRoot msg) -> (m Std_.Bool)
-has_StackingRoot'a (StackingRoot'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_StackingRoot'a :: ((Untyped.RWCtx m s)) => (StackingRoot (Message.MutMsg s)) -> (m (StackingA (Message.MutMsg s)))
-new_StackingRoot'a struct = (do
-    result <- (Classes.new (Untyped.message struct))
-    (set_StackingRoot'a struct result)
-    (Std_.pure result)
-    )
-newtype StackingA msg
-    = StackingA'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (StackingA msg)) where
-    fromStruct struct = (Std_.pure (StackingA'newtype_ struct))
-instance (Classes.ToStruct msg (StackingA msg)) where
-    toStruct (StackingA'newtype_ struct) = struct
-instance (Untyped.HasMessage (StackingA msg)) where
-    type InMessage (StackingA msg) = msg
-    message (StackingA'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (StackingA msg)) where
-    messageDefault msg = (StackingA'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (StackingA msg)) where
-    fromPtr msg ptr = (StackingA'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (StackingA (Message.MutMsg s))) where
-    toPtr msg (StackingA'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (StackingA (Message.MutMsg s))) where
-    new msg = (StackingA'newtype_ <$> (Untyped.allocStruct msg 1 1))
-instance (Basics.ListElem msg (StackingA msg)) where
-    newtype List msg (StackingA msg)
-        = StackingA'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (StackingA'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (StackingA'List_ l) = (Untyped.ListStruct l)
-    length (StackingA'List_ l) = (Untyped.length l)
-    index i (StackingA'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (StackingA (Message.MutMsg s))) where
-    setIndex (StackingA'newtype_ elt) i (StackingA'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (StackingA'List_ <$> (Untyped.allocCompositeList msg 1 1 len))
-get_StackingA'num :: ((Untyped.ReadCtx m msg)) => (StackingA msg) -> (m Std_.Int32)
-get_StackingA'num (StackingA'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_StackingA'num :: ((Untyped.RWCtx m s)) => (StackingA (Message.MutMsg s)) -> Std_.Int32 -> (m ())
-set_StackingA'num (StackingA'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
-get_StackingA'b :: ((Untyped.ReadCtx m msg)
-                   ,(Classes.FromPtr msg (StackingB msg))) => (StackingA msg) -> (m (StackingB msg))
-get_StackingA'b (StackingA'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_StackingA'b :: ((Untyped.RWCtx m s)
-                   ,(Classes.ToPtr s (StackingB (Message.MutMsg s)))) => (StackingA (Message.MutMsg s)) -> (StackingB (Message.MutMsg s)) -> (m ())
-set_StackingA'b (StackingA'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_StackingA'b :: ((Untyped.ReadCtx m msg)) => (StackingA msg) -> (m Std_.Bool)
-has_StackingA'b (StackingA'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_StackingA'b :: ((Untyped.RWCtx m s)) => (StackingA (Message.MutMsg s)) -> (m (StackingB (Message.MutMsg s)))
-new_StackingA'b struct = (do
-    result <- (Classes.new (Untyped.message struct))
-    (set_StackingA'b struct result)
-    (Std_.pure result)
-    )
-newtype StackingB msg
-    = StackingB'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (StackingB msg)) where
-    fromStruct struct = (Std_.pure (StackingB'newtype_ struct))
-instance (Classes.ToStruct msg (StackingB msg)) where
-    toStruct (StackingB'newtype_ struct) = struct
-instance (Untyped.HasMessage (StackingB msg)) where
-    type InMessage (StackingB msg) = msg
-    message (StackingB'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (StackingB msg)) where
-    messageDefault msg = (StackingB'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (StackingB msg)) where
-    fromPtr msg ptr = (StackingB'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (StackingB (Message.MutMsg s))) where
-    toPtr msg (StackingB'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (StackingB (Message.MutMsg s))) where
-    new msg = (StackingB'newtype_ <$> (Untyped.allocStruct msg 1 0))
-instance (Basics.ListElem msg (StackingB msg)) where
-    newtype List msg (StackingB msg)
-        = StackingB'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (StackingB'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (StackingB'List_ l) = (Untyped.ListStruct l)
-    length (StackingB'List_ l) = (Untyped.length l)
-    index i (StackingB'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (StackingB (Message.MutMsg s))) where
-    setIndex (StackingB'newtype_ elt) i (StackingB'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (StackingB'List_ <$> (Untyped.allocCompositeList msg 1 0 len))
-get_StackingB'num :: ((Untyped.ReadCtx m msg)) => (StackingB msg) -> (m Std_.Int32)
-get_StackingB'num (StackingB'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_StackingB'num :: ((Untyped.RWCtx m s)) => (StackingB (Message.MutMsg s)) -> Std_.Int32 -> (m ())
-set_StackingB'num (StackingB'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
-newtype CallSequence msg
-    = CallSequence'newtype_ (Std_.Maybe (Untyped.Cap msg))
-instance (Classes.FromPtr msg (CallSequence msg)) where
-    fromPtr msg ptr = (CallSequence'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (CallSequence (Message.MutMsg s))) where
-    toPtr msg (CallSequence'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
-    toPtr msg (CallSequence'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
-newtype CallSequence'getNumber'params msg
-    = CallSequence'getNumber'params'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (CallSequence'getNumber'params msg)) where
-    fromStruct struct = (Std_.pure (CallSequence'getNumber'params'newtype_ struct))
-instance (Classes.ToStruct msg (CallSequence'getNumber'params msg)) where
-    toStruct (CallSequence'getNumber'params'newtype_ struct) = struct
-instance (Untyped.HasMessage (CallSequence'getNumber'params msg)) where
-    type InMessage (CallSequence'getNumber'params msg) = msg
-    message (CallSequence'getNumber'params'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (CallSequence'getNumber'params msg)) where
-    messageDefault msg = (CallSequence'getNumber'params'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (CallSequence'getNumber'params msg)) where
-    fromPtr msg ptr = (CallSequence'getNumber'params'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (CallSequence'getNumber'params (Message.MutMsg s))) where
-    toPtr msg (CallSequence'getNumber'params'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (CallSequence'getNumber'params (Message.MutMsg s))) where
-    new msg = (CallSequence'getNumber'params'newtype_ <$> (Untyped.allocStruct msg 0 0))
-instance (Basics.ListElem msg (CallSequence'getNumber'params msg)) where
-    newtype List msg (CallSequence'getNumber'params msg)
-        = CallSequence'getNumber'params'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (CallSequence'getNumber'params'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (CallSequence'getNumber'params'List_ l) = (Untyped.ListStruct l)
-    length (CallSequence'getNumber'params'List_ l) = (Untyped.length l)
-    index i (CallSequence'getNumber'params'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (CallSequence'getNumber'params (Message.MutMsg s))) where
-    setIndex (CallSequence'getNumber'params'newtype_ elt) i (CallSequence'getNumber'params'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (CallSequence'getNumber'params'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
-newtype CallSequence'getNumber'results msg
-    = CallSequence'getNumber'results'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (CallSequence'getNumber'results msg)) where
-    fromStruct struct = (Std_.pure (CallSequence'getNumber'results'newtype_ struct))
-instance (Classes.ToStruct msg (CallSequence'getNumber'results msg)) where
-    toStruct (CallSequence'getNumber'results'newtype_ struct) = struct
-instance (Untyped.HasMessage (CallSequence'getNumber'results msg)) where
-    type InMessage (CallSequence'getNumber'results msg) = msg
-    message (CallSequence'getNumber'results'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (CallSequence'getNumber'results msg)) where
-    messageDefault msg = (CallSequence'getNumber'results'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (CallSequence'getNumber'results msg)) where
-    fromPtr msg ptr = (CallSequence'getNumber'results'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (CallSequence'getNumber'results (Message.MutMsg s))) where
-    toPtr msg (CallSequence'getNumber'results'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (CallSequence'getNumber'results (Message.MutMsg s))) where
-    new msg = (CallSequence'getNumber'results'newtype_ <$> (Untyped.allocStruct msg 1 0))
-instance (Basics.ListElem msg (CallSequence'getNumber'results msg)) where
-    newtype List msg (CallSequence'getNumber'results msg)
-        = CallSequence'getNumber'results'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (CallSequence'getNumber'results'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (CallSequence'getNumber'results'List_ l) = (Untyped.ListStruct l)
-    length (CallSequence'getNumber'results'List_ l) = (Untyped.length l)
-    index i (CallSequence'getNumber'results'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (CallSequence'getNumber'results (Message.MutMsg s))) where
-    setIndex (CallSequence'getNumber'results'newtype_ elt) i (CallSequence'getNumber'results'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (CallSequence'getNumber'results'List_ <$> (Untyped.allocCompositeList msg 1 0 len))
-get_CallSequence'getNumber'results'n :: ((Untyped.ReadCtx m msg)) => (CallSequence'getNumber'results msg) -> (m Std_.Word32)
-get_CallSequence'getNumber'results'n (CallSequence'getNumber'results'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_CallSequence'getNumber'results'n :: ((Untyped.RWCtx m s)) => (CallSequence'getNumber'results (Message.MutMsg s)) -> Std_.Word32 -> (m ())
-set_CallSequence'getNumber'results'n (CallSequence'getNumber'results'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
-newtype CounterFactory msg
-    = CounterFactory'newtype_ (Std_.Maybe (Untyped.Cap msg))
-instance (Classes.FromPtr msg (CounterFactory msg)) where
-    fromPtr msg ptr = (CounterFactory'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (CounterFactory (Message.MutMsg s))) where
-    toPtr msg (CounterFactory'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
-    toPtr msg (CounterFactory'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
-newtype CounterFactory'newCounter'params msg
-    = CounterFactory'newCounter'params'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (CounterFactory'newCounter'params msg)) where
-    fromStruct struct = (Std_.pure (CounterFactory'newCounter'params'newtype_ struct))
-instance (Classes.ToStruct msg (CounterFactory'newCounter'params msg)) where
-    toStruct (CounterFactory'newCounter'params'newtype_ struct) = struct
-instance (Untyped.HasMessage (CounterFactory'newCounter'params msg)) where
-    type InMessage (CounterFactory'newCounter'params msg) = msg
-    message (CounterFactory'newCounter'params'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (CounterFactory'newCounter'params msg)) where
-    messageDefault msg = (CounterFactory'newCounter'params'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (CounterFactory'newCounter'params msg)) where
-    fromPtr msg ptr = (CounterFactory'newCounter'params'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (CounterFactory'newCounter'params (Message.MutMsg s))) where
-    toPtr msg (CounterFactory'newCounter'params'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (CounterFactory'newCounter'params (Message.MutMsg s))) where
-    new msg = (CounterFactory'newCounter'params'newtype_ <$> (Untyped.allocStruct msg 1 0))
-instance (Basics.ListElem msg (CounterFactory'newCounter'params msg)) where
-    newtype List msg (CounterFactory'newCounter'params msg)
-        = CounterFactory'newCounter'params'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (CounterFactory'newCounter'params'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (CounterFactory'newCounter'params'List_ l) = (Untyped.ListStruct l)
-    length (CounterFactory'newCounter'params'List_ l) = (Untyped.length l)
-    index i (CounterFactory'newCounter'params'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (CounterFactory'newCounter'params (Message.MutMsg s))) where
-    setIndex (CounterFactory'newCounter'params'newtype_ elt) i (CounterFactory'newCounter'params'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (CounterFactory'newCounter'params'List_ <$> (Untyped.allocCompositeList msg 1 0 len))
-get_CounterFactory'newCounter'params'start :: ((Untyped.ReadCtx m msg)) => (CounterFactory'newCounter'params msg) -> (m Std_.Word32)
-get_CounterFactory'newCounter'params'start (CounterFactory'newCounter'params'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_CounterFactory'newCounter'params'start :: ((Untyped.RWCtx m s)) => (CounterFactory'newCounter'params (Message.MutMsg s)) -> Std_.Word32 -> (m ())
-set_CounterFactory'newCounter'params'start (CounterFactory'newCounter'params'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
-newtype CounterFactory'newCounter'results msg
-    = CounterFactory'newCounter'results'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (CounterFactory'newCounter'results msg)) where
-    fromStruct struct = (Std_.pure (CounterFactory'newCounter'results'newtype_ struct))
-instance (Classes.ToStruct msg (CounterFactory'newCounter'results msg)) where
-    toStruct (CounterFactory'newCounter'results'newtype_ struct) = struct
-instance (Untyped.HasMessage (CounterFactory'newCounter'results msg)) where
-    type InMessage (CounterFactory'newCounter'results msg) = msg
-    message (CounterFactory'newCounter'results'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (CounterFactory'newCounter'results msg)) where
-    messageDefault msg = (CounterFactory'newCounter'results'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (CounterFactory'newCounter'results msg)) where
-    fromPtr msg ptr = (CounterFactory'newCounter'results'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (CounterFactory'newCounter'results (Message.MutMsg s))) where
-    toPtr msg (CounterFactory'newCounter'results'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (CounterFactory'newCounter'results (Message.MutMsg s))) where
-    new msg = (CounterFactory'newCounter'results'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (CounterFactory'newCounter'results msg)) where
-    newtype List msg (CounterFactory'newCounter'results msg)
-        = CounterFactory'newCounter'results'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (CounterFactory'newCounter'results'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (CounterFactory'newCounter'results'List_ l) = (Untyped.ListStruct l)
-    length (CounterFactory'newCounter'results'List_ l) = (Untyped.length l)
-    index i (CounterFactory'newCounter'results'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (CounterFactory'newCounter'results (Message.MutMsg s))) where
-    setIndex (CounterFactory'newCounter'results'newtype_ elt) i (CounterFactory'newCounter'results'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (CounterFactory'newCounter'results'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_CounterFactory'newCounter'results'counter :: ((Untyped.ReadCtx m msg)
-                                                 ,(Classes.FromPtr msg (CallSequence msg))) => (CounterFactory'newCounter'results msg) -> (m (CallSequence msg))
-get_CounterFactory'newCounter'results'counter (CounterFactory'newCounter'results'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_CounterFactory'newCounter'results'counter :: ((Untyped.RWCtx m s)
-                                                 ,(Classes.ToPtr s (CallSequence (Message.MutMsg s)))) => (CounterFactory'newCounter'results (Message.MutMsg s)) -> (CallSequence (Message.MutMsg s)) -> (m ())
-set_CounterFactory'newCounter'results'counter (CounterFactory'newCounter'results'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_CounterFactory'newCounter'results'counter :: ((Untyped.ReadCtx m msg)) => (CounterFactory'newCounter'results msg) -> (m Std_.Bool)
-has_CounterFactory'newCounter'results'counter (CounterFactory'newCounter'results'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-newtype CounterAcceptor msg
-    = CounterAcceptor'newtype_ (Std_.Maybe (Untyped.Cap msg))
-instance (Classes.FromPtr msg (CounterAcceptor msg)) where
-    fromPtr msg ptr = (CounterAcceptor'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (CounterAcceptor (Message.MutMsg s))) where
-    toPtr msg (CounterAcceptor'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
-    toPtr msg (CounterAcceptor'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
-newtype CounterAcceptor'accept'params msg
-    = CounterAcceptor'accept'params'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (CounterAcceptor'accept'params msg)) where
-    fromStruct struct = (Std_.pure (CounterAcceptor'accept'params'newtype_ struct))
-instance (Classes.ToStruct msg (CounterAcceptor'accept'params msg)) where
-    toStruct (CounterAcceptor'accept'params'newtype_ struct) = struct
-instance (Untyped.HasMessage (CounterAcceptor'accept'params msg)) where
-    type InMessage (CounterAcceptor'accept'params msg) = msg
-    message (CounterAcceptor'accept'params'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (CounterAcceptor'accept'params msg)) where
-    messageDefault msg = (CounterAcceptor'accept'params'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (CounterAcceptor'accept'params msg)) where
-    fromPtr msg ptr = (CounterAcceptor'accept'params'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (CounterAcceptor'accept'params (Message.MutMsg s))) where
-    toPtr msg (CounterAcceptor'accept'params'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (CounterAcceptor'accept'params (Message.MutMsg s))) where
-    new msg = (CounterAcceptor'accept'params'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (CounterAcceptor'accept'params msg)) where
-    newtype List msg (CounterAcceptor'accept'params msg)
-        = CounterAcceptor'accept'params'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (CounterAcceptor'accept'params'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (CounterAcceptor'accept'params'List_ l) = (Untyped.ListStruct l)
-    length (CounterAcceptor'accept'params'List_ l) = (Untyped.length l)
-    index i (CounterAcceptor'accept'params'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (CounterAcceptor'accept'params (Message.MutMsg s))) where
-    setIndex (CounterAcceptor'accept'params'newtype_ elt) i (CounterAcceptor'accept'params'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (CounterAcceptor'accept'params'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
-get_CounterAcceptor'accept'params'counter :: ((Untyped.ReadCtx m msg)
-                                             ,(Classes.FromPtr msg (CallSequence msg))) => (CounterAcceptor'accept'params msg) -> (m (CallSequence msg))
-get_CounterAcceptor'accept'params'counter (CounterAcceptor'accept'params'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_CounterAcceptor'accept'params'counter :: ((Untyped.RWCtx m s)
-                                             ,(Classes.ToPtr s (CallSequence (Message.MutMsg s)))) => (CounterAcceptor'accept'params (Message.MutMsg s)) -> (CallSequence (Message.MutMsg s)) -> (m ())
-set_CounterAcceptor'accept'params'counter (CounterAcceptor'accept'params'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_CounterAcceptor'accept'params'counter :: ((Untyped.ReadCtx m msg)) => (CounterAcceptor'accept'params msg) -> (m Std_.Bool)
-has_CounterAcceptor'accept'params'counter (CounterAcceptor'accept'params'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-newtype CounterAcceptor'accept'results msg
-    = CounterAcceptor'accept'results'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (CounterAcceptor'accept'results msg)) where
-    fromStruct struct = (Std_.pure (CounterAcceptor'accept'results'newtype_ struct))
-instance (Classes.ToStruct msg (CounterAcceptor'accept'results msg)) where
-    toStruct (CounterAcceptor'accept'results'newtype_ struct) = struct
-instance (Untyped.HasMessage (CounterAcceptor'accept'results msg)) where
-    type InMessage (CounterAcceptor'accept'results msg) = msg
-    message (CounterAcceptor'accept'results'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (CounterAcceptor'accept'results msg)) where
-    messageDefault msg = (CounterAcceptor'accept'results'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (CounterAcceptor'accept'results msg)) where
-    fromPtr msg ptr = (CounterAcceptor'accept'results'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (CounterAcceptor'accept'results (Message.MutMsg s))) where
-    toPtr msg (CounterAcceptor'accept'results'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (CounterAcceptor'accept'results (Message.MutMsg s))) where
-    new msg = (CounterAcceptor'accept'results'newtype_ <$> (Untyped.allocStruct msg 0 0))
-instance (Basics.ListElem msg (CounterAcceptor'accept'results msg)) where
-    newtype List msg (CounterAcceptor'accept'results msg)
-        = CounterAcceptor'accept'results'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (CounterAcceptor'accept'results'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (CounterAcceptor'accept'results'List_ l) = (Untyped.ListStruct l)
-    length (CounterAcceptor'accept'results'List_ l) = (Untyped.length l)
-    index i (CounterAcceptor'accept'results'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (CounterAcceptor'accept'results (Message.MutMsg s))) where
-    setIndex (CounterAcceptor'accept'results'newtype_ elt) i (CounterAcceptor'accept'results'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (CounterAcceptor'accept'results'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
-newtype Top msg
-    = Top'newtype_ (Std_.Maybe (Untyped.Cap msg))
-instance (Classes.FromPtr msg (Top msg)) where
-    fromPtr msg ptr = (Top'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Top (Message.MutMsg s))) where
-    toPtr msg (Top'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
-    toPtr msg (Top'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
-newtype Top'top'params msg
-    = Top'top'params'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Top'top'params msg)) where
-    fromStruct struct = (Std_.pure (Top'top'params'newtype_ struct))
-instance (Classes.ToStruct msg (Top'top'params msg)) where
-    toStruct (Top'top'params'newtype_ struct) = struct
-instance (Untyped.HasMessage (Top'top'params msg)) where
-    type InMessage (Top'top'params msg) = msg
-    message (Top'top'params'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Top'top'params msg)) where
-    messageDefault msg = (Top'top'params'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Top'top'params msg)) where
-    fromPtr msg ptr = (Top'top'params'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Top'top'params (Message.MutMsg s))) where
-    toPtr msg (Top'top'params'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Top'top'params (Message.MutMsg s))) where
-    new msg = (Top'top'params'newtype_ <$> (Untyped.allocStruct msg 0 0))
-instance (Basics.ListElem msg (Top'top'params msg)) where
-    newtype List msg (Top'top'params msg)
-        = Top'top'params'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Top'top'params'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Top'top'params'List_ l) = (Untyped.ListStruct l)
-    length (Top'top'params'List_ l) = (Untyped.length l)
-    index i (Top'top'params'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Top'top'params (Message.MutMsg s))) where
-    setIndex (Top'top'params'newtype_ elt) i (Top'top'params'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Top'top'params'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
-newtype Top'top'results msg
-    = Top'top'results'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Top'top'results msg)) where
-    fromStruct struct = (Std_.pure (Top'top'results'newtype_ struct))
-instance (Classes.ToStruct msg (Top'top'results msg)) where
-    toStruct (Top'top'results'newtype_ struct) = struct
-instance (Untyped.HasMessage (Top'top'results msg)) where
-    type InMessage (Top'top'results msg) = msg
-    message (Top'top'results'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Top'top'results msg)) where
-    messageDefault msg = (Top'top'results'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Top'top'results msg)) where
-    fromPtr msg ptr = (Top'top'results'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Top'top'results (Message.MutMsg s))) where
-    toPtr msg (Top'top'results'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Top'top'results (Message.MutMsg s))) where
-    new msg = (Top'top'results'newtype_ <$> (Untyped.allocStruct msg 0 0))
-instance (Basics.ListElem msg (Top'top'results msg)) where
-    newtype List msg (Top'top'results msg)
-        = Top'top'results'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Top'top'results'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Top'top'results'List_ l) = (Untyped.ListStruct l)
-    length (Top'top'results'List_ l) = (Untyped.length l)
-    index i (Top'top'results'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Top'top'results (Message.MutMsg s))) where
-    setIndex (Top'top'results'newtype_ elt) i (Top'top'results'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Top'top'results'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
-newtype Left msg
-    = Left'newtype_ (Std_.Maybe (Untyped.Cap msg))
-instance (Classes.FromPtr msg (Left msg)) where
-    fromPtr msg ptr = (Left'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Left (Message.MutMsg s))) where
-    toPtr msg (Left'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
-    toPtr msg (Left'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
-newtype Left'left'params msg
-    = Left'left'params'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Left'left'params msg)) where
-    fromStruct struct = (Std_.pure (Left'left'params'newtype_ struct))
-instance (Classes.ToStruct msg (Left'left'params msg)) where
-    toStruct (Left'left'params'newtype_ struct) = struct
-instance (Untyped.HasMessage (Left'left'params msg)) where
-    type InMessage (Left'left'params msg) = msg
-    message (Left'left'params'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Left'left'params msg)) where
-    messageDefault msg = (Left'left'params'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Left'left'params msg)) where
-    fromPtr msg ptr = (Left'left'params'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Left'left'params (Message.MutMsg s))) where
-    toPtr msg (Left'left'params'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Left'left'params (Message.MutMsg s))) where
-    new msg = (Left'left'params'newtype_ <$> (Untyped.allocStruct msg 0 0))
-instance (Basics.ListElem msg (Left'left'params msg)) where
-    newtype List msg (Left'left'params msg)
-        = Left'left'params'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Left'left'params'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Left'left'params'List_ l) = (Untyped.ListStruct l)
-    length (Left'left'params'List_ l) = (Untyped.length l)
-    index i (Left'left'params'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Left'left'params (Message.MutMsg s))) where
-    setIndex (Left'left'params'newtype_ elt) i (Left'left'params'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Left'left'params'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
-newtype Left'left'results msg
-    = Left'left'results'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Left'left'results msg)) where
-    fromStruct struct = (Std_.pure (Left'left'results'newtype_ struct))
-instance (Classes.ToStruct msg (Left'left'results msg)) where
-    toStruct (Left'left'results'newtype_ struct) = struct
-instance (Untyped.HasMessage (Left'left'results msg)) where
-    type InMessage (Left'left'results msg) = msg
-    message (Left'left'results'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Left'left'results msg)) where
-    messageDefault msg = (Left'left'results'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Left'left'results msg)) where
-    fromPtr msg ptr = (Left'left'results'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Left'left'results (Message.MutMsg s))) where
-    toPtr msg (Left'left'results'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Left'left'results (Message.MutMsg s))) where
-    new msg = (Left'left'results'newtype_ <$> (Untyped.allocStruct msg 0 0))
-instance (Basics.ListElem msg (Left'left'results msg)) where
-    newtype List msg (Left'left'results msg)
-        = Left'left'results'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Left'left'results'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Left'left'results'List_ l) = (Untyped.ListStruct l)
-    length (Left'left'results'List_ l) = (Untyped.length l)
-    index i (Left'left'results'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Left'left'results (Message.MutMsg s))) where
-    setIndex (Left'left'results'newtype_ elt) i (Left'left'results'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Left'left'results'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
-newtype Right msg
-    = Right'newtype_ (Std_.Maybe (Untyped.Cap msg))
-instance (Classes.FromPtr msg (Right msg)) where
-    fromPtr msg ptr = (Right'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Right (Message.MutMsg s))) where
-    toPtr msg (Right'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
-    toPtr msg (Right'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
-newtype Right'right'params msg
-    = Right'right'params'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Right'right'params msg)) where
-    fromStruct struct = (Std_.pure (Right'right'params'newtype_ struct))
-instance (Classes.ToStruct msg (Right'right'params msg)) where
-    toStruct (Right'right'params'newtype_ struct) = struct
-instance (Untyped.HasMessage (Right'right'params msg)) where
-    type InMessage (Right'right'params msg) = msg
-    message (Right'right'params'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Right'right'params msg)) where
-    messageDefault msg = (Right'right'params'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Right'right'params msg)) where
-    fromPtr msg ptr = (Right'right'params'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Right'right'params (Message.MutMsg s))) where
-    toPtr msg (Right'right'params'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Right'right'params (Message.MutMsg s))) where
-    new msg = (Right'right'params'newtype_ <$> (Untyped.allocStruct msg 0 0))
-instance (Basics.ListElem msg (Right'right'params msg)) where
-    newtype List msg (Right'right'params msg)
-        = Right'right'params'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Right'right'params'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Right'right'params'List_ l) = (Untyped.ListStruct l)
-    length (Right'right'params'List_ l) = (Untyped.length l)
-    index i (Right'right'params'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Right'right'params (Message.MutMsg s))) where
-    setIndex (Right'right'params'newtype_ elt) i (Right'right'params'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Right'right'params'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
-newtype Right'right'results msg
-    = Right'right'results'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Right'right'results msg)) where
-    fromStruct struct = (Std_.pure (Right'right'results'newtype_ struct))
-instance (Classes.ToStruct msg (Right'right'results msg)) where
-    toStruct (Right'right'results'newtype_ struct) = struct
-instance (Untyped.HasMessage (Right'right'results msg)) where
-    type InMessage (Right'right'results msg) = msg
-    message (Right'right'results'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Right'right'results msg)) where
-    messageDefault msg = (Right'right'results'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Right'right'results msg)) where
-    fromPtr msg ptr = (Right'right'results'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Right'right'results (Message.MutMsg s))) where
-    toPtr msg (Right'right'results'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Right'right'results (Message.MutMsg s))) where
-    new msg = (Right'right'results'newtype_ <$> (Untyped.allocStruct msg 0 0))
-instance (Basics.ListElem msg (Right'right'results msg)) where
-    newtype List msg (Right'right'results msg)
-        = Right'right'results'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Right'right'results'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Right'right'results'List_ l) = (Untyped.ListStruct l)
-    length (Right'right'results'List_ l) = (Untyped.length l)
-    index i (Right'right'results'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Right'right'results (Message.MutMsg s))) where
-    setIndex (Right'right'results'newtype_ elt) i (Right'right'results'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Right'right'results'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
-newtype Bottom msg
-    = Bottom'newtype_ (Std_.Maybe (Untyped.Cap msg))
-instance (Classes.FromPtr msg (Bottom msg)) where
-    fromPtr msg ptr = (Bottom'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Bottom (Message.MutMsg s))) where
-    toPtr msg (Bottom'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
-    toPtr msg (Bottom'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
-newtype Bottom'bottom'params msg
-    = Bottom'bottom'params'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Bottom'bottom'params msg)) where
-    fromStruct struct = (Std_.pure (Bottom'bottom'params'newtype_ struct))
-instance (Classes.ToStruct msg (Bottom'bottom'params msg)) where
-    toStruct (Bottom'bottom'params'newtype_ struct) = struct
-instance (Untyped.HasMessage (Bottom'bottom'params msg)) where
-    type InMessage (Bottom'bottom'params msg) = msg
-    message (Bottom'bottom'params'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Bottom'bottom'params msg)) where
-    messageDefault msg = (Bottom'bottom'params'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Bottom'bottom'params msg)) where
-    fromPtr msg ptr = (Bottom'bottom'params'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Bottom'bottom'params (Message.MutMsg s))) where
-    toPtr msg (Bottom'bottom'params'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Bottom'bottom'params (Message.MutMsg s))) where
-    new msg = (Bottom'bottom'params'newtype_ <$> (Untyped.allocStruct msg 0 0))
-instance (Basics.ListElem msg (Bottom'bottom'params msg)) where
-    newtype List msg (Bottom'bottom'params msg)
-        = Bottom'bottom'params'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Bottom'bottom'params'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Bottom'bottom'params'List_ l) = (Untyped.ListStruct l)
-    length (Bottom'bottom'params'List_ l) = (Untyped.length l)
-    index i (Bottom'bottom'params'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Bottom'bottom'params (Message.MutMsg s))) where
-    setIndex (Bottom'bottom'params'newtype_ elt) i (Bottom'bottom'params'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Bottom'bottom'params'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
-newtype Bottom'bottom'results msg
-    = Bottom'bottom'results'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Bottom'bottom'results msg)) where
-    fromStruct struct = (Std_.pure (Bottom'bottom'results'newtype_ struct))
-instance (Classes.ToStruct msg (Bottom'bottom'results msg)) where
-    toStruct (Bottom'bottom'results'newtype_ struct) = struct
-instance (Untyped.HasMessage (Bottom'bottom'results msg)) where
-    type InMessage (Bottom'bottom'results msg) = msg
-    message (Bottom'bottom'results'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Bottom'bottom'results msg)) where
-    messageDefault msg = (Bottom'bottom'results'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Bottom'bottom'results msg)) where
-    fromPtr msg ptr = (Bottom'bottom'results'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Bottom'bottom'results (Message.MutMsg s))) where
-    toPtr msg (Bottom'bottom'results'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Bottom'bottom'results (Message.MutMsg s))) where
-    new msg = (Bottom'bottom'results'newtype_ <$> (Untyped.allocStruct msg 0 0))
-instance (Basics.ListElem msg (Bottom'bottom'results msg)) where
-    newtype List msg (Bottom'bottom'results msg)
-        = Bottom'bottom'results'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Bottom'bottom'results'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Bottom'bottom'results'List_ l) = (Untyped.ListStruct l)
-    length (Bottom'bottom'results'List_ l) = (Untyped.length l)
-    index i (Bottom'bottom'results'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Bottom'bottom'results (Message.MutMsg s))) where
-    setIndex (Bottom'bottom'results'newtype_ elt) i (Bottom'bottom'results'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Bottom'bottom'results'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
-newtype Defaults msg
-    = Defaults'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (Defaults msg)) where
-    fromStruct struct = (Std_.pure (Defaults'newtype_ struct))
-instance (Classes.ToStruct msg (Defaults msg)) where
-    toStruct (Defaults'newtype_ struct) = struct
-instance (Untyped.HasMessage (Defaults msg)) where
-    type InMessage (Defaults msg) = msg
-    message (Defaults'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Defaults msg)) where
-    messageDefault msg = (Defaults'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (Defaults msg)) where
-    fromPtr msg ptr = (Defaults'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Defaults (Message.MutMsg s))) where
-    toPtr msg (Defaults'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Defaults (Message.MutMsg s))) where
-    new msg = (Defaults'newtype_ <$> (Untyped.allocStruct msg 2 2))
-instance (Basics.ListElem msg (Defaults msg)) where
-    newtype List msg (Defaults msg)
-        = Defaults'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (Defaults'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (Defaults'List_ l) = (Untyped.ListStruct l)
-    length (Defaults'List_ l) = (Untyped.length l)
-    index i (Defaults'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (Defaults (Message.MutMsg s))) where
-    setIndex (Defaults'newtype_ elt) i (Defaults'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (Defaults'List_ <$> (Untyped.allocCompositeList msg 2 2 len))
-get_Defaults'text :: ((Untyped.ReadCtx m msg)
-                     ,(Classes.FromPtr msg (Basics.Text msg))) => (Defaults msg) -> (m (Basics.Text msg))
-get_Defaults'text (Defaults'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_Defaults'text :: ((Untyped.RWCtx m s)
-                     ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (Defaults (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
-set_Defaults'text (Defaults'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_Defaults'text :: ((Untyped.ReadCtx m msg)) => (Defaults msg) -> (m Std_.Bool)
-has_Defaults'text (Defaults'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Defaults'text :: ((Untyped.RWCtx m s)) => Std_.Int -> (Defaults (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
-new_Defaults'text len struct = (do
-    result <- (Basics.newText (Untyped.message struct) len)
-    (set_Defaults'text struct result)
-    (Std_.pure result)
-    )
-get_Defaults'data_ :: ((Untyped.ReadCtx m msg)
-                      ,(Classes.FromPtr msg (Basics.Data msg))) => (Defaults msg) -> (m (Basics.Data msg))
-get_Defaults'data_ (Defaults'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 1 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_Defaults'data_ :: ((Untyped.RWCtx m s)
-                      ,(Classes.ToPtr s (Basics.Data (Message.MutMsg s)))) => (Defaults (Message.MutMsg s)) -> (Basics.Data (Message.MutMsg s)) -> (m ())
-set_Defaults'data_ (Defaults'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 1 struct)
-    )
-has_Defaults'data_ :: ((Untyped.ReadCtx m msg)) => (Defaults msg) -> (m Std_.Bool)
-has_Defaults'data_ (Defaults'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_Defaults'data_ :: ((Untyped.RWCtx m s)) => Std_.Int -> (Defaults (Message.MutMsg s)) -> (m (Basics.Data (Message.MutMsg s)))
-new_Defaults'data_ len struct = (do
-    result <- (Basics.newData (Untyped.message struct) len)
-    (set_Defaults'data_ struct result)
-    (Std_.pure result)
-    )
-get_Defaults'float :: ((Untyped.ReadCtx m msg)) => (Defaults msg) -> (m Std_.Float)
-get_Defaults'float (Defaults'newtype_ struct) = (GenHelpers.getWordField struct 0 0 1078523331)
-set_Defaults'float :: ((Untyped.RWCtx m s)) => (Defaults (Message.MutMsg s)) -> Std_.Float -> (m ())
-set_Defaults'float (Defaults'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 1078523331)
-get_Defaults'int :: ((Untyped.ReadCtx m msg)) => (Defaults msg) -> (m Std_.Int32)
-get_Defaults'int (Defaults'newtype_ struct) = (GenHelpers.getWordField struct 0 32 18446744073709551493)
-set_Defaults'int :: ((Untyped.RWCtx m s)) => (Defaults (Message.MutMsg s)) -> Std_.Int32 -> (m ())
-set_Defaults'int (Defaults'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 32 18446744073709551493)
-get_Defaults'uint :: ((Untyped.ReadCtx m msg)) => (Defaults msg) -> (m Std_.Word32)
-get_Defaults'uint (Defaults'newtype_ struct) = (GenHelpers.getWordField struct 1 0 42)
-set_Defaults'uint :: ((Untyped.RWCtx m s)) => (Defaults (Message.MutMsg s)) -> Std_.Word32 -> (m ())
-set_Defaults'uint (Defaults'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 1 0 42)
-newtype BenchmarkA msg
-    = BenchmarkA'newtype_ (Untyped.Struct msg)
-instance (Classes.FromStruct msg (BenchmarkA msg)) where
-    fromStruct struct = (Std_.pure (BenchmarkA'newtype_ struct))
-instance (Classes.ToStruct msg (BenchmarkA msg)) where
-    toStruct (BenchmarkA'newtype_ struct) = struct
-instance (Untyped.HasMessage (BenchmarkA msg)) where
-    type InMessage (BenchmarkA msg) = msg
-    message (BenchmarkA'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (BenchmarkA msg)) where
-    messageDefault msg = (BenchmarkA'newtype_ <$> (Untyped.messageDefault msg))
-instance (Classes.FromPtr msg (BenchmarkA msg)) where
-    fromPtr msg ptr = (BenchmarkA'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (BenchmarkA (Message.MutMsg s))) where
-    toPtr msg (BenchmarkA'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (BenchmarkA (Message.MutMsg s))) where
-    new msg = (BenchmarkA'newtype_ <$> (Untyped.allocStruct msg 3 2))
-instance (Basics.ListElem msg (BenchmarkA msg)) where
-    newtype List msg (BenchmarkA msg)
-        = BenchmarkA'List_ (Untyped.ListOf msg (Untyped.Struct msg))
-    listFromPtr msg ptr = (BenchmarkA'List_ <$> (Classes.fromPtr msg ptr))
-    toUntypedList (BenchmarkA'List_ l) = (Untyped.ListStruct l)
-    length (BenchmarkA'List_ l) = (Untyped.length l)
-    index i (BenchmarkA'List_ l) = (do
-        elt <- (Untyped.index i l)
-        (Classes.fromStruct elt)
-        )
-instance (Basics.MutListElem s (BenchmarkA (Message.MutMsg s))) where
-    setIndex (BenchmarkA'newtype_ elt) i (BenchmarkA'List_ l) = (Untyped.setIndex elt i l)
-    newList msg len = (BenchmarkA'List_ <$> (Untyped.allocCompositeList msg 3 2 len))
-get_BenchmarkA'name :: ((Untyped.ReadCtx m msg)
-                       ,(Classes.FromPtr msg (Basics.Text msg))) => (BenchmarkA msg) -> (m (Basics.Text msg))
-get_BenchmarkA'name (BenchmarkA'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 0 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_BenchmarkA'name :: ((Untyped.RWCtx m s)
-                       ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (BenchmarkA (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
-set_BenchmarkA'name (BenchmarkA'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 0 struct)
-    )
-has_BenchmarkA'name :: ((Untyped.ReadCtx m msg)) => (BenchmarkA msg) -> (m Std_.Bool)
-has_BenchmarkA'name (BenchmarkA'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_BenchmarkA'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (BenchmarkA (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
-new_BenchmarkA'name len struct = (do
-    result <- (Basics.newText (Untyped.message struct) len)
-    (set_BenchmarkA'name struct result)
-    (Std_.pure result)
-    )
-get_BenchmarkA'birthDay :: ((Untyped.ReadCtx m msg)) => (BenchmarkA msg) -> (m Std_.Int64)
-get_BenchmarkA'birthDay (BenchmarkA'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
-set_BenchmarkA'birthDay :: ((Untyped.RWCtx m s)) => (BenchmarkA (Message.MutMsg s)) -> Std_.Int64 -> (m ())
-set_BenchmarkA'birthDay (BenchmarkA'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 0 0 0)
-get_BenchmarkA'phone :: ((Untyped.ReadCtx m msg)
-                        ,(Classes.FromPtr msg (Basics.Text msg))) => (BenchmarkA msg) -> (m (Basics.Text msg))
-get_BenchmarkA'phone (BenchmarkA'newtype_ struct) = (do
-    ptr <- (Untyped.getPtr 1 struct)
-    (Classes.fromPtr (Untyped.message struct) ptr)
-    )
-set_BenchmarkA'phone :: ((Untyped.RWCtx m s)
-                        ,(Classes.ToPtr s (Basics.Text (Message.MutMsg s)))) => (BenchmarkA (Message.MutMsg s)) -> (Basics.Text (Message.MutMsg s)) -> (m ())
-set_BenchmarkA'phone (BenchmarkA'newtype_ struct) value = (do
-    ptr <- (Classes.toPtr (Untyped.message struct) value)
-    (Untyped.setPtr ptr 1 struct)
-    )
-has_BenchmarkA'phone :: ((Untyped.ReadCtx m msg)) => (BenchmarkA msg) -> (m Std_.Bool)
-has_BenchmarkA'phone (BenchmarkA'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_BenchmarkA'phone :: ((Untyped.RWCtx m s)) => Std_.Int -> (BenchmarkA (Message.MutMsg s)) -> (m (Basics.Text (Message.MutMsg s)))
-new_BenchmarkA'phone len struct = (do
-    result <- (Basics.newText (Untyped.message struct) len)
-    (set_BenchmarkA'phone struct result)
-    (Std_.pure result)
-    )
-get_BenchmarkA'siblings :: ((Untyped.ReadCtx m msg)) => (BenchmarkA msg) -> (m Std_.Int32)
-get_BenchmarkA'siblings (BenchmarkA'newtype_ struct) = (GenHelpers.getWordField struct 1 0 0)
-set_BenchmarkA'siblings :: ((Untyped.RWCtx m s)) => (BenchmarkA (Message.MutMsg s)) -> Std_.Int32 -> (m ())
-set_BenchmarkA'siblings (BenchmarkA'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 1 0 0)
-get_BenchmarkA'spouse :: ((Untyped.ReadCtx m msg)) => (BenchmarkA msg) -> (m Std_.Bool)
-get_BenchmarkA'spouse (BenchmarkA'newtype_ struct) = (GenHelpers.getWordField struct 1 32 0)
-set_BenchmarkA'spouse :: ((Untyped.RWCtx m s)) => (BenchmarkA (Message.MutMsg s)) -> Std_.Bool -> (m ())
-set_BenchmarkA'spouse (BenchmarkA'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 1 32 0)
-get_BenchmarkA'money :: ((Untyped.ReadCtx m msg)) => (BenchmarkA msg) -> (m Std_.Double)
-get_BenchmarkA'money (BenchmarkA'newtype_ struct) = (GenHelpers.getWordField struct 2 0 0)
-set_BenchmarkA'money :: ((Untyped.RWCtx m s)) => (BenchmarkA (Message.MutMsg s)) -> Std_.Double -> (m ())
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# OPTIONS_GHC -Wno-unused-imports #-}
+{-# OPTIONS_GHC -Wno-dodgy-exports #-}
+{-# OPTIONS_GHC -Wno-unused-matches #-}
+{-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
+module Capnp.Gen.Aircraft where
+import qualified Capnp.Message as Message
+import qualified Capnp.Untyped as Untyped
+import qualified Capnp.Basics as Basics
+import qualified Capnp.GenHelpers as GenHelpers
+import qualified Capnp.Classes as Classes
+import qualified GHC.Generics as Generics
+import qualified Capnp.Bits as Std_
+import qualified Data.Maybe as Std_
+import qualified Capnp.GenHelpers.ReExports.Data.ByteString as BS
+import qualified Prelude as Std_
+import qualified Data.Word as Std_
+import qualified Data.Int as Std_
+import Prelude ((<$>), (<*>), (>>=))
+constDate :: (Zdate Message.Const)
+constDate  = (GenHelpers.getPtrConst ("\NUL\NUL\NUL\NUL\ETX\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\SOH\NUL\NUL\NUL\NUL\NUL\SOH\NUL\NUL\NUL\223\a\b\ESC\NUL\NUL\NUL\NUL" :: BS.ByteString))
+constList :: (Basics.List Message.Const (Zdate Message.Const))
+constList  = (GenHelpers.getPtrConst ("\NUL\NUL\NUL\NUL\ENQ\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\SOH\NUL\SOH\NUL\NUL\NUL\ETB\NUL\NUL\NUL\b\NUL\NUL\NUL\SOH\NUL\NUL\NUL\223\a\b\ESC\NUL\NUL\NUL\NUL\223\a\b\FS\NUL\NUL\NUL\NUL" :: BS.ByteString))
+constEnum :: Airport
+constEnum  = (Classes.fromWord 1)
+newtype Zdate msg
+    = Zdate'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Zdate msg)) where
+    fromStruct struct = (Std_.pure (Zdate'newtype_ struct))
+instance (Classes.ToStruct msg (Zdate msg)) where
+    toStruct (Zdate'newtype_ struct) = struct
+instance (Untyped.HasMessage (Zdate mut) mut) where
+    message (Zdate'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Zdate mut) mut) where
+    messageDefault msg = (Zdate'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Zdate msg)) where
+    fromPtr msg ptr = (Zdate'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Zdate (Message.Mut s))) where
+    toPtr msg (Zdate'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Zdate (Message.Mut s))) where
+    new msg = (Zdate'newtype_ <$> (Untyped.allocStruct msg 1 0))
+instance (Basics.ListElem mut (Zdate mut)) where
+    newtype List mut (Zdate mut)
+        = Zdate'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Zdate'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Zdate'List_ l) = (Untyped.ListStruct l)
+    length (Zdate'List_ l) = (Untyped.length l)
+    index i (Zdate'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Zdate (Message.Mut s))) where
+    setIndex (Zdate'newtype_ elt) i (Zdate'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Zdate'List_ <$> (Untyped.allocCompositeList msg 1 0 len))
+get_Zdate'year :: ((Untyped.ReadCtx m msg)) => (Zdate msg) -> (m Std_.Int16)
+get_Zdate'year (Zdate'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
+set_Zdate'year :: ((Untyped.RWCtx m s)) => (Zdate (Message.Mut s)) -> Std_.Int16 -> (m ())
+set_Zdate'year (Zdate'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
+get_Zdate'month :: ((Untyped.ReadCtx m msg)) => (Zdate msg) -> (m Std_.Word8)
+get_Zdate'month (Zdate'newtype_ struct) = (GenHelpers.getWordField struct 0 16 0)
+set_Zdate'month :: ((Untyped.RWCtx m s)) => (Zdate (Message.Mut s)) -> Std_.Word8 -> (m ())
+set_Zdate'month (Zdate'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word8) 0 16 0)
+get_Zdate'day :: ((Untyped.ReadCtx m msg)) => (Zdate msg) -> (m Std_.Word8)
+get_Zdate'day (Zdate'newtype_ struct) = (GenHelpers.getWordField struct 0 24 0)
+set_Zdate'day :: ((Untyped.RWCtx m s)) => (Zdate (Message.Mut s)) -> Std_.Word8 -> (m ())
+set_Zdate'day (Zdate'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word8) 0 24 0)
+newtype Zdata msg
+    = Zdata'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Zdata msg)) where
+    fromStruct struct = (Std_.pure (Zdata'newtype_ struct))
+instance (Classes.ToStruct msg (Zdata msg)) where
+    toStruct (Zdata'newtype_ struct) = struct
+instance (Untyped.HasMessage (Zdata mut) mut) where
+    message (Zdata'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Zdata mut) mut) where
+    messageDefault msg = (Zdata'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Zdata msg)) where
+    fromPtr msg ptr = (Zdata'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Zdata (Message.Mut s))) where
+    toPtr msg (Zdata'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Zdata (Message.Mut s))) where
+    new msg = (Zdata'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (Zdata mut)) where
+    newtype List mut (Zdata mut)
+        = Zdata'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Zdata'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Zdata'List_ l) = (Untyped.ListStruct l)
+    length (Zdata'List_ l) = (Untyped.length l)
+    index i (Zdata'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Zdata (Message.Mut s))) where
+    setIndex (Zdata'newtype_ elt) i (Zdata'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Zdata'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_Zdata'data_ :: ((Untyped.ReadCtx m msg)
+                   ,(Classes.FromPtr msg (Basics.Data msg))) => (Zdata msg) -> (m (Basics.Data msg))
+get_Zdata'data_ (Zdata'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_Zdata'data_ :: ((Untyped.RWCtx m s)
+                   ,(Classes.ToPtr s (Basics.Data (Message.Mut s)))) => (Zdata (Message.Mut s)) -> (Basics.Data (Message.Mut s)) -> (m ())
+set_Zdata'data_ (Zdata'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_Zdata'data_ :: ((Untyped.ReadCtx m msg)) => (Zdata msg) -> (m Std_.Bool)
+has_Zdata'data_ (Zdata'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_Zdata'data_ :: ((Untyped.RWCtx m s)) => Std_.Int -> (Zdata (Message.Mut s)) -> (m (Basics.Data (Message.Mut s)))
+new_Zdata'data_ len struct = (do
+    result <- (Basics.newData (Untyped.message struct) len)
+    (set_Zdata'data_ struct result)
+    (Std_.pure result)
+    )
+data Airport 
+    = Airport'none 
+    | Airport'jfk 
+    | Airport'lax 
+    | Airport'sfo 
+    | Airport'luv 
+    | Airport'dfw 
+    | Airport'test 
+    | Airport'unknown' Std_.Word16
+    deriving(Std_.Show
+            ,Std_.Read
+            ,Std_.Eq
+            ,Generics.Generic)
+instance (Classes.IsWord Airport) where
+    fromWord n = case ((Std_.fromIntegral n) :: Std_.Word16) of
+        0 ->
+            Airport'none
+        1 ->
+            Airport'jfk
+        2 ->
+            Airport'lax
+        3 ->
+            Airport'sfo
+        4 ->
+            Airport'luv
+        5 ->
+            Airport'dfw
+        6 ->
+            Airport'test
+        tag ->
+            (Airport'unknown' tag)
+    toWord (Airport'none) = 0
+    toWord (Airport'jfk) = 1
+    toWord (Airport'lax) = 2
+    toWord (Airport'sfo) = 3
+    toWord (Airport'luv) = 4
+    toWord (Airport'dfw) = 5
+    toWord (Airport'test) = 6
+    toWord (Airport'unknown' tag) = (Std_.fromIntegral tag)
+instance (Std_.Enum Airport) where
+    fromEnum x = (Std_.fromIntegral (Classes.toWord x))
+    toEnum x = (Classes.fromWord (Std_.fromIntegral x))
+instance (Basics.ListElem mut Airport) where
+    newtype List mut Airport
+        = Airport'List_ (Untyped.ListOf mut Std_.Word16)
+    index i (Airport'List_ l) = (Classes.fromWord <$> (Std_.fromIntegral <$> (Untyped.index i l)))
+    listFromPtr msg ptr = (Airport'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Airport'List_ l) = (Untyped.List16 l)
+    length (Airport'List_ l) = (Untyped.length l)
+instance (Classes.MutListElem s Airport) where
+    setIndex elt i (Airport'List_ l) = (Untyped.setIndex (Std_.fromIntegral (Classes.toWord elt)) i l)
+    newList msg size = (Airport'List_ <$> (Untyped.allocList16 msg size))
+newtype PlaneBase msg
+    = PlaneBase'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (PlaneBase msg)) where
+    fromStruct struct = (Std_.pure (PlaneBase'newtype_ struct))
+instance (Classes.ToStruct msg (PlaneBase msg)) where
+    toStruct (PlaneBase'newtype_ struct) = struct
+instance (Untyped.HasMessage (PlaneBase mut) mut) where
+    message (PlaneBase'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (PlaneBase mut) mut) where
+    messageDefault msg = (PlaneBase'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (PlaneBase msg)) where
+    fromPtr msg ptr = (PlaneBase'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (PlaneBase (Message.Mut s))) where
+    toPtr msg (PlaneBase'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (PlaneBase (Message.Mut s))) where
+    new msg = (PlaneBase'newtype_ <$> (Untyped.allocStruct msg 4 2))
+instance (Basics.ListElem mut (PlaneBase mut)) where
+    newtype List mut (PlaneBase mut)
+        = PlaneBase'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (PlaneBase'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (PlaneBase'List_ l) = (Untyped.ListStruct l)
+    length (PlaneBase'List_ l) = (Untyped.length l)
+    index i (PlaneBase'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (PlaneBase (Message.Mut s))) where
+    setIndex (PlaneBase'newtype_ elt) i (PlaneBase'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (PlaneBase'List_ <$> (Untyped.allocCompositeList msg 4 2 len))
+get_PlaneBase'name :: ((Untyped.ReadCtx m msg)
+                      ,(Classes.FromPtr msg (Basics.Text msg))) => (PlaneBase msg) -> (m (Basics.Text msg))
+get_PlaneBase'name (PlaneBase'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_PlaneBase'name :: ((Untyped.RWCtx m s)
+                      ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (PlaneBase (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
+set_PlaneBase'name (PlaneBase'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_PlaneBase'name :: ((Untyped.ReadCtx m msg)) => (PlaneBase msg) -> (m Std_.Bool)
+has_PlaneBase'name (PlaneBase'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_PlaneBase'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (PlaneBase (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
+new_PlaneBase'name len struct = (do
+    result <- (Basics.newText (Untyped.message struct) len)
+    (set_PlaneBase'name struct result)
+    (Std_.pure result)
+    )
+get_PlaneBase'homes :: ((Untyped.ReadCtx m msg)
+                       ,(Classes.FromPtr msg (Basics.List msg Airport))) => (PlaneBase msg) -> (m (Basics.List msg Airport))
+get_PlaneBase'homes (PlaneBase'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 1 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_PlaneBase'homes :: ((Untyped.RWCtx m s)
+                       ,(Classes.ToPtr s (Basics.List (Message.Mut s) Airport))) => (PlaneBase (Message.Mut s)) -> (Basics.List (Message.Mut s) Airport) -> (m ())
+set_PlaneBase'homes (PlaneBase'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 1 struct)
+    )
+has_PlaneBase'homes :: ((Untyped.ReadCtx m msg)) => (PlaneBase msg) -> (m Std_.Bool)
+has_PlaneBase'homes (PlaneBase'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
+new_PlaneBase'homes :: ((Untyped.RWCtx m s)) => Std_.Int -> (PlaneBase (Message.Mut s)) -> (m (Basics.List (Message.Mut s) Airport))
+new_PlaneBase'homes len struct = (do
+    result <- (Classes.newList (Untyped.message struct) len)
+    (set_PlaneBase'homes struct result)
+    (Std_.pure result)
+    )
+get_PlaneBase'rating :: ((Untyped.ReadCtx m msg)) => (PlaneBase msg) -> (m Std_.Int64)
+get_PlaneBase'rating (PlaneBase'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
+set_PlaneBase'rating :: ((Untyped.RWCtx m s)) => (PlaneBase (Message.Mut s)) -> Std_.Int64 -> (m ())
+set_PlaneBase'rating (PlaneBase'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 0 0 0)
+get_PlaneBase'canFly :: ((Untyped.ReadCtx m msg)) => (PlaneBase msg) -> (m Std_.Bool)
+get_PlaneBase'canFly (PlaneBase'newtype_ struct) = (GenHelpers.getWordField struct 1 0 0)
+set_PlaneBase'canFly :: ((Untyped.RWCtx m s)) => (PlaneBase (Message.Mut s)) -> Std_.Bool -> (m ())
+set_PlaneBase'canFly (PlaneBase'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 1 0 0)
+get_PlaneBase'capacity :: ((Untyped.ReadCtx m msg)) => (PlaneBase msg) -> (m Std_.Int64)
+get_PlaneBase'capacity (PlaneBase'newtype_ struct) = (GenHelpers.getWordField struct 2 0 0)
+set_PlaneBase'capacity :: ((Untyped.RWCtx m s)) => (PlaneBase (Message.Mut s)) -> Std_.Int64 -> (m ())
+set_PlaneBase'capacity (PlaneBase'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 2 0 0)
+get_PlaneBase'maxSpeed :: ((Untyped.ReadCtx m msg)) => (PlaneBase msg) -> (m Std_.Double)
+get_PlaneBase'maxSpeed (PlaneBase'newtype_ struct) = (GenHelpers.getWordField struct 3 0 0)
+set_PlaneBase'maxSpeed :: ((Untyped.RWCtx m s)) => (PlaneBase (Message.Mut s)) -> Std_.Double -> (m ())
+set_PlaneBase'maxSpeed (PlaneBase'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 3 0 0)
+newtype B737 msg
+    = B737'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (B737 msg)) where
+    fromStruct struct = (Std_.pure (B737'newtype_ struct))
+instance (Classes.ToStruct msg (B737 msg)) where
+    toStruct (B737'newtype_ struct) = struct
+instance (Untyped.HasMessage (B737 mut) mut) where
+    message (B737'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (B737 mut) mut) where
+    messageDefault msg = (B737'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (B737 msg)) where
+    fromPtr msg ptr = (B737'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (B737 (Message.Mut s))) where
+    toPtr msg (B737'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (B737 (Message.Mut s))) where
+    new msg = (B737'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (B737 mut)) where
+    newtype List mut (B737 mut)
+        = B737'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (B737'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (B737'List_ l) = (Untyped.ListStruct l)
+    length (B737'List_ l) = (Untyped.length l)
+    index i (B737'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (B737 (Message.Mut s))) where
+    setIndex (B737'newtype_ elt) i (B737'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (B737'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_B737'base :: ((Untyped.ReadCtx m msg)
+                 ,(Classes.FromPtr msg (PlaneBase msg))) => (B737 msg) -> (m (PlaneBase msg))
+get_B737'base (B737'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_B737'base :: ((Untyped.RWCtx m s)
+                 ,(Classes.ToPtr s (PlaneBase (Message.Mut s)))) => (B737 (Message.Mut s)) -> (PlaneBase (Message.Mut s)) -> (m ())
+set_B737'base (B737'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_B737'base :: ((Untyped.ReadCtx m msg)) => (B737 msg) -> (m Std_.Bool)
+has_B737'base (B737'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_B737'base :: ((Untyped.RWCtx m s)) => (B737 (Message.Mut s)) -> (m (PlaneBase (Message.Mut s)))
+new_B737'base struct = (do
+    result <- (Classes.new (Untyped.message struct))
+    (set_B737'base struct result)
+    (Std_.pure result)
+    )
+newtype A320 msg
+    = A320'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (A320 msg)) where
+    fromStruct struct = (Std_.pure (A320'newtype_ struct))
+instance (Classes.ToStruct msg (A320 msg)) where
+    toStruct (A320'newtype_ struct) = struct
+instance (Untyped.HasMessage (A320 mut) mut) where
+    message (A320'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (A320 mut) mut) where
+    messageDefault msg = (A320'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (A320 msg)) where
+    fromPtr msg ptr = (A320'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (A320 (Message.Mut s))) where
+    toPtr msg (A320'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (A320 (Message.Mut s))) where
+    new msg = (A320'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (A320 mut)) where
+    newtype List mut (A320 mut)
+        = A320'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (A320'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (A320'List_ l) = (Untyped.ListStruct l)
+    length (A320'List_ l) = (Untyped.length l)
+    index i (A320'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (A320 (Message.Mut s))) where
+    setIndex (A320'newtype_ elt) i (A320'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (A320'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_A320'base :: ((Untyped.ReadCtx m msg)
+                 ,(Classes.FromPtr msg (PlaneBase msg))) => (A320 msg) -> (m (PlaneBase msg))
+get_A320'base (A320'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_A320'base :: ((Untyped.RWCtx m s)
+                 ,(Classes.ToPtr s (PlaneBase (Message.Mut s)))) => (A320 (Message.Mut s)) -> (PlaneBase (Message.Mut s)) -> (m ())
+set_A320'base (A320'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_A320'base :: ((Untyped.ReadCtx m msg)) => (A320 msg) -> (m Std_.Bool)
+has_A320'base (A320'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_A320'base :: ((Untyped.RWCtx m s)) => (A320 (Message.Mut s)) -> (m (PlaneBase (Message.Mut s)))
+new_A320'base struct = (do
+    result <- (Classes.new (Untyped.message struct))
+    (set_A320'base struct result)
+    (Std_.pure result)
+    )
+newtype F16 msg
+    = F16'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (F16 msg)) where
+    fromStruct struct = (Std_.pure (F16'newtype_ struct))
+instance (Classes.ToStruct msg (F16 msg)) where
+    toStruct (F16'newtype_ struct) = struct
+instance (Untyped.HasMessage (F16 mut) mut) where
+    message (F16'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (F16 mut) mut) where
+    messageDefault msg = (F16'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (F16 msg)) where
+    fromPtr msg ptr = (F16'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (F16 (Message.Mut s))) where
+    toPtr msg (F16'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (F16 (Message.Mut s))) where
+    new msg = (F16'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (F16 mut)) where
+    newtype List mut (F16 mut)
+        = F16'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (F16'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (F16'List_ l) = (Untyped.ListStruct l)
+    length (F16'List_ l) = (Untyped.length l)
+    index i (F16'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (F16 (Message.Mut s))) where
+    setIndex (F16'newtype_ elt) i (F16'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (F16'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_F16'base :: ((Untyped.ReadCtx m msg)
+                ,(Classes.FromPtr msg (PlaneBase msg))) => (F16 msg) -> (m (PlaneBase msg))
+get_F16'base (F16'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_F16'base :: ((Untyped.RWCtx m s)
+                ,(Classes.ToPtr s (PlaneBase (Message.Mut s)))) => (F16 (Message.Mut s)) -> (PlaneBase (Message.Mut s)) -> (m ())
+set_F16'base (F16'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_F16'base :: ((Untyped.ReadCtx m msg)) => (F16 msg) -> (m Std_.Bool)
+has_F16'base (F16'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_F16'base :: ((Untyped.RWCtx m s)) => (F16 (Message.Mut s)) -> (m (PlaneBase (Message.Mut s)))
+new_F16'base struct = (do
+    result <- (Classes.new (Untyped.message struct))
+    (set_F16'base struct result)
+    (Std_.pure result)
+    )
+newtype Regression msg
+    = Regression'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Regression msg)) where
+    fromStruct struct = (Std_.pure (Regression'newtype_ struct))
+instance (Classes.ToStruct msg (Regression msg)) where
+    toStruct (Regression'newtype_ struct) = struct
+instance (Untyped.HasMessage (Regression mut) mut) where
+    message (Regression'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Regression mut) mut) where
+    messageDefault msg = (Regression'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Regression msg)) where
+    fromPtr msg ptr = (Regression'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Regression (Message.Mut s))) where
+    toPtr msg (Regression'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Regression (Message.Mut s))) where
+    new msg = (Regression'newtype_ <$> (Untyped.allocStruct msg 3 3))
+instance (Basics.ListElem mut (Regression mut)) where
+    newtype List mut (Regression mut)
+        = Regression'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Regression'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Regression'List_ l) = (Untyped.ListStruct l)
+    length (Regression'List_ l) = (Untyped.length l)
+    index i (Regression'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Regression (Message.Mut s))) where
+    setIndex (Regression'newtype_ elt) i (Regression'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Regression'List_ <$> (Untyped.allocCompositeList msg 3 3 len))
+get_Regression'base :: ((Untyped.ReadCtx m msg)
+                       ,(Classes.FromPtr msg (PlaneBase msg))) => (Regression msg) -> (m (PlaneBase msg))
+get_Regression'base (Regression'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_Regression'base :: ((Untyped.RWCtx m s)
+                       ,(Classes.ToPtr s (PlaneBase (Message.Mut s)))) => (Regression (Message.Mut s)) -> (PlaneBase (Message.Mut s)) -> (m ())
+set_Regression'base (Regression'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_Regression'base :: ((Untyped.ReadCtx m msg)) => (Regression msg) -> (m Std_.Bool)
+has_Regression'base (Regression'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_Regression'base :: ((Untyped.RWCtx m s)) => (Regression (Message.Mut s)) -> (m (PlaneBase (Message.Mut s)))
+new_Regression'base struct = (do
+    result <- (Classes.new (Untyped.message struct))
+    (set_Regression'base struct result)
+    (Std_.pure result)
+    )
+get_Regression'b0 :: ((Untyped.ReadCtx m msg)) => (Regression msg) -> (m Std_.Double)
+get_Regression'b0 (Regression'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
+set_Regression'b0 :: ((Untyped.RWCtx m s)) => (Regression (Message.Mut s)) -> Std_.Double -> (m ())
+set_Regression'b0 (Regression'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 0 0 0)
+get_Regression'beta :: ((Untyped.ReadCtx m msg)
+                       ,(Classes.FromPtr msg (Basics.List msg Std_.Double))) => (Regression msg) -> (m (Basics.List msg Std_.Double))
+get_Regression'beta (Regression'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 1 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_Regression'beta :: ((Untyped.RWCtx m s)
+                       ,(Classes.ToPtr s (Basics.List (Message.Mut s) Std_.Double))) => (Regression (Message.Mut s)) -> (Basics.List (Message.Mut s) Std_.Double) -> (m ())
+set_Regression'beta (Regression'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 1 struct)
+    )
+has_Regression'beta :: ((Untyped.ReadCtx m msg)) => (Regression msg) -> (m Std_.Bool)
+has_Regression'beta (Regression'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
+new_Regression'beta :: ((Untyped.RWCtx m s)) => Std_.Int -> (Regression (Message.Mut s)) -> (m (Basics.List (Message.Mut s) Std_.Double))
+new_Regression'beta len struct = (do
+    result <- (Classes.newList (Untyped.message struct) len)
+    (set_Regression'beta struct result)
+    (Std_.pure result)
+    )
+get_Regression'planes :: ((Untyped.ReadCtx m msg)
+                         ,(Classes.FromPtr msg (Basics.List msg (Aircraft msg)))) => (Regression msg) -> (m (Basics.List msg (Aircraft msg)))
+get_Regression'planes (Regression'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 2 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_Regression'planes :: ((Untyped.RWCtx m s)
+                         ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Aircraft (Message.Mut s))))) => (Regression (Message.Mut s)) -> (Basics.List (Message.Mut s) (Aircraft (Message.Mut s))) -> (m ())
+set_Regression'planes (Regression'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 2 struct)
+    )
+has_Regression'planes :: ((Untyped.ReadCtx m msg)) => (Regression msg) -> (m Std_.Bool)
+has_Regression'planes (Regression'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 2 struct))
+new_Regression'planes :: ((Untyped.RWCtx m s)) => Std_.Int -> (Regression (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Aircraft (Message.Mut s))))
+new_Regression'planes len struct = (do
+    result <- (Classes.newList (Untyped.message struct) len)
+    (set_Regression'planes struct result)
+    (Std_.pure result)
+    )
+get_Regression'ymu :: ((Untyped.ReadCtx m msg)) => (Regression msg) -> (m Std_.Double)
+get_Regression'ymu (Regression'newtype_ struct) = (GenHelpers.getWordField struct 1 0 0)
+set_Regression'ymu :: ((Untyped.RWCtx m s)) => (Regression (Message.Mut s)) -> Std_.Double -> (m ())
+set_Regression'ymu (Regression'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
+get_Regression'ysd :: ((Untyped.ReadCtx m msg)) => (Regression msg) -> (m Std_.Double)
+get_Regression'ysd (Regression'newtype_ struct) = (GenHelpers.getWordField struct 2 0 0)
+set_Regression'ysd :: ((Untyped.RWCtx m s)) => (Regression (Message.Mut s)) -> Std_.Double -> (m ())
+set_Regression'ysd (Regression'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 2 0 0)
+newtype Aircraft msg
+    = Aircraft'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Aircraft msg)) where
+    fromStruct struct = (Std_.pure (Aircraft'newtype_ struct))
+instance (Classes.ToStruct msg (Aircraft msg)) where
+    toStruct (Aircraft'newtype_ struct) = struct
+instance (Untyped.HasMessage (Aircraft mut) mut) where
+    message (Aircraft'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Aircraft mut) mut) where
+    messageDefault msg = (Aircraft'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Aircraft msg)) where
+    fromPtr msg ptr = (Aircraft'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Aircraft (Message.Mut s))) where
+    toPtr msg (Aircraft'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Aircraft (Message.Mut s))) where
+    new msg = (Aircraft'newtype_ <$> (Untyped.allocStruct msg 1 1))
+instance (Basics.ListElem mut (Aircraft mut)) where
+    newtype List mut (Aircraft mut)
+        = Aircraft'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Aircraft'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Aircraft'List_ l) = (Untyped.ListStruct l)
+    length (Aircraft'List_ l) = (Untyped.length l)
+    index i (Aircraft'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Aircraft (Message.Mut s))) where
+    setIndex (Aircraft'newtype_ elt) i (Aircraft'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Aircraft'List_ <$> (Untyped.allocCompositeList msg 1 1 len))
+data Aircraft' (mut :: Message.Mutability)
+    = Aircraft'void 
+    | Aircraft'b737 (B737 mut)
+    | Aircraft'a320 (A320 mut)
+    | Aircraft'f16 (F16 mut)
+    | Aircraft'unknown' Std_.Word16
+instance (Classes.FromStruct mut (Aircraft' mut)) where
+    fromStruct struct = (do
+        tag <- (GenHelpers.getTag struct 0)
+        case tag of
+            0 ->
+                (Std_.pure Aircraft'void)
+            1 ->
+                (Aircraft'b737 <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            2 ->
+                (Aircraft'a320 <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            3 ->
+                (Aircraft'f16 <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            _ ->
+                (Std_.pure (Aircraft'unknown' (Std_.fromIntegral tag)))
+        )
+get_Aircraft' :: ((Untyped.ReadCtx m msg)
+                 ,(Classes.FromStruct msg (Aircraft' msg))) => (Aircraft msg) -> (m (Aircraft' msg))
+get_Aircraft' (Aircraft'newtype_ struct) = (Classes.fromStruct struct)
+set_Aircraft'void :: ((Untyped.RWCtx m s)) => (Aircraft (Message.Mut s)) -> (m ())
+set_Aircraft'void (Aircraft'newtype_ struct) = (do
+    (GenHelpers.setWordField struct (0 :: Std_.Word16) 0 0 0)
+    (Std_.pure ())
+    )
+set_Aircraft'b737 :: ((Untyped.RWCtx m s)
+                     ,(Classes.ToPtr s (B737 (Message.Mut s)))) => (Aircraft (Message.Mut s)) -> (B737 (Message.Mut s)) -> (m ())
+set_Aircraft'b737 (Aircraft'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (1 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Aircraft'a320 :: ((Untyped.RWCtx m s)
+                     ,(Classes.ToPtr s (A320 (Message.Mut s)))) => (Aircraft (Message.Mut s)) -> (A320 (Message.Mut s)) -> (m ())
+set_Aircraft'a320 (Aircraft'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (2 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Aircraft'f16 :: ((Untyped.RWCtx m s)
+                    ,(Classes.ToPtr s (F16 (Message.Mut s)))) => (Aircraft (Message.Mut s)) -> (F16 (Message.Mut s)) -> (m ())
+set_Aircraft'f16 (Aircraft'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (3 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Aircraft'unknown' :: ((Untyped.RWCtx m s)) => (Aircraft (Message.Mut s)) -> Std_.Word16 -> (m ())
+set_Aircraft'unknown' (Aircraft'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
+newtype Z msg
+    = Z'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Z msg)) where
+    fromStruct struct = (Std_.pure (Z'newtype_ struct))
+instance (Classes.ToStruct msg (Z msg)) where
+    toStruct (Z'newtype_ struct) = struct
+instance (Untyped.HasMessage (Z mut) mut) where
+    message (Z'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Z mut) mut) where
+    messageDefault msg = (Z'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Z msg)) where
+    fromPtr msg ptr = (Z'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Z (Message.Mut s))) where
+    toPtr msg (Z'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Z (Message.Mut s))) where
+    new msg = (Z'newtype_ <$> (Untyped.allocStruct msg 3 1))
+instance (Basics.ListElem mut (Z mut)) where
+    newtype List mut (Z mut)
+        = Z'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Z'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Z'List_ l) = (Untyped.ListStruct l)
+    length (Z'List_ l) = (Untyped.length l)
+    index i (Z'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Z (Message.Mut s))) where
+    setIndex (Z'newtype_ elt) i (Z'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Z'List_ <$> (Untyped.allocCompositeList msg 3 1 len))
+data Z' (mut :: Message.Mutability)
+    = Z'void 
+    | Z'zz (Z mut)
+    | Z'f64 Std_.Double
+    | Z'f32 Std_.Float
+    | Z'i64 Std_.Int64
+    | Z'i32 Std_.Int32
+    | Z'i16 Std_.Int16
+    | Z'i8 Std_.Int8
+    | Z'u64 Std_.Word64
+    | Z'u32 Std_.Word32
+    | Z'u16 Std_.Word16
+    | Z'u8 Std_.Word8
+    | Z'bool Std_.Bool
+    | Z'text (Basics.Text mut)
+    | Z'blob (Basics.Data mut)
+    | Z'f64vec (Basics.List mut Std_.Double)
+    | Z'f32vec (Basics.List mut Std_.Float)
+    | Z'i64vec (Basics.List mut Std_.Int64)
+    | Z'i32vec (Basics.List mut Std_.Int32)
+    | Z'i16vec (Basics.List mut Std_.Int16)
+    | Z'i8vec (Basics.List mut Std_.Int8)
+    | Z'u64vec (Basics.List mut Std_.Word64)
+    | Z'u32vec (Basics.List mut Std_.Word32)
+    | Z'u16vec (Basics.List mut Std_.Word16)
+    | Z'u8vec (Basics.List mut Std_.Word8)
+    | Z'zvec (Basics.List mut (Z mut))
+    | Z'zvecvec (Basics.List mut (Basics.List mut (Z mut)))
+    | Z'zdate (Zdate mut)
+    | Z'zdata (Zdata mut)
+    | Z'aircraftvec (Basics.List mut (Aircraft mut))
+    | Z'aircraft (Aircraft mut)
+    | Z'regression (Regression mut)
+    | Z'planebase (PlaneBase mut)
+    | Z'airport Airport
+    | Z'b737 (B737 mut)
+    | Z'a320 (A320 mut)
+    | Z'f16 (F16 mut)
+    | Z'zdatevec (Basics.List mut (Zdate mut))
+    | Z'zdatavec (Basics.List mut (Zdata mut))
+    | Z'boolvec (Basics.List mut Std_.Bool)
+    | Z'datavec (Basics.List mut (Basics.Data mut))
+    | Z'textvec (Basics.List mut (Basics.Text mut))
+    | Z'grp (Z'grp mut)
+    | Z'echo (Echo mut)
+    | Z'echoBases (EchoBases mut)
+    | Z'unknown' Std_.Word16
+instance (Classes.FromStruct mut (Z' mut)) where
+    fromStruct struct = (do
+        tag <- (GenHelpers.getTag struct 0)
+        case tag of
+            0 ->
+                (Std_.pure Z'void)
+            1 ->
+                (Z'zz <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            2 ->
+                (Z'f64 <$> (GenHelpers.getWordField struct 1 0 0))
+            3 ->
+                (Z'f32 <$> (GenHelpers.getWordField struct 1 0 0))
+            4 ->
+                (Z'i64 <$> (GenHelpers.getWordField struct 1 0 0))
+            5 ->
+                (Z'i32 <$> (GenHelpers.getWordField struct 1 0 0))
+            6 ->
+                (Z'i16 <$> (GenHelpers.getWordField struct 1 0 0))
+            7 ->
+                (Z'i8 <$> (GenHelpers.getWordField struct 1 0 0))
+            8 ->
+                (Z'u64 <$> (GenHelpers.getWordField struct 1 0 0))
+            9 ->
+                (Z'u32 <$> (GenHelpers.getWordField struct 1 0 0))
+            10 ->
+                (Z'u16 <$> (GenHelpers.getWordField struct 1 0 0))
+            11 ->
+                (Z'u8 <$> (GenHelpers.getWordField struct 1 0 0))
+            12 ->
+                (Z'bool <$> (GenHelpers.getWordField struct 1 0 0))
+            13 ->
+                (Z'text <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            14 ->
+                (Z'blob <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            15 ->
+                (Z'f64vec <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            16 ->
+                (Z'f32vec <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            17 ->
+                (Z'i64vec <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            18 ->
+                (Z'i32vec <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            19 ->
+                (Z'i16vec <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            20 ->
+                (Z'i8vec <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            21 ->
+                (Z'u64vec <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            22 ->
+                (Z'u32vec <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            23 ->
+                (Z'u16vec <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            24 ->
+                (Z'u8vec <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            25 ->
+                (Z'zvec <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            26 ->
+                (Z'zvecvec <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            27 ->
+                (Z'zdate <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            28 ->
+                (Z'zdata <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            29 ->
+                (Z'aircraftvec <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            30 ->
+                (Z'aircraft <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            31 ->
+                (Z'regression <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            32 ->
+                (Z'planebase <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            33 ->
+                (Z'airport <$> (GenHelpers.getWordField struct 1 0 0))
+            34 ->
+                (Z'b737 <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            35 ->
+                (Z'a320 <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            36 ->
+                (Z'f16 <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            37 ->
+                (Z'zdatevec <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            38 ->
+                (Z'zdatavec <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            39 ->
+                (Z'boolvec <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            40 ->
+                (Z'datavec <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            41 ->
+                (Z'textvec <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            42 ->
+                (Z'grp <$> (Classes.fromStruct struct))
+            43 ->
+                (Z'echo <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            44 ->
+                (Z'echoBases <$> (do
+                    ptr <- (Untyped.getPtr 0 struct)
+                    (Classes.fromPtr (Untyped.message struct) ptr)
+                    ))
+            _ ->
+                (Std_.pure (Z'unknown' (Std_.fromIntegral tag)))
+        )
+get_Z' :: ((Untyped.ReadCtx m msg)
+          ,(Classes.FromStruct msg (Z' msg))) => (Z msg) -> (m (Z' msg))
+get_Z' (Z'newtype_ struct) = (Classes.fromStruct struct)
+set_Z'void :: ((Untyped.RWCtx m s)) => (Z (Message.Mut s)) -> (m ())
+set_Z'void (Z'newtype_ struct) = (do
+    (GenHelpers.setWordField struct (0 :: Std_.Word16) 0 0 0)
+    (Std_.pure ())
+    )
+set_Z'zz :: ((Untyped.RWCtx m s)
+            ,(Classes.ToPtr s (Z (Message.Mut s)))) => (Z (Message.Mut s)) -> (Z (Message.Mut s)) -> (m ())
+set_Z'zz (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (1 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'f64 :: ((Untyped.RWCtx m s)) => (Z (Message.Mut s)) -> Std_.Double -> (m ())
+set_Z'f64 (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (2 :: Std_.Word16) 0 0 0)
+    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
+    )
+set_Z'f32 :: ((Untyped.RWCtx m s)) => (Z (Message.Mut s)) -> Std_.Float -> (m ())
+set_Z'f32 (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (3 :: Std_.Word16) 0 0 0)
+    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 1 0 0)
+    )
+set_Z'i64 :: ((Untyped.RWCtx m s)) => (Z (Message.Mut s)) -> Std_.Int64 -> (m ())
+set_Z'i64 (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (4 :: Std_.Word16) 0 0 0)
+    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
+    )
+set_Z'i32 :: ((Untyped.RWCtx m s)) => (Z (Message.Mut s)) -> Std_.Int32 -> (m ())
+set_Z'i32 (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (5 :: Std_.Word16) 0 0 0)
+    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 1 0 0)
+    )
+set_Z'i16 :: ((Untyped.RWCtx m s)) => (Z (Message.Mut s)) -> Std_.Int16 -> (m ())
+set_Z'i16 (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (6 :: Std_.Word16) 0 0 0)
+    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 1 0 0)
+    )
+set_Z'i8 :: ((Untyped.RWCtx m s)) => (Z (Message.Mut s)) -> Std_.Int8 -> (m ())
+set_Z'i8 (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (7 :: Std_.Word16) 0 0 0)
+    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word8) 1 0 0)
+    )
+set_Z'u64 :: ((Untyped.RWCtx m s)) => (Z (Message.Mut s)) -> Std_.Word64 -> (m ())
+set_Z'u64 (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (8 :: Std_.Word16) 0 0 0)
+    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
+    )
+set_Z'u32 :: ((Untyped.RWCtx m s)) => (Z (Message.Mut s)) -> Std_.Word32 -> (m ())
+set_Z'u32 (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (9 :: Std_.Word16) 0 0 0)
+    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 1 0 0)
+    )
+set_Z'u16 :: ((Untyped.RWCtx m s)) => (Z (Message.Mut s)) -> Std_.Word16 -> (m ())
+set_Z'u16 (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (10 :: Std_.Word16) 0 0 0)
+    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 1 0 0)
+    )
+set_Z'u8 :: ((Untyped.RWCtx m s)) => (Z (Message.Mut s)) -> Std_.Word8 -> (m ())
+set_Z'u8 (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (11 :: Std_.Word16) 0 0 0)
+    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word8) 1 0 0)
+    )
+set_Z'bool :: ((Untyped.RWCtx m s)) => (Z (Message.Mut s)) -> Std_.Bool -> (m ())
+set_Z'bool (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (12 :: Std_.Word16) 0 0 0)
+    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 1 0 0)
+    )
+set_Z'text :: ((Untyped.RWCtx m s)
+              ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Z (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
+set_Z'text (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (13 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'blob :: ((Untyped.RWCtx m s)
+              ,(Classes.ToPtr s (Basics.Data (Message.Mut s)))) => (Z (Message.Mut s)) -> (Basics.Data (Message.Mut s)) -> (m ())
+set_Z'blob (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (14 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'f64vec :: ((Untyped.RWCtx m s)
+                ,(Classes.ToPtr s (Basics.List (Message.Mut s) Std_.Double))) => (Z (Message.Mut s)) -> (Basics.List (Message.Mut s) Std_.Double) -> (m ())
+set_Z'f64vec (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (15 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'f32vec :: ((Untyped.RWCtx m s)
+                ,(Classes.ToPtr s (Basics.List (Message.Mut s) Std_.Float))) => (Z (Message.Mut s)) -> (Basics.List (Message.Mut s) Std_.Float) -> (m ())
+set_Z'f32vec (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (16 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'i64vec :: ((Untyped.RWCtx m s)
+                ,(Classes.ToPtr s (Basics.List (Message.Mut s) Std_.Int64))) => (Z (Message.Mut s)) -> (Basics.List (Message.Mut s) Std_.Int64) -> (m ())
+set_Z'i64vec (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (17 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'i32vec :: ((Untyped.RWCtx m s)
+                ,(Classes.ToPtr s (Basics.List (Message.Mut s) Std_.Int32))) => (Z (Message.Mut s)) -> (Basics.List (Message.Mut s) Std_.Int32) -> (m ())
+set_Z'i32vec (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (18 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'i16vec :: ((Untyped.RWCtx m s)
+                ,(Classes.ToPtr s (Basics.List (Message.Mut s) Std_.Int16))) => (Z (Message.Mut s)) -> (Basics.List (Message.Mut s) Std_.Int16) -> (m ())
+set_Z'i16vec (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (19 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'i8vec :: ((Untyped.RWCtx m s)
+               ,(Classes.ToPtr s (Basics.List (Message.Mut s) Std_.Int8))) => (Z (Message.Mut s)) -> (Basics.List (Message.Mut s) Std_.Int8) -> (m ())
+set_Z'i8vec (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (20 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'u64vec :: ((Untyped.RWCtx m s)
+                ,(Classes.ToPtr s (Basics.List (Message.Mut s) Std_.Word64))) => (Z (Message.Mut s)) -> (Basics.List (Message.Mut s) Std_.Word64) -> (m ())
+set_Z'u64vec (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (21 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'u32vec :: ((Untyped.RWCtx m s)
+                ,(Classes.ToPtr s (Basics.List (Message.Mut s) Std_.Word32))) => (Z (Message.Mut s)) -> (Basics.List (Message.Mut s) Std_.Word32) -> (m ())
+set_Z'u32vec (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (22 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'u16vec :: ((Untyped.RWCtx m s)
+                ,(Classes.ToPtr s (Basics.List (Message.Mut s) Std_.Word16))) => (Z (Message.Mut s)) -> (Basics.List (Message.Mut s) Std_.Word16) -> (m ())
+set_Z'u16vec (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (23 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'u8vec :: ((Untyped.RWCtx m s)
+               ,(Classes.ToPtr s (Basics.List (Message.Mut s) Std_.Word8))) => (Z (Message.Mut s)) -> (Basics.List (Message.Mut s) Std_.Word8) -> (m ())
+set_Z'u8vec (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (24 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'zvec :: ((Untyped.RWCtx m s)
+              ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Z (Message.Mut s))))) => (Z (Message.Mut s)) -> (Basics.List (Message.Mut s) (Z (Message.Mut s))) -> (m ())
+set_Z'zvec (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (25 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'zvecvec :: ((Untyped.RWCtx m s)
+                 ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Basics.List (Message.Mut s) (Z (Message.Mut s)))))) => (Z (Message.Mut s)) -> (Basics.List (Message.Mut s) (Basics.List (Message.Mut s) (Z (Message.Mut s)))) -> (m ())
+set_Z'zvecvec (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (26 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'zdate :: ((Untyped.RWCtx m s)
+               ,(Classes.ToPtr s (Zdate (Message.Mut s)))) => (Z (Message.Mut s)) -> (Zdate (Message.Mut s)) -> (m ())
+set_Z'zdate (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (27 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'zdata :: ((Untyped.RWCtx m s)
+               ,(Classes.ToPtr s (Zdata (Message.Mut s)))) => (Z (Message.Mut s)) -> (Zdata (Message.Mut s)) -> (m ())
+set_Z'zdata (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (28 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'aircraftvec :: ((Untyped.RWCtx m s)
+                     ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Aircraft (Message.Mut s))))) => (Z (Message.Mut s)) -> (Basics.List (Message.Mut s) (Aircraft (Message.Mut s))) -> (m ())
+set_Z'aircraftvec (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (29 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'aircraft :: ((Untyped.RWCtx m s)
+                  ,(Classes.ToPtr s (Aircraft (Message.Mut s)))) => (Z (Message.Mut s)) -> (Aircraft (Message.Mut s)) -> (m ())
+set_Z'aircraft (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (30 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'regression :: ((Untyped.RWCtx m s)
+                    ,(Classes.ToPtr s (Regression (Message.Mut s)))) => (Z (Message.Mut s)) -> (Regression (Message.Mut s)) -> (m ())
+set_Z'regression (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (31 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'planebase :: ((Untyped.RWCtx m s)
+                   ,(Classes.ToPtr s (PlaneBase (Message.Mut s)))) => (Z (Message.Mut s)) -> (PlaneBase (Message.Mut s)) -> (m ())
+set_Z'planebase (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (32 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'airport :: ((Untyped.RWCtx m s)) => (Z (Message.Mut s)) -> Airport -> (m ())
+set_Z'airport (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (33 :: Std_.Word16) 0 0 0)
+    (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 1 0 0)
+    )
+set_Z'b737 :: ((Untyped.RWCtx m s)
+              ,(Classes.ToPtr s (B737 (Message.Mut s)))) => (Z (Message.Mut s)) -> (B737 (Message.Mut s)) -> (m ())
+set_Z'b737 (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (34 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'a320 :: ((Untyped.RWCtx m s)
+              ,(Classes.ToPtr s (A320 (Message.Mut s)))) => (Z (Message.Mut s)) -> (A320 (Message.Mut s)) -> (m ())
+set_Z'a320 (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (35 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'f16 :: ((Untyped.RWCtx m s)
+             ,(Classes.ToPtr s (F16 (Message.Mut s)))) => (Z (Message.Mut s)) -> (F16 (Message.Mut s)) -> (m ())
+set_Z'f16 (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (36 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'zdatevec :: ((Untyped.RWCtx m s)
+                  ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Zdate (Message.Mut s))))) => (Z (Message.Mut s)) -> (Basics.List (Message.Mut s) (Zdate (Message.Mut s))) -> (m ())
+set_Z'zdatevec (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (37 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'zdatavec :: ((Untyped.RWCtx m s)
+                  ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Zdata (Message.Mut s))))) => (Z (Message.Mut s)) -> (Basics.List (Message.Mut s) (Zdata (Message.Mut s))) -> (m ())
+set_Z'zdatavec (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (38 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'boolvec :: ((Untyped.RWCtx m s)
+                 ,(Classes.ToPtr s (Basics.List (Message.Mut s) Std_.Bool))) => (Z (Message.Mut s)) -> (Basics.List (Message.Mut s) Std_.Bool) -> (m ())
+set_Z'boolvec (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (39 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'datavec :: ((Untyped.RWCtx m s)
+                 ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Basics.Data (Message.Mut s))))) => (Z (Message.Mut s)) -> (Basics.List (Message.Mut s) (Basics.Data (Message.Mut s))) -> (m ())
+set_Z'datavec (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (40 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'textvec :: ((Untyped.RWCtx m s)
+                 ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Basics.Text (Message.Mut s))))) => (Z (Message.Mut s)) -> (Basics.List (Message.Mut s) (Basics.Text (Message.Mut s))) -> (m ())
+set_Z'textvec (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (41 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'grp :: ((Untyped.RWCtx m s)
+             ,(Classes.FromStruct (Message.Mut s) (Z'grp (Message.Mut s)))) => (Z (Message.Mut s)) -> (m (Z'grp (Message.Mut s)))
+set_Z'grp (Z'newtype_ struct) = (do
+    (GenHelpers.setWordField struct (42 :: Std_.Word16) 0 0 0)
+    (Classes.fromStruct struct)
+    )
+set_Z'echo :: ((Untyped.RWCtx m s)
+              ,(Classes.ToPtr s (Echo (Message.Mut s)))) => (Z (Message.Mut s)) -> (Echo (Message.Mut s)) -> (m ())
+set_Z'echo (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (43 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'echoBases :: ((Untyped.RWCtx m s)
+                   ,(Classes.ToPtr s (EchoBases (Message.Mut s)))) => (Z (Message.Mut s)) -> (EchoBases (Message.Mut s)) -> (m ())
+set_Z'echoBases (Z'newtype_ struct) value = (do
+    (GenHelpers.setWordField struct (44 :: Std_.Word16) 0 0 0)
+    (do
+        ptr <- (Classes.toPtr (Untyped.message struct) value)
+        (Untyped.setPtr ptr 0 struct)
+        )
+    )
+set_Z'unknown' :: ((Untyped.RWCtx m s)) => (Z (Message.Mut s)) -> Std_.Word16 -> (m ())
+set_Z'unknown' (Z'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
+newtype Z'grp msg
+    = Z'grp'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Z'grp msg)) where
+    fromStruct struct = (Std_.pure (Z'grp'newtype_ struct))
+instance (Classes.ToStruct msg (Z'grp msg)) where
+    toStruct (Z'grp'newtype_ struct) = struct
+instance (Untyped.HasMessage (Z'grp mut) mut) where
+    message (Z'grp'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Z'grp mut) mut) where
+    messageDefault msg = (Z'grp'newtype_ <$> (Untyped.messageDefault msg))
+get_Z'grp'first :: ((Untyped.ReadCtx m msg)) => (Z'grp msg) -> (m Std_.Word64)
+get_Z'grp'first (Z'grp'newtype_ struct) = (GenHelpers.getWordField struct 1 0 0)
+set_Z'grp'first :: ((Untyped.RWCtx m s)) => (Z'grp (Message.Mut s)) -> Std_.Word64 -> (m ())
+set_Z'grp'first (Z'grp'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
+get_Z'grp'second :: ((Untyped.ReadCtx m msg)) => (Z'grp msg) -> (m Std_.Word64)
+get_Z'grp'second (Z'grp'newtype_ struct) = (GenHelpers.getWordField struct 2 0 0)
+set_Z'grp'second :: ((Untyped.RWCtx m s)) => (Z'grp (Message.Mut s)) -> Std_.Word64 -> (m ())
+set_Z'grp'second (Z'grp'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 2 0 0)
+newtype Counter msg
+    = Counter'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Counter msg)) where
+    fromStruct struct = (Std_.pure (Counter'newtype_ struct))
+instance (Classes.ToStruct msg (Counter msg)) where
+    toStruct (Counter'newtype_ struct) = struct
+instance (Untyped.HasMessage (Counter mut) mut) where
+    message (Counter'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Counter mut) mut) where
+    messageDefault msg = (Counter'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Counter msg)) where
+    fromPtr msg ptr = (Counter'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Counter (Message.Mut s))) where
+    toPtr msg (Counter'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Counter (Message.Mut s))) where
+    new msg = (Counter'newtype_ <$> (Untyped.allocStruct msg 1 2))
+instance (Basics.ListElem mut (Counter mut)) where
+    newtype List mut (Counter mut)
+        = Counter'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Counter'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Counter'List_ l) = (Untyped.ListStruct l)
+    length (Counter'List_ l) = (Untyped.length l)
+    index i (Counter'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Counter (Message.Mut s))) where
+    setIndex (Counter'newtype_ elt) i (Counter'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Counter'List_ <$> (Untyped.allocCompositeList msg 1 2 len))
+get_Counter'size :: ((Untyped.ReadCtx m msg)) => (Counter msg) -> (m Std_.Int64)
+get_Counter'size (Counter'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
+set_Counter'size :: ((Untyped.RWCtx m s)) => (Counter (Message.Mut s)) -> Std_.Int64 -> (m ())
+set_Counter'size (Counter'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 0 0 0)
+get_Counter'words :: ((Untyped.ReadCtx m msg)
+                     ,(Classes.FromPtr msg (Basics.Text msg))) => (Counter msg) -> (m (Basics.Text msg))
+get_Counter'words (Counter'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_Counter'words :: ((Untyped.RWCtx m s)
+                     ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Counter (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
+set_Counter'words (Counter'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_Counter'words :: ((Untyped.ReadCtx m msg)) => (Counter msg) -> (m Std_.Bool)
+has_Counter'words (Counter'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_Counter'words :: ((Untyped.RWCtx m s)) => Std_.Int -> (Counter (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
+new_Counter'words len struct = (do
+    result <- (Basics.newText (Untyped.message struct) len)
+    (set_Counter'words struct result)
+    (Std_.pure result)
+    )
+get_Counter'wordlist :: ((Untyped.ReadCtx m msg)
+                        ,(Classes.FromPtr msg (Basics.List msg (Basics.Text msg)))) => (Counter msg) -> (m (Basics.List msg (Basics.Text msg)))
+get_Counter'wordlist (Counter'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 1 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_Counter'wordlist :: ((Untyped.RWCtx m s)
+                        ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Basics.Text (Message.Mut s))))) => (Counter (Message.Mut s)) -> (Basics.List (Message.Mut s) (Basics.Text (Message.Mut s))) -> (m ())
+set_Counter'wordlist (Counter'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 1 struct)
+    )
+has_Counter'wordlist :: ((Untyped.ReadCtx m msg)) => (Counter msg) -> (m Std_.Bool)
+has_Counter'wordlist (Counter'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
+new_Counter'wordlist :: ((Untyped.RWCtx m s)) => Std_.Int -> (Counter (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Basics.Text (Message.Mut s))))
+new_Counter'wordlist len struct = (do
+    result <- (Classes.newList (Untyped.message struct) len)
+    (set_Counter'wordlist struct result)
+    (Std_.pure result)
+    )
+newtype Bag msg
+    = Bag'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Bag msg)) where
+    fromStruct struct = (Std_.pure (Bag'newtype_ struct))
+instance (Classes.ToStruct msg (Bag msg)) where
+    toStruct (Bag'newtype_ struct) = struct
+instance (Untyped.HasMessage (Bag mut) mut) where
+    message (Bag'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Bag mut) mut) where
+    messageDefault msg = (Bag'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Bag msg)) where
+    fromPtr msg ptr = (Bag'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Bag (Message.Mut s))) where
+    toPtr msg (Bag'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Bag (Message.Mut s))) where
+    new msg = (Bag'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (Bag mut)) where
+    newtype List mut (Bag mut)
+        = Bag'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Bag'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Bag'List_ l) = (Untyped.ListStruct l)
+    length (Bag'List_ l) = (Untyped.length l)
+    index i (Bag'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Bag (Message.Mut s))) where
+    setIndex (Bag'newtype_ elt) i (Bag'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Bag'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_Bag'counter :: ((Untyped.ReadCtx m msg)
+                   ,(Classes.FromPtr msg (Counter msg))) => (Bag msg) -> (m (Counter msg))
+get_Bag'counter (Bag'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_Bag'counter :: ((Untyped.RWCtx m s)
+                   ,(Classes.ToPtr s (Counter (Message.Mut s)))) => (Bag (Message.Mut s)) -> (Counter (Message.Mut s)) -> (m ())
+set_Bag'counter (Bag'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_Bag'counter :: ((Untyped.ReadCtx m msg)) => (Bag msg) -> (m Std_.Bool)
+has_Bag'counter (Bag'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_Bag'counter :: ((Untyped.RWCtx m s)) => (Bag (Message.Mut s)) -> (m (Counter (Message.Mut s)))
+new_Bag'counter struct = (do
+    result <- (Classes.new (Untyped.message struct))
+    (set_Bag'counter struct result)
+    (Std_.pure result)
+    )
+newtype Zserver msg
+    = Zserver'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Zserver msg)) where
+    fromStruct struct = (Std_.pure (Zserver'newtype_ struct))
+instance (Classes.ToStruct msg (Zserver msg)) where
+    toStruct (Zserver'newtype_ struct) = struct
+instance (Untyped.HasMessage (Zserver mut) mut) where
+    message (Zserver'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Zserver mut) mut) where
+    messageDefault msg = (Zserver'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Zserver msg)) where
+    fromPtr msg ptr = (Zserver'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Zserver (Message.Mut s))) where
+    toPtr msg (Zserver'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Zserver (Message.Mut s))) where
+    new msg = (Zserver'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (Zserver mut)) where
+    newtype List mut (Zserver mut)
+        = Zserver'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Zserver'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Zserver'List_ l) = (Untyped.ListStruct l)
+    length (Zserver'List_ l) = (Untyped.length l)
+    index i (Zserver'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Zserver (Message.Mut s))) where
+    setIndex (Zserver'newtype_ elt) i (Zserver'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Zserver'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_Zserver'waitingjobs :: ((Untyped.ReadCtx m msg)
+                           ,(Classes.FromPtr msg (Basics.List msg (Zjob msg)))) => (Zserver msg) -> (m (Basics.List msg (Zjob msg)))
+get_Zserver'waitingjobs (Zserver'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_Zserver'waitingjobs :: ((Untyped.RWCtx m s)
+                           ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Zjob (Message.Mut s))))) => (Zserver (Message.Mut s)) -> (Basics.List (Message.Mut s) (Zjob (Message.Mut s))) -> (m ())
+set_Zserver'waitingjobs (Zserver'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_Zserver'waitingjobs :: ((Untyped.ReadCtx m msg)) => (Zserver msg) -> (m Std_.Bool)
+has_Zserver'waitingjobs (Zserver'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_Zserver'waitingjobs :: ((Untyped.RWCtx m s)) => Std_.Int -> (Zserver (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Zjob (Message.Mut s))))
+new_Zserver'waitingjobs len struct = (do
+    result <- (Classes.newList (Untyped.message struct) len)
+    (set_Zserver'waitingjobs struct result)
+    (Std_.pure result)
+    )
+newtype Zjob msg
+    = Zjob'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Zjob msg)) where
+    fromStruct struct = (Std_.pure (Zjob'newtype_ struct))
+instance (Classes.ToStruct msg (Zjob msg)) where
+    toStruct (Zjob'newtype_ struct) = struct
+instance (Untyped.HasMessage (Zjob mut) mut) where
+    message (Zjob'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Zjob mut) mut) where
+    messageDefault msg = (Zjob'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Zjob msg)) where
+    fromPtr msg ptr = (Zjob'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Zjob (Message.Mut s))) where
+    toPtr msg (Zjob'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Zjob (Message.Mut s))) where
+    new msg = (Zjob'newtype_ <$> (Untyped.allocStruct msg 0 2))
+instance (Basics.ListElem mut (Zjob mut)) where
+    newtype List mut (Zjob mut)
+        = Zjob'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Zjob'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Zjob'List_ l) = (Untyped.ListStruct l)
+    length (Zjob'List_ l) = (Untyped.length l)
+    index i (Zjob'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Zjob (Message.Mut s))) where
+    setIndex (Zjob'newtype_ elt) i (Zjob'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Zjob'List_ <$> (Untyped.allocCompositeList msg 0 2 len))
+get_Zjob'cmd :: ((Untyped.ReadCtx m msg)
+                ,(Classes.FromPtr msg (Basics.Text msg))) => (Zjob msg) -> (m (Basics.Text msg))
+get_Zjob'cmd (Zjob'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_Zjob'cmd :: ((Untyped.RWCtx m s)
+                ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Zjob (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
+set_Zjob'cmd (Zjob'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_Zjob'cmd :: ((Untyped.ReadCtx m msg)) => (Zjob msg) -> (m Std_.Bool)
+has_Zjob'cmd (Zjob'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_Zjob'cmd :: ((Untyped.RWCtx m s)) => Std_.Int -> (Zjob (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
+new_Zjob'cmd len struct = (do
+    result <- (Basics.newText (Untyped.message struct) len)
+    (set_Zjob'cmd struct result)
+    (Std_.pure result)
+    )
+get_Zjob'args :: ((Untyped.ReadCtx m msg)
+                 ,(Classes.FromPtr msg (Basics.List msg (Basics.Text msg)))) => (Zjob msg) -> (m (Basics.List msg (Basics.Text msg)))
+get_Zjob'args (Zjob'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 1 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_Zjob'args :: ((Untyped.RWCtx m s)
+                 ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Basics.Text (Message.Mut s))))) => (Zjob (Message.Mut s)) -> (Basics.List (Message.Mut s) (Basics.Text (Message.Mut s))) -> (m ())
+set_Zjob'args (Zjob'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 1 struct)
+    )
+has_Zjob'args :: ((Untyped.ReadCtx m msg)) => (Zjob msg) -> (m Std_.Bool)
+has_Zjob'args (Zjob'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
+new_Zjob'args :: ((Untyped.RWCtx m s)) => Std_.Int -> (Zjob (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Basics.Text (Message.Mut s))))
+new_Zjob'args len struct = (do
+    result <- (Classes.newList (Untyped.message struct) len)
+    (set_Zjob'args struct result)
+    (Std_.pure result)
+    )
+newtype VerEmpty msg
+    = VerEmpty'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (VerEmpty msg)) where
+    fromStruct struct = (Std_.pure (VerEmpty'newtype_ struct))
+instance (Classes.ToStruct msg (VerEmpty msg)) where
+    toStruct (VerEmpty'newtype_ struct) = struct
+instance (Untyped.HasMessage (VerEmpty mut) mut) where
+    message (VerEmpty'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (VerEmpty mut) mut) where
+    messageDefault msg = (VerEmpty'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (VerEmpty msg)) where
+    fromPtr msg ptr = (VerEmpty'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (VerEmpty (Message.Mut s))) where
+    toPtr msg (VerEmpty'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (VerEmpty (Message.Mut s))) where
+    new msg = (VerEmpty'newtype_ <$> (Untyped.allocStruct msg 0 0))
+instance (Basics.ListElem mut (VerEmpty mut)) where
+    newtype List mut (VerEmpty mut)
+        = VerEmpty'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (VerEmpty'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (VerEmpty'List_ l) = (Untyped.ListStruct l)
+    length (VerEmpty'List_ l) = (Untyped.length l)
+    index i (VerEmpty'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (VerEmpty (Message.Mut s))) where
+    setIndex (VerEmpty'newtype_ elt) i (VerEmpty'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (VerEmpty'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
+newtype VerOneData msg
+    = VerOneData'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (VerOneData msg)) where
+    fromStruct struct = (Std_.pure (VerOneData'newtype_ struct))
+instance (Classes.ToStruct msg (VerOneData msg)) where
+    toStruct (VerOneData'newtype_ struct) = struct
+instance (Untyped.HasMessage (VerOneData mut) mut) where
+    message (VerOneData'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (VerOneData mut) mut) where
+    messageDefault msg = (VerOneData'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (VerOneData msg)) where
+    fromPtr msg ptr = (VerOneData'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (VerOneData (Message.Mut s))) where
+    toPtr msg (VerOneData'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (VerOneData (Message.Mut s))) where
+    new msg = (VerOneData'newtype_ <$> (Untyped.allocStruct msg 1 0))
+instance (Basics.ListElem mut (VerOneData mut)) where
+    newtype List mut (VerOneData mut)
+        = VerOneData'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (VerOneData'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (VerOneData'List_ l) = (Untyped.ListStruct l)
+    length (VerOneData'List_ l) = (Untyped.length l)
+    index i (VerOneData'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (VerOneData (Message.Mut s))) where
+    setIndex (VerOneData'newtype_ elt) i (VerOneData'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (VerOneData'List_ <$> (Untyped.allocCompositeList msg 1 0 len))
+get_VerOneData'val :: ((Untyped.ReadCtx m msg)) => (VerOneData msg) -> (m Std_.Int16)
+get_VerOneData'val (VerOneData'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
+set_VerOneData'val :: ((Untyped.RWCtx m s)) => (VerOneData (Message.Mut s)) -> Std_.Int16 -> (m ())
+set_VerOneData'val (VerOneData'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
+newtype VerTwoData msg
+    = VerTwoData'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (VerTwoData msg)) where
+    fromStruct struct = (Std_.pure (VerTwoData'newtype_ struct))
+instance (Classes.ToStruct msg (VerTwoData msg)) where
+    toStruct (VerTwoData'newtype_ struct) = struct
+instance (Untyped.HasMessage (VerTwoData mut) mut) where
+    message (VerTwoData'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (VerTwoData mut) mut) where
+    messageDefault msg = (VerTwoData'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (VerTwoData msg)) where
+    fromPtr msg ptr = (VerTwoData'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (VerTwoData (Message.Mut s))) where
+    toPtr msg (VerTwoData'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (VerTwoData (Message.Mut s))) where
+    new msg = (VerTwoData'newtype_ <$> (Untyped.allocStruct msg 2 0))
+instance (Basics.ListElem mut (VerTwoData mut)) where
+    newtype List mut (VerTwoData mut)
+        = VerTwoData'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (VerTwoData'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (VerTwoData'List_ l) = (Untyped.ListStruct l)
+    length (VerTwoData'List_ l) = (Untyped.length l)
+    index i (VerTwoData'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (VerTwoData (Message.Mut s))) where
+    setIndex (VerTwoData'newtype_ elt) i (VerTwoData'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (VerTwoData'List_ <$> (Untyped.allocCompositeList msg 2 0 len))
+get_VerTwoData'val :: ((Untyped.ReadCtx m msg)) => (VerTwoData msg) -> (m Std_.Int16)
+get_VerTwoData'val (VerTwoData'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
+set_VerTwoData'val :: ((Untyped.RWCtx m s)) => (VerTwoData (Message.Mut s)) -> Std_.Int16 -> (m ())
+set_VerTwoData'val (VerTwoData'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
+get_VerTwoData'duo :: ((Untyped.ReadCtx m msg)) => (VerTwoData msg) -> (m Std_.Int64)
+get_VerTwoData'duo (VerTwoData'newtype_ struct) = (GenHelpers.getWordField struct 1 0 0)
+set_VerTwoData'duo :: ((Untyped.RWCtx m s)) => (VerTwoData (Message.Mut s)) -> Std_.Int64 -> (m ())
+set_VerTwoData'duo (VerTwoData'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
+newtype VerOnePtr msg
+    = VerOnePtr'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (VerOnePtr msg)) where
+    fromStruct struct = (Std_.pure (VerOnePtr'newtype_ struct))
+instance (Classes.ToStruct msg (VerOnePtr msg)) where
+    toStruct (VerOnePtr'newtype_ struct) = struct
+instance (Untyped.HasMessage (VerOnePtr mut) mut) where
+    message (VerOnePtr'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (VerOnePtr mut) mut) where
+    messageDefault msg = (VerOnePtr'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (VerOnePtr msg)) where
+    fromPtr msg ptr = (VerOnePtr'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (VerOnePtr (Message.Mut s))) where
+    toPtr msg (VerOnePtr'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (VerOnePtr (Message.Mut s))) where
+    new msg = (VerOnePtr'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (VerOnePtr mut)) where
+    newtype List mut (VerOnePtr mut)
+        = VerOnePtr'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (VerOnePtr'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (VerOnePtr'List_ l) = (Untyped.ListStruct l)
+    length (VerOnePtr'List_ l) = (Untyped.length l)
+    index i (VerOnePtr'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (VerOnePtr (Message.Mut s))) where
+    setIndex (VerOnePtr'newtype_ elt) i (VerOnePtr'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (VerOnePtr'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_VerOnePtr'ptr :: ((Untyped.ReadCtx m msg)
+                     ,(Classes.FromPtr msg (VerOneData msg))) => (VerOnePtr msg) -> (m (VerOneData msg))
+get_VerOnePtr'ptr (VerOnePtr'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_VerOnePtr'ptr :: ((Untyped.RWCtx m s)
+                     ,(Classes.ToPtr s (VerOneData (Message.Mut s)))) => (VerOnePtr (Message.Mut s)) -> (VerOneData (Message.Mut s)) -> (m ())
+set_VerOnePtr'ptr (VerOnePtr'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_VerOnePtr'ptr :: ((Untyped.ReadCtx m msg)) => (VerOnePtr msg) -> (m Std_.Bool)
+has_VerOnePtr'ptr (VerOnePtr'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_VerOnePtr'ptr :: ((Untyped.RWCtx m s)) => (VerOnePtr (Message.Mut s)) -> (m (VerOneData (Message.Mut s)))
+new_VerOnePtr'ptr struct = (do
+    result <- (Classes.new (Untyped.message struct))
+    (set_VerOnePtr'ptr struct result)
+    (Std_.pure result)
+    )
+newtype VerTwoPtr msg
+    = VerTwoPtr'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (VerTwoPtr msg)) where
+    fromStruct struct = (Std_.pure (VerTwoPtr'newtype_ struct))
+instance (Classes.ToStruct msg (VerTwoPtr msg)) where
+    toStruct (VerTwoPtr'newtype_ struct) = struct
+instance (Untyped.HasMessage (VerTwoPtr mut) mut) where
+    message (VerTwoPtr'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (VerTwoPtr mut) mut) where
+    messageDefault msg = (VerTwoPtr'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (VerTwoPtr msg)) where
+    fromPtr msg ptr = (VerTwoPtr'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (VerTwoPtr (Message.Mut s))) where
+    toPtr msg (VerTwoPtr'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (VerTwoPtr (Message.Mut s))) where
+    new msg = (VerTwoPtr'newtype_ <$> (Untyped.allocStruct msg 0 2))
+instance (Basics.ListElem mut (VerTwoPtr mut)) where
+    newtype List mut (VerTwoPtr mut)
+        = VerTwoPtr'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (VerTwoPtr'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (VerTwoPtr'List_ l) = (Untyped.ListStruct l)
+    length (VerTwoPtr'List_ l) = (Untyped.length l)
+    index i (VerTwoPtr'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (VerTwoPtr (Message.Mut s))) where
+    setIndex (VerTwoPtr'newtype_ elt) i (VerTwoPtr'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (VerTwoPtr'List_ <$> (Untyped.allocCompositeList msg 0 2 len))
+get_VerTwoPtr'ptr1 :: ((Untyped.ReadCtx m msg)
+                      ,(Classes.FromPtr msg (VerOneData msg))) => (VerTwoPtr msg) -> (m (VerOneData msg))
+get_VerTwoPtr'ptr1 (VerTwoPtr'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_VerTwoPtr'ptr1 :: ((Untyped.RWCtx m s)
+                      ,(Classes.ToPtr s (VerOneData (Message.Mut s)))) => (VerTwoPtr (Message.Mut s)) -> (VerOneData (Message.Mut s)) -> (m ())
+set_VerTwoPtr'ptr1 (VerTwoPtr'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_VerTwoPtr'ptr1 :: ((Untyped.ReadCtx m msg)) => (VerTwoPtr msg) -> (m Std_.Bool)
+has_VerTwoPtr'ptr1 (VerTwoPtr'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_VerTwoPtr'ptr1 :: ((Untyped.RWCtx m s)) => (VerTwoPtr (Message.Mut s)) -> (m (VerOneData (Message.Mut s)))
+new_VerTwoPtr'ptr1 struct = (do
+    result <- (Classes.new (Untyped.message struct))
+    (set_VerTwoPtr'ptr1 struct result)
+    (Std_.pure result)
+    )
+get_VerTwoPtr'ptr2 :: ((Untyped.ReadCtx m msg)
+                      ,(Classes.FromPtr msg (VerOneData msg))) => (VerTwoPtr msg) -> (m (VerOneData msg))
+get_VerTwoPtr'ptr2 (VerTwoPtr'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 1 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_VerTwoPtr'ptr2 :: ((Untyped.RWCtx m s)
+                      ,(Classes.ToPtr s (VerOneData (Message.Mut s)))) => (VerTwoPtr (Message.Mut s)) -> (VerOneData (Message.Mut s)) -> (m ())
+set_VerTwoPtr'ptr2 (VerTwoPtr'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 1 struct)
+    )
+has_VerTwoPtr'ptr2 :: ((Untyped.ReadCtx m msg)) => (VerTwoPtr msg) -> (m Std_.Bool)
+has_VerTwoPtr'ptr2 (VerTwoPtr'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
+new_VerTwoPtr'ptr2 :: ((Untyped.RWCtx m s)) => (VerTwoPtr (Message.Mut s)) -> (m (VerOneData (Message.Mut s)))
+new_VerTwoPtr'ptr2 struct = (do
+    result <- (Classes.new (Untyped.message struct))
+    (set_VerTwoPtr'ptr2 struct result)
+    (Std_.pure result)
+    )
+newtype VerTwoDataTwoPtr msg
+    = VerTwoDataTwoPtr'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (VerTwoDataTwoPtr msg)) where
+    fromStruct struct = (Std_.pure (VerTwoDataTwoPtr'newtype_ struct))
+instance (Classes.ToStruct msg (VerTwoDataTwoPtr msg)) where
+    toStruct (VerTwoDataTwoPtr'newtype_ struct) = struct
+instance (Untyped.HasMessage (VerTwoDataTwoPtr mut) mut) where
+    message (VerTwoDataTwoPtr'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (VerTwoDataTwoPtr mut) mut) where
+    messageDefault msg = (VerTwoDataTwoPtr'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (VerTwoDataTwoPtr msg)) where
+    fromPtr msg ptr = (VerTwoDataTwoPtr'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (VerTwoDataTwoPtr (Message.Mut s))) where
+    toPtr msg (VerTwoDataTwoPtr'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (VerTwoDataTwoPtr (Message.Mut s))) where
+    new msg = (VerTwoDataTwoPtr'newtype_ <$> (Untyped.allocStruct msg 2 2))
+instance (Basics.ListElem mut (VerTwoDataTwoPtr mut)) where
+    newtype List mut (VerTwoDataTwoPtr mut)
+        = VerTwoDataTwoPtr'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (VerTwoDataTwoPtr'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (VerTwoDataTwoPtr'List_ l) = (Untyped.ListStruct l)
+    length (VerTwoDataTwoPtr'List_ l) = (Untyped.length l)
+    index i (VerTwoDataTwoPtr'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (VerTwoDataTwoPtr (Message.Mut s))) where
+    setIndex (VerTwoDataTwoPtr'newtype_ elt) i (VerTwoDataTwoPtr'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (VerTwoDataTwoPtr'List_ <$> (Untyped.allocCompositeList msg 2 2 len))
+get_VerTwoDataTwoPtr'val :: ((Untyped.ReadCtx m msg)) => (VerTwoDataTwoPtr msg) -> (m Std_.Int16)
+get_VerTwoDataTwoPtr'val (VerTwoDataTwoPtr'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
+set_VerTwoDataTwoPtr'val :: ((Untyped.RWCtx m s)) => (VerTwoDataTwoPtr (Message.Mut s)) -> Std_.Int16 -> (m ())
+set_VerTwoDataTwoPtr'val (VerTwoDataTwoPtr'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
+get_VerTwoDataTwoPtr'duo :: ((Untyped.ReadCtx m msg)) => (VerTwoDataTwoPtr msg) -> (m Std_.Int64)
+get_VerTwoDataTwoPtr'duo (VerTwoDataTwoPtr'newtype_ struct) = (GenHelpers.getWordField struct 1 0 0)
+set_VerTwoDataTwoPtr'duo :: ((Untyped.RWCtx m s)) => (VerTwoDataTwoPtr (Message.Mut s)) -> Std_.Int64 -> (m ())
+set_VerTwoDataTwoPtr'duo (VerTwoDataTwoPtr'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
+get_VerTwoDataTwoPtr'ptr1 :: ((Untyped.ReadCtx m msg)
+                             ,(Classes.FromPtr msg (VerOneData msg))) => (VerTwoDataTwoPtr msg) -> (m (VerOneData msg))
+get_VerTwoDataTwoPtr'ptr1 (VerTwoDataTwoPtr'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_VerTwoDataTwoPtr'ptr1 :: ((Untyped.RWCtx m s)
+                             ,(Classes.ToPtr s (VerOneData (Message.Mut s)))) => (VerTwoDataTwoPtr (Message.Mut s)) -> (VerOneData (Message.Mut s)) -> (m ())
+set_VerTwoDataTwoPtr'ptr1 (VerTwoDataTwoPtr'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_VerTwoDataTwoPtr'ptr1 :: ((Untyped.ReadCtx m msg)) => (VerTwoDataTwoPtr msg) -> (m Std_.Bool)
+has_VerTwoDataTwoPtr'ptr1 (VerTwoDataTwoPtr'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_VerTwoDataTwoPtr'ptr1 :: ((Untyped.RWCtx m s)) => (VerTwoDataTwoPtr (Message.Mut s)) -> (m (VerOneData (Message.Mut s)))
+new_VerTwoDataTwoPtr'ptr1 struct = (do
+    result <- (Classes.new (Untyped.message struct))
+    (set_VerTwoDataTwoPtr'ptr1 struct result)
+    (Std_.pure result)
+    )
+get_VerTwoDataTwoPtr'ptr2 :: ((Untyped.ReadCtx m msg)
+                             ,(Classes.FromPtr msg (VerOneData msg))) => (VerTwoDataTwoPtr msg) -> (m (VerOneData msg))
+get_VerTwoDataTwoPtr'ptr2 (VerTwoDataTwoPtr'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 1 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_VerTwoDataTwoPtr'ptr2 :: ((Untyped.RWCtx m s)
+                             ,(Classes.ToPtr s (VerOneData (Message.Mut s)))) => (VerTwoDataTwoPtr (Message.Mut s)) -> (VerOneData (Message.Mut s)) -> (m ())
+set_VerTwoDataTwoPtr'ptr2 (VerTwoDataTwoPtr'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 1 struct)
+    )
+has_VerTwoDataTwoPtr'ptr2 :: ((Untyped.ReadCtx m msg)) => (VerTwoDataTwoPtr msg) -> (m Std_.Bool)
+has_VerTwoDataTwoPtr'ptr2 (VerTwoDataTwoPtr'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
+new_VerTwoDataTwoPtr'ptr2 :: ((Untyped.RWCtx m s)) => (VerTwoDataTwoPtr (Message.Mut s)) -> (m (VerOneData (Message.Mut s)))
+new_VerTwoDataTwoPtr'ptr2 struct = (do
+    result <- (Classes.new (Untyped.message struct))
+    (set_VerTwoDataTwoPtr'ptr2 struct result)
+    (Std_.pure result)
+    )
+newtype HoldsVerEmptyList msg
+    = HoldsVerEmptyList'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (HoldsVerEmptyList msg)) where
+    fromStruct struct = (Std_.pure (HoldsVerEmptyList'newtype_ struct))
+instance (Classes.ToStruct msg (HoldsVerEmptyList msg)) where
+    toStruct (HoldsVerEmptyList'newtype_ struct) = struct
+instance (Untyped.HasMessage (HoldsVerEmptyList mut) mut) where
+    message (HoldsVerEmptyList'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (HoldsVerEmptyList mut) mut) where
+    messageDefault msg = (HoldsVerEmptyList'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (HoldsVerEmptyList msg)) where
+    fromPtr msg ptr = (HoldsVerEmptyList'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (HoldsVerEmptyList (Message.Mut s))) where
+    toPtr msg (HoldsVerEmptyList'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (HoldsVerEmptyList (Message.Mut s))) where
+    new msg = (HoldsVerEmptyList'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (HoldsVerEmptyList mut)) where
+    newtype List mut (HoldsVerEmptyList mut)
+        = HoldsVerEmptyList'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (HoldsVerEmptyList'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (HoldsVerEmptyList'List_ l) = (Untyped.ListStruct l)
+    length (HoldsVerEmptyList'List_ l) = (Untyped.length l)
+    index i (HoldsVerEmptyList'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (HoldsVerEmptyList (Message.Mut s))) where
+    setIndex (HoldsVerEmptyList'newtype_ elt) i (HoldsVerEmptyList'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (HoldsVerEmptyList'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_HoldsVerEmptyList'mylist :: ((Untyped.ReadCtx m msg)
+                                ,(Classes.FromPtr msg (Basics.List msg (VerEmpty msg)))) => (HoldsVerEmptyList msg) -> (m (Basics.List msg (VerEmpty msg)))
+get_HoldsVerEmptyList'mylist (HoldsVerEmptyList'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_HoldsVerEmptyList'mylist :: ((Untyped.RWCtx m s)
+                                ,(Classes.ToPtr s (Basics.List (Message.Mut s) (VerEmpty (Message.Mut s))))) => (HoldsVerEmptyList (Message.Mut s)) -> (Basics.List (Message.Mut s) (VerEmpty (Message.Mut s))) -> (m ())
+set_HoldsVerEmptyList'mylist (HoldsVerEmptyList'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_HoldsVerEmptyList'mylist :: ((Untyped.ReadCtx m msg)) => (HoldsVerEmptyList msg) -> (m Std_.Bool)
+has_HoldsVerEmptyList'mylist (HoldsVerEmptyList'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_HoldsVerEmptyList'mylist :: ((Untyped.RWCtx m s)) => Std_.Int -> (HoldsVerEmptyList (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (VerEmpty (Message.Mut s))))
+new_HoldsVerEmptyList'mylist len struct = (do
+    result <- (Classes.newList (Untyped.message struct) len)
+    (set_HoldsVerEmptyList'mylist struct result)
+    (Std_.pure result)
+    )
+newtype HoldsVerOneDataList msg
+    = HoldsVerOneDataList'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (HoldsVerOneDataList msg)) where
+    fromStruct struct = (Std_.pure (HoldsVerOneDataList'newtype_ struct))
+instance (Classes.ToStruct msg (HoldsVerOneDataList msg)) where
+    toStruct (HoldsVerOneDataList'newtype_ struct) = struct
+instance (Untyped.HasMessage (HoldsVerOneDataList mut) mut) where
+    message (HoldsVerOneDataList'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (HoldsVerOneDataList mut) mut) where
+    messageDefault msg = (HoldsVerOneDataList'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (HoldsVerOneDataList msg)) where
+    fromPtr msg ptr = (HoldsVerOneDataList'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (HoldsVerOneDataList (Message.Mut s))) where
+    toPtr msg (HoldsVerOneDataList'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (HoldsVerOneDataList (Message.Mut s))) where
+    new msg = (HoldsVerOneDataList'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (HoldsVerOneDataList mut)) where
+    newtype List mut (HoldsVerOneDataList mut)
+        = HoldsVerOneDataList'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (HoldsVerOneDataList'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (HoldsVerOneDataList'List_ l) = (Untyped.ListStruct l)
+    length (HoldsVerOneDataList'List_ l) = (Untyped.length l)
+    index i (HoldsVerOneDataList'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (HoldsVerOneDataList (Message.Mut s))) where
+    setIndex (HoldsVerOneDataList'newtype_ elt) i (HoldsVerOneDataList'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (HoldsVerOneDataList'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_HoldsVerOneDataList'mylist :: ((Untyped.ReadCtx m msg)
+                                  ,(Classes.FromPtr msg (Basics.List msg (VerOneData msg)))) => (HoldsVerOneDataList msg) -> (m (Basics.List msg (VerOneData msg)))
+get_HoldsVerOneDataList'mylist (HoldsVerOneDataList'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_HoldsVerOneDataList'mylist :: ((Untyped.RWCtx m s)
+                                  ,(Classes.ToPtr s (Basics.List (Message.Mut s) (VerOneData (Message.Mut s))))) => (HoldsVerOneDataList (Message.Mut s)) -> (Basics.List (Message.Mut s) (VerOneData (Message.Mut s))) -> (m ())
+set_HoldsVerOneDataList'mylist (HoldsVerOneDataList'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_HoldsVerOneDataList'mylist :: ((Untyped.ReadCtx m msg)) => (HoldsVerOneDataList msg) -> (m Std_.Bool)
+has_HoldsVerOneDataList'mylist (HoldsVerOneDataList'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_HoldsVerOneDataList'mylist :: ((Untyped.RWCtx m s)) => Std_.Int -> (HoldsVerOneDataList (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (VerOneData (Message.Mut s))))
+new_HoldsVerOneDataList'mylist len struct = (do
+    result <- (Classes.newList (Untyped.message struct) len)
+    (set_HoldsVerOneDataList'mylist struct result)
+    (Std_.pure result)
+    )
+newtype HoldsVerTwoDataList msg
+    = HoldsVerTwoDataList'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (HoldsVerTwoDataList msg)) where
+    fromStruct struct = (Std_.pure (HoldsVerTwoDataList'newtype_ struct))
+instance (Classes.ToStruct msg (HoldsVerTwoDataList msg)) where
+    toStruct (HoldsVerTwoDataList'newtype_ struct) = struct
+instance (Untyped.HasMessage (HoldsVerTwoDataList mut) mut) where
+    message (HoldsVerTwoDataList'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (HoldsVerTwoDataList mut) mut) where
+    messageDefault msg = (HoldsVerTwoDataList'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (HoldsVerTwoDataList msg)) where
+    fromPtr msg ptr = (HoldsVerTwoDataList'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (HoldsVerTwoDataList (Message.Mut s))) where
+    toPtr msg (HoldsVerTwoDataList'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (HoldsVerTwoDataList (Message.Mut s))) where
+    new msg = (HoldsVerTwoDataList'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (HoldsVerTwoDataList mut)) where
+    newtype List mut (HoldsVerTwoDataList mut)
+        = HoldsVerTwoDataList'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (HoldsVerTwoDataList'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (HoldsVerTwoDataList'List_ l) = (Untyped.ListStruct l)
+    length (HoldsVerTwoDataList'List_ l) = (Untyped.length l)
+    index i (HoldsVerTwoDataList'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (HoldsVerTwoDataList (Message.Mut s))) where
+    setIndex (HoldsVerTwoDataList'newtype_ elt) i (HoldsVerTwoDataList'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (HoldsVerTwoDataList'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_HoldsVerTwoDataList'mylist :: ((Untyped.ReadCtx m msg)
+                                  ,(Classes.FromPtr msg (Basics.List msg (VerTwoData msg)))) => (HoldsVerTwoDataList msg) -> (m (Basics.List msg (VerTwoData msg)))
+get_HoldsVerTwoDataList'mylist (HoldsVerTwoDataList'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_HoldsVerTwoDataList'mylist :: ((Untyped.RWCtx m s)
+                                  ,(Classes.ToPtr s (Basics.List (Message.Mut s) (VerTwoData (Message.Mut s))))) => (HoldsVerTwoDataList (Message.Mut s)) -> (Basics.List (Message.Mut s) (VerTwoData (Message.Mut s))) -> (m ())
+set_HoldsVerTwoDataList'mylist (HoldsVerTwoDataList'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_HoldsVerTwoDataList'mylist :: ((Untyped.ReadCtx m msg)) => (HoldsVerTwoDataList msg) -> (m Std_.Bool)
+has_HoldsVerTwoDataList'mylist (HoldsVerTwoDataList'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_HoldsVerTwoDataList'mylist :: ((Untyped.RWCtx m s)) => Std_.Int -> (HoldsVerTwoDataList (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (VerTwoData (Message.Mut s))))
+new_HoldsVerTwoDataList'mylist len struct = (do
+    result <- (Classes.newList (Untyped.message struct) len)
+    (set_HoldsVerTwoDataList'mylist struct result)
+    (Std_.pure result)
+    )
+newtype HoldsVerOnePtrList msg
+    = HoldsVerOnePtrList'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (HoldsVerOnePtrList msg)) where
+    fromStruct struct = (Std_.pure (HoldsVerOnePtrList'newtype_ struct))
+instance (Classes.ToStruct msg (HoldsVerOnePtrList msg)) where
+    toStruct (HoldsVerOnePtrList'newtype_ struct) = struct
+instance (Untyped.HasMessage (HoldsVerOnePtrList mut) mut) where
+    message (HoldsVerOnePtrList'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (HoldsVerOnePtrList mut) mut) where
+    messageDefault msg = (HoldsVerOnePtrList'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (HoldsVerOnePtrList msg)) where
+    fromPtr msg ptr = (HoldsVerOnePtrList'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (HoldsVerOnePtrList (Message.Mut s))) where
+    toPtr msg (HoldsVerOnePtrList'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (HoldsVerOnePtrList (Message.Mut s))) where
+    new msg = (HoldsVerOnePtrList'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (HoldsVerOnePtrList mut)) where
+    newtype List mut (HoldsVerOnePtrList mut)
+        = HoldsVerOnePtrList'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (HoldsVerOnePtrList'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (HoldsVerOnePtrList'List_ l) = (Untyped.ListStruct l)
+    length (HoldsVerOnePtrList'List_ l) = (Untyped.length l)
+    index i (HoldsVerOnePtrList'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (HoldsVerOnePtrList (Message.Mut s))) where
+    setIndex (HoldsVerOnePtrList'newtype_ elt) i (HoldsVerOnePtrList'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (HoldsVerOnePtrList'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_HoldsVerOnePtrList'mylist :: ((Untyped.ReadCtx m msg)
+                                 ,(Classes.FromPtr msg (Basics.List msg (VerOnePtr msg)))) => (HoldsVerOnePtrList msg) -> (m (Basics.List msg (VerOnePtr msg)))
+get_HoldsVerOnePtrList'mylist (HoldsVerOnePtrList'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_HoldsVerOnePtrList'mylist :: ((Untyped.RWCtx m s)
+                                 ,(Classes.ToPtr s (Basics.List (Message.Mut s) (VerOnePtr (Message.Mut s))))) => (HoldsVerOnePtrList (Message.Mut s)) -> (Basics.List (Message.Mut s) (VerOnePtr (Message.Mut s))) -> (m ())
+set_HoldsVerOnePtrList'mylist (HoldsVerOnePtrList'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_HoldsVerOnePtrList'mylist :: ((Untyped.ReadCtx m msg)) => (HoldsVerOnePtrList msg) -> (m Std_.Bool)
+has_HoldsVerOnePtrList'mylist (HoldsVerOnePtrList'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_HoldsVerOnePtrList'mylist :: ((Untyped.RWCtx m s)) => Std_.Int -> (HoldsVerOnePtrList (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (VerOnePtr (Message.Mut s))))
+new_HoldsVerOnePtrList'mylist len struct = (do
+    result <- (Classes.newList (Untyped.message struct) len)
+    (set_HoldsVerOnePtrList'mylist struct result)
+    (Std_.pure result)
+    )
+newtype HoldsVerTwoPtrList msg
+    = HoldsVerTwoPtrList'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (HoldsVerTwoPtrList msg)) where
+    fromStruct struct = (Std_.pure (HoldsVerTwoPtrList'newtype_ struct))
+instance (Classes.ToStruct msg (HoldsVerTwoPtrList msg)) where
+    toStruct (HoldsVerTwoPtrList'newtype_ struct) = struct
+instance (Untyped.HasMessage (HoldsVerTwoPtrList mut) mut) where
+    message (HoldsVerTwoPtrList'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (HoldsVerTwoPtrList mut) mut) where
+    messageDefault msg = (HoldsVerTwoPtrList'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (HoldsVerTwoPtrList msg)) where
+    fromPtr msg ptr = (HoldsVerTwoPtrList'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (HoldsVerTwoPtrList (Message.Mut s))) where
+    toPtr msg (HoldsVerTwoPtrList'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (HoldsVerTwoPtrList (Message.Mut s))) where
+    new msg = (HoldsVerTwoPtrList'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (HoldsVerTwoPtrList mut)) where
+    newtype List mut (HoldsVerTwoPtrList mut)
+        = HoldsVerTwoPtrList'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (HoldsVerTwoPtrList'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (HoldsVerTwoPtrList'List_ l) = (Untyped.ListStruct l)
+    length (HoldsVerTwoPtrList'List_ l) = (Untyped.length l)
+    index i (HoldsVerTwoPtrList'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (HoldsVerTwoPtrList (Message.Mut s))) where
+    setIndex (HoldsVerTwoPtrList'newtype_ elt) i (HoldsVerTwoPtrList'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (HoldsVerTwoPtrList'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_HoldsVerTwoPtrList'mylist :: ((Untyped.ReadCtx m msg)
+                                 ,(Classes.FromPtr msg (Basics.List msg (VerTwoPtr msg)))) => (HoldsVerTwoPtrList msg) -> (m (Basics.List msg (VerTwoPtr msg)))
+get_HoldsVerTwoPtrList'mylist (HoldsVerTwoPtrList'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_HoldsVerTwoPtrList'mylist :: ((Untyped.RWCtx m s)
+                                 ,(Classes.ToPtr s (Basics.List (Message.Mut s) (VerTwoPtr (Message.Mut s))))) => (HoldsVerTwoPtrList (Message.Mut s)) -> (Basics.List (Message.Mut s) (VerTwoPtr (Message.Mut s))) -> (m ())
+set_HoldsVerTwoPtrList'mylist (HoldsVerTwoPtrList'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_HoldsVerTwoPtrList'mylist :: ((Untyped.ReadCtx m msg)) => (HoldsVerTwoPtrList msg) -> (m Std_.Bool)
+has_HoldsVerTwoPtrList'mylist (HoldsVerTwoPtrList'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_HoldsVerTwoPtrList'mylist :: ((Untyped.RWCtx m s)) => Std_.Int -> (HoldsVerTwoPtrList (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (VerTwoPtr (Message.Mut s))))
+new_HoldsVerTwoPtrList'mylist len struct = (do
+    result <- (Classes.newList (Untyped.message struct) len)
+    (set_HoldsVerTwoPtrList'mylist struct result)
+    (Std_.pure result)
+    )
+newtype HoldsVerTwoTwoList msg
+    = HoldsVerTwoTwoList'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (HoldsVerTwoTwoList msg)) where
+    fromStruct struct = (Std_.pure (HoldsVerTwoTwoList'newtype_ struct))
+instance (Classes.ToStruct msg (HoldsVerTwoTwoList msg)) where
+    toStruct (HoldsVerTwoTwoList'newtype_ struct) = struct
+instance (Untyped.HasMessage (HoldsVerTwoTwoList mut) mut) where
+    message (HoldsVerTwoTwoList'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (HoldsVerTwoTwoList mut) mut) where
+    messageDefault msg = (HoldsVerTwoTwoList'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (HoldsVerTwoTwoList msg)) where
+    fromPtr msg ptr = (HoldsVerTwoTwoList'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (HoldsVerTwoTwoList (Message.Mut s))) where
+    toPtr msg (HoldsVerTwoTwoList'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (HoldsVerTwoTwoList (Message.Mut s))) where
+    new msg = (HoldsVerTwoTwoList'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (HoldsVerTwoTwoList mut)) where
+    newtype List mut (HoldsVerTwoTwoList mut)
+        = HoldsVerTwoTwoList'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (HoldsVerTwoTwoList'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (HoldsVerTwoTwoList'List_ l) = (Untyped.ListStruct l)
+    length (HoldsVerTwoTwoList'List_ l) = (Untyped.length l)
+    index i (HoldsVerTwoTwoList'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (HoldsVerTwoTwoList (Message.Mut s))) where
+    setIndex (HoldsVerTwoTwoList'newtype_ elt) i (HoldsVerTwoTwoList'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (HoldsVerTwoTwoList'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_HoldsVerTwoTwoList'mylist :: ((Untyped.ReadCtx m msg)
+                                 ,(Classes.FromPtr msg (Basics.List msg (VerTwoDataTwoPtr msg)))) => (HoldsVerTwoTwoList msg) -> (m (Basics.List msg (VerTwoDataTwoPtr msg)))
+get_HoldsVerTwoTwoList'mylist (HoldsVerTwoTwoList'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_HoldsVerTwoTwoList'mylist :: ((Untyped.RWCtx m s)
+                                 ,(Classes.ToPtr s (Basics.List (Message.Mut s) (VerTwoDataTwoPtr (Message.Mut s))))) => (HoldsVerTwoTwoList (Message.Mut s)) -> (Basics.List (Message.Mut s) (VerTwoDataTwoPtr (Message.Mut s))) -> (m ())
+set_HoldsVerTwoTwoList'mylist (HoldsVerTwoTwoList'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_HoldsVerTwoTwoList'mylist :: ((Untyped.ReadCtx m msg)) => (HoldsVerTwoTwoList msg) -> (m Std_.Bool)
+has_HoldsVerTwoTwoList'mylist (HoldsVerTwoTwoList'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_HoldsVerTwoTwoList'mylist :: ((Untyped.RWCtx m s)) => Std_.Int -> (HoldsVerTwoTwoList (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (VerTwoDataTwoPtr (Message.Mut s))))
+new_HoldsVerTwoTwoList'mylist len struct = (do
+    result <- (Classes.newList (Untyped.message struct) len)
+    (set_HoldsVerTwoTwoList'mylist struct result)
+    (Std_.pure result)
+    )
+newtype HoldsVerTwoTwoPlus msg
+    = HoldsVerTwoTwoPlus'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (HoldsVerTwoTwoPlus msg)) where
+    fromStruct struct = (Std_.pure (HoldsVerTwoTwoPlus'newtype_ struct))
+instance (Classes.ToStruct msg (HoldsVerTwoTwoPlus msg)) where
+    toStruct (HoldsVerTwoTwoPlus'newtype_ struct) = struct
+instance (Untyped.HasMessage (HoldsVerTwoTwoPlus mut) mut) where
+    message (HoldsVerTwoTwoPlus'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (HoldsVerTwoTwoPlus mut) mut) where
+    messageDefault msg = (HoldsVerTwoTwoPlus'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (HoldsVerTwoTwoPlus msg)) where
+    fromPtr msg ptr = (HoldsVerTwoTwoPlus'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (HoldsVerTwoTwoPlus (Message.Mut s))) where
+    toPtr msg (HoldsVerTwoTwoPlus'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (HoldsVerTwoTwoPlus (Message.Mut s))) where
+    new msg = (HoldsVerTwoTwoPlus'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (HoldsVerTwoTwoPlus mut)) where
+    newtype List mut (HoldsVerTwoTwoPlus mut)
+        = HoldsVerTwoTwoPlus'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (HoldsVerTwoTwoPlus'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (HoldsVerTwoTwoPlus'List_ l) = (Untyped.ListStruct l)
+    length (HoldsVerTwoTwoPlus'List_ l) = (Untyped.length l)
+    index i (HoldsVerTwoTwoPlus'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (HoldsVerTwoTwoPlus (Message.Mut s))) where
+    setIndex (HoldsVerTwoTwoPlus'newtype_ elt) i (HoldsVerTwoTwoPlus'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (HoldsVerTwoTwoPlus'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_HoldsVerTwoTwoPlus'mylist :: ((Untyped.ReadCtx m msg)
+                                 ,(Classes.FromPtr msg (Basics.List msg (VerTwoTwoPlus msg)))) => (HoldsVerTwoTwoPlus msg) -> (m (Basics.List msg (VerTwoTwoPlus msg)))
+get_HoldsVerTwoTwoPlus'mylist (HoldsVerTwoTwoPlus'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_HoldsVerTwoTwoPlus'mylist :: ((Untyped.RWCtx m s)
+                                 ,(Classes.ToPtr s (Basics.List (Message.Mut s) (VerTwoTwoPlus (Message.Mut s))))) => (HoldsVerTwoTwoPlus (Message.Mut s)) -> (Basics.List (Message.Mut s) (VerTwoTwoPlus (Message.Mut s))) -> (m ())
+set_HoldsVerTwoTwoPlus'mylist (HoldsVerTwoTwoPlus'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_HoldsVerTwoTwoPlus'mylist :: ((Untyped.ReadCtx m msg)) => (HoldsVerTwoTwoPlus msg) -> (m Std_.Bool)
+has_HoldsVerTwoTwoPlus'mylist (HoldsVerTwoTwoPlus'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_HoldsVerTwoTwoPlus'mylist :: ((Untyped.RWCtx m s)) => Std_.Int -> (HoldsVerTwoTwoPlus (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (VerTwoTwoPlus (Message.Mut s))))
+new_HoldsVerTwoTwoPlus'mylist len struct = (do
+    result <- (Classes.newList (Untyped.message struct) len)
+    (set_HoldsVerTwoTwoPlus'mylist struct result)
+    (Std_.pure result)
+    )
+newtype VerTwoTwoPlus msg
+    = VerTwoTwoPlus'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (VerTwoTwoPlus msg)) where
+    fromStruct struct = (Std_.pure (VerTwoTwoPlus'newtype_ struct))
+instance (Classes.ToStruct msg (VerTwoTwoPlus msg)) where
+    toStruct (VerTwoTwoPlus'newtype_ struct) = struct
+instance (Untyped.HasMessage (VerTwoTwoPlus mut) mut) where
+    message (VerTwoTwoPlus'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (VerTwoTwoPlus mut) mut) where
+    messageDefault msg = (VerTwoTwoPlus'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (VerTwoTwoPlus msg)) where
+    fromPtr msg ptr = (VerTwoTwoPlus'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (VerTwoTwoPlus (Message.Mut s))) where
+    toPtr msg (VerTwoTwoPlus'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (VerTwoTwoPlus (Message.Mut s))) where
+    new msg = (VerTwoTwoPlus'newtype_ <$> (Untyped.allocStruct msg 3 3))
+instance (Basics.ListElem mut (VerTwoTwoPlus mut)) where
+    newtype List mut (VerTwoTwoPlus mut)
+        = VerTwoTwoPlus'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (VerTwoTwoPlus'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (VerTwoTwoPlus'List_ l) = (Untyped.ListStruct l)
+    length (VerTwoTwoPlus'List_ l) = (Untyped.length l)
+    index i (VerTwoTwoPlus'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (VerTwoTwoPlus (Message.Mut s))) where
+    setIndex (VerTwoTwoPlus'newtype_ elt) i (VerTwoTwoPlus'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (VerTwoTwoPlus'List_ <$> (Untyped.allocCompositeList msg 3 3 len))
+get_VerTwoTwoPlus'val :: ((Untyped.ReadCtx m msg)) => (VerTwoTwoPlus msg) -> (m Std_.Int16)
+get_VerTwoTwoPlus'val (VerTwoTwoPlus'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
+set_VerTwoTwoPlus'val :: ((Untyped.RWCtx m s)) => (VerTwoTwoPlus (Message.Mut s)) -> Std_.Int16 -> (m ())
+set_VerTwoTwoPlus'val (VerTwoTwoPlus'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
+get_VerTwoTwoPlus'duo :: ((Untyped.ReadCtx m msg)) => (VerTwoTwoPlus msg) -> (m Std_.Int64)
+get_VerTwoTwoPlus'duo (VerTwoTwoPlus'newtype_ struct) = (GenHelpers.getWordField struct 1 0 0)
+set_VerTwoTwoPlus'duo :: ((Untyped.RWCtx m s)) => (VerTwoTwoPlus (Message.Mut s)) -> Std_.Int64 -> (m ())
+set_VerTwoTwoPlus'duo (VerTwoTwoPlus'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 1 0 0)
+get_VerTwoTwoPlus'ptr1 :: ((Untyped.ReadCtx m msg)
+                          ,(Classes.FromPtr msg (VerTwoDataTwoPtr msg))) => (VerTwoTwoPlus msg) -> (m (VerTwoDataTwoPtr msg))
+get_VerTwoTwoPlus'ptr1 (VerTwoTwoPlus'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_VerTwoTwoPlus'ptr1 :: ((Untyped.RWCtx m s)
+                          ,(Classes.ToPtr s (VerTwoDataTwoPtr (Message.Mut s)))) => (VerTwoTwoPlus (Message.Mut s)) -> (VerTwoDataTwoPtr (Message.Mut s)) -> (m ())
+set_VerTwoTwoPlus'ptr1 (VerTwoTwoPlus'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_VerTwoTwoPlus'ptr1 :: ((Untyped.ReadCtx m msg)) => (VerTwoTwoPlus msg) -> (m Std_.Bool)
+has_VerTwoTwoPlus'ptr1 (VerTwoTwoPlus'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_VerTwoTwoPlus'ptr1 :: ((Untyped.RWCtx m s)) => (VerTwoTwoPlus (Message.Mut s)) -> (m (VerTwoDataTwoPtr (Message.Mut s)))
+new_VerTwoTwoPlus'ptr1 struct = (do
+    result <- (Classes.new (Untyped.message struct))
+    (set_VerTwoTwoPlus'ptr1 struct result)
+    (Std_.pure result)
+    )
+get_VerTwoTwoPlus'ptr2 :: ((Untyped.ReadCtx m msg)
+                          ,(Classes.FromPtr msg (VerTwoDataTwoPtr msg))) => (VerTwoTwoPlus msg) -> (m (VerTwoDataTwoPtr msg))
+get_VerTwoTwoPlus'ptr2 (VerTwoTwoPlus'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 1 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_VerTwoTwoPlus'ptr2 :: ((Untyped.RWCtx m s)
+                          ,(Classes.ToPtr s (VerTwoDataTwoPtr (Message.Mut s)))) => (VerTwoTwoPlus (Message.Mut s)) -> (VerTwoDataTwoPtr (Message.Mut s)) -> (m ())
+set_VerTwoTwoPlus'ptr2 (VerTwoTwoPlus'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 1 struct)
+    )
+has_VerTwoTwoPlus'ptr2 :: ((Untyped.ReadCtx m msg)) => (VerTwoTwoPlus msg) -> (m Std_.Bool)
+has_VerTwoTwoPlus'ptr2 (VerTwoTwoPlus'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
+new_VerTwoTwoPlus'ptr2 :: ((Untyped.RWCtx m s)) => (VerTwoTwoPlus (Message.Mut s)) -> (m (VerTwoDataTwoPtr (Message.Mut s)))
+new_VerTwoTwoPlus'ptr2 struct = (do
+    result <- (Classes.new (Untyped.message struct))
+    (set_VerTwoTwoPlus'ptr2 struct result)
+    (Std_.pure result)
+    )
+get_VerTwoTwoPlus'tre :: ((Untyped.ReadCtx m msg)) => (VerTwoTwoPlus msg) -> (m Std_.Int64)
+get_VerTwoTwoPlus'tre (VerTwoTwoPlus'newtype_ struct) = (GenHelpers.getWordField struct 2 0 0)
+set_VerTwoTwoPlus'tre :: ((Untyped.RWCtx m s)) => (VerTwoTwoPlus (Message.Mut s)) -> Std_.Int64 -> (m ())
+set_VerTwoTwoPlus'tre (VerTwoTwoPlus'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 2 0 0)
+get_VerTwoTwoPlus'lst3 :: ((Untyped.ReadCtx m msg)
+                          ,(Classes.FromPtr msg (Basics.List msg Std_.Int64))) => (VerTwoTwoPlus msg) -> (m (Basics.List msg Std_.Int64))
+get_VerTwoTwoPlus'lst3 (VerTwoTwoPlus'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 2 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_VerTwoTwoPlus'lst3 :: ((Untyped.RWCtx m s)
+                          ,(Classes.ToPtr s (Basics.List (Message.Mut s) Std_.Int64))) => (VerTwoTwoPlus (Message.Mut s)) -> (Basics.List (Message.Mut s) Std_.Int64) -> (m ())
+set_VerTwoTwoPlus'lst3 (VerTwoTwoPlus'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 2 struct)
+    )
+has_VerTwoTwoPlus'lst3 :: ((Untyped.ReadCtx m msg)) => (VerTwoTwoPlus msg) -> (m Std_.Bool)
+has_VerTwoTwoPlus'lst3 (VerTwoTwoPlus'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 2 struct))
+new_VerTwoTwoPlus'lst3 :: ((Untyped.RWCtx m s)) => Std_.Int -> (VerTwoTwoPlus (Message.Mut s)) -> (m (Basics.List (Message.Mut s) Std_.Int64))
+new_VerTwoTwoPlus'lst3 len struct = (do
+    result <- (Classes.newList (Untyped.message struct) len)
+    (set_VerTwoTwoPlus'lst3 struct result)
+    (Std_.pure result)
+    )
+newtype HoldsText msg
+    = HoldsText'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (HoldsText msg)) where
+    fromStruct struct = (Std_.pure (HoldsText'newtype_ struct))
+instance (Classes.ToStruct msg (HoldsText msg)) where
+    toStruct (HoldsText'newtype_ struct) = struct
+instance (Untyped.HasMessage (HoldsText mut) mut) where
+    message (HoldsText'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (HoldsText mut) mut) where
+    messageDefault msg = (HoldsText'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (HoldsText msg)) where
+    fromPtr msg ptr = (HoldsText'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (HoldsText (Message.Mut s))) where
+    toPtr msg (HoldsText'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (HoldsText (Message.Mut s))) where
+    new msg = (HoldsText'newtype_ <$> (Untyped.allocStruct msg 0 3))
+instance (Basics.ListElem mut (HoldsText mut)) where
+    newtype List mut (HoldsText mut)
+        = HoldsText'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (HoldsText'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (HoldsText'List_ l) = (Untyped.ListStruct l)
+    length (HoldsText'List_ l) = (Untyped.length l)
+    index i (HoldsText'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (HoldsText (Message.Mut s))) where
+    setIndex (HoldsText'newtype_ elt) i (HoldsText'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (HoldsText'List_ <$> (Untyped.allocCompositeList msg 0 3 len))
+get_HoldsText'txt :: ((Untyped.ReadCtx m msg)
+                     ,(Classes.FromPtr msg (Basics.Text msg))) => (HoldsText msg) -> (m (Basics.Text msg))
+get_HoldsText'txt (HoldsText'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_HoldsText'txt :: ((Untyped.RWCtx m s)
+                     ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (HoldsText (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
+set_HoldsText'txt (HoldsText'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_HoldsText'txt :: ((Untyped.ReadCtx m msg)) => (HoldsText msg) -> (m Std_.Bool)
+has_HoldsText'txt (HoldsText'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_HoldsText'txt :: ((Untyped.RWCtx m s)) => Std_.Int -> (HoldsText (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
+new_HoldsText'txt len struct = (do
+    result <- (Basics.newText (Untyped.message struct) len)
+    (set_HoldsText'txt struct result)
+    (Std_.pure result)
+    )
+get_HoldsText'lst :: ((Untyped.ReadCtx m msg)
+                     ,(Classes.FromPtr msg (Basics.List msg (Basics.Text msg)))) => (HoldsText msg) -> (m (Basics.List msg (Basics.Text msg)))
+get_HoldsText'lst (HoldsText'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 1 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_HoldsText'lst :: ((Untyped.RWCtx m s)
+                     ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Basics.Text (Message.Mut s))))) => (HoldsText (Message.Mut s)) -> (Basics.List (Message.Mut s) (Basics.Text (Message.Mut s))) -> (m ())
+set_HoldsText'lst (HoldsText'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 1 struct)
+    )
+has_HoldsText'lst :: ((Untyped.ReadCtx m msg)) => (HoldsText msg) -> (m Std_.Bool)
+has_HoldsText'lst (HoldsText'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
+new_HoldsText'lst :: ((Untyped.RWCtx m s)) => Std_.Int -> (HoldsText (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Basics.Text (Message.Mut s))))
+new_HoldsText'lst len struct = (do
+    result <- (Classes.newList (Untyped.message struct) len)
+    (set_HoldsText'lst struct result)
+    (Std_.pure result)
+    )
+get_HoldsText'lstlst :: ((Untyped.ReadCtx m msg)
+                        ,(Classes.FromPtr msg (Basics.List msg (Basics.List msg (Basics.Text msg))))) => (HoldsText msg) -> (m (Basics.List msg (Basics.List msg (Basics.Text msg))))
+get_HoldsText'lstlst (HoldsText'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 2 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_HoldsText'lstlst :: ((Untyped.RWCtx m s)
+                        ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Basics.List (Message.Mut s) (Basics.Text (Message.Mut s)))))) => (HoldsText (Message.Mut s)) -> (Basics.List (Message.Mut s) (Basics.List (Message.Mut s) (Basics.Text (Message.Mut s)))) -> (m ())
+set_HoldsText'lstlst (HoldsText'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 2 struct)
+    )
+has_HoldsText'lstlst :: ((Untyped.ReadCtx m msg)) => (HoldsText msg) -> (m Std_.Bool)
+has_HoldsText'lstlst (HoldsText'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 2 struct))
+new_HoldsText'lstlst :: ((Untyped.RWCtx m s)) => Std_.Int -> (HoldsText (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Basics.List (Message.Mut s) (Basics.Text (Message.Mut s)))))
+new_HoldsText'lstlst len struct = (do
+    result <- (Classes.newList (Untyped.message struct) len)
+    (set_HoldsText'lstlst struct result)
+    (Std_.pure result)
+    )
+newtype WrapEmpty msg
+    = WrapEmpty'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (WrapEmpty msg)) where
+    fromStruct struct = (Std_.pure (WrapEmpty'newtype_ struct))
+instance (Classes.ToStruct msg (WrapEmpty msg)) where
+    toStruct (WrapEmpty'newtype_ struct) = struct
+instance (Untyped.HasMessage (WrapEmpty mut) mut) where
+    message (WrapEmpty'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (WrapEmpty mut) mut) where
+    messageDefault msg = (WrapEmpty'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (WrapEmpty msg)) where
+    fromPtr msg ptr = (WrapEmpty'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (WrapEmpty (Message.Mut s))) where
+    toPtr msg (WrapEmpty'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (WrapEmpty (Message.Mut s))) where
+    new msg = (WrapEmpty'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (WrapEmpty mut)) where
+    newtype List mut (WrapEmpty mut)
+        = WrapEmpty'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (WrapEmpty'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (WrapEmpty'List_ l) = (Untyped.ListStruct l)
+    length (WrapEmpty'List_ l) = (Untyped.length l)
+    index i (WrapEmpty'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (WrapEmpty (Message.Mut s))) where
+    setIndex (WrapEmpty'newtype_ elt) i (WrapEmpty'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (WrapEmpty'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_WrapEmpty'mightNotBeReallyEmpty :: ((Untyped.ReadCtx m msg)
+                                       ,(Classes.FromPtr msg (VerEmpty msg))) => (WrapEmpty msg) -> (m (VerEmpty msg))
+get_WrapEmpty'mightNotBeReallyEmpty (WrapEmpty'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_WrapEmpty'mightNotBeReallyEmpty :: ((Untyped.RWCtx m s)
+                                       ,(Classes.ToPtr s (VerEmpty (Message.Mut s)))) => (WrapEmpty (Message.Mut s)) -> (VerEmpty (Message.Mut s)) -> (m ())
+set_WrapEmpty'mightNotBeReallyEmpty (WrapEmpty'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_WrapEmpty'mightNotBeReallyEmpty :: ((Untyped.ReadCtx m msg)) => (WrapEmpty msg) -> (m Std_.Bool)
+has_WrapEmpty'mightNotBeReallyEmpty (WrapEmpty'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_WrapEmpty'mightNotBeReallyEmpty :: ((Untyped.RWCtx m s)) => (WrapEmpty (Message.Mut s)) -> (m (VerEmpty (Message.Mut s)))
+new_WrapEmpty'mightNotBeReallyEmpty struct = (do
+    result <- (Classes.new (Untyped.message struct))
+    (set_WrapEmpty'mightNotBeReallyEmpty struct result)
+    (Std_.pure result)
+    )
+newtype Wrap2x2 msg
+    = Wrap2x2'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Wrap2x2 msg)) where
+    fromStruct struct = (Std_.pure (Wrap2x2'newtype_ struct))
+instance (Classes.ToStruct msg (Wrap2x2 msg)) where
+    toStruct (Wrap2x2'newtype_ struct) = struct
+instance (Untyped.HasMessage (Wrap2x2 mut) mut) where
+    message (Wrap2x2'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Wrap2x2 mut) mut) where
+    messageDefault msg = (Wrap2x2'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Wrap2x2 msg)) where
+    fromPtr msg ptr = (Wrap2x2'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Wrap2x2 (Message.Mut s))) where
+    toPtr msg (Wrap2x2'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Wrap2x2 (Message.Mut s))) where
+    new msg = (Wrap2x2'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (Wrap2x2 mut)) where
+    newtype List mut (Wrap2x2 mut)
+        = Wrap2x2'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Wrap2x2'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Wrap2x2'List_ l) = (Untyped.ListStruct l)
+    length (Wrap2x2'List_ l) = (Untyped.length l)
+    index i (Wrap2x2'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Wrap2x2 (Message.Mut s))) where
+    setIndex (Wrap2x2'newtype_ elt) i (Wrap2x2'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Wrap2x2'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_Wrap2x2'mightNotBeReallyEmpty :: ((Untyped.ReadCtx m msg)
+                                     ,(Classes.FromPtr msg (VerTwoDataTwoPtr msg))) => (Wrap2x2 msg) -> (m (VerTwoDataTwoPtr msg))
+get_Wrap2x2'mightNotBeReallyEmpty (Wrap2x2'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_Wrap2x2'mightNotBeReallyEmpty :: ((Untyped.RWCtx m s)
+                                     ,(Classes.ToPtr s (VerTwoDataTwoPtr (Message.Mut s)))) => (Wrap2x2 (Message.Mut s)) -> (VerTwoDataTwoPtr (Message.Mut s)) -> (m ())
+set_Wrap2x2'mightNotBeReallyEmpty (Wrap2x2'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_Wrap2x2'mightNotBeReallyEmpty :: ((Untyped.ReadCtx m msg)) => (Wrap2x2 msg) -> (m Std_.Bool)
+has_Wrap2x2'mightNotBeReallyEmpty (Wrap2x2'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_Wrap2x2'mightNotBeReallyEmpty :: ((Untyped.RWCtx m s)) => (Wrap2x2 (Message.Mut s)) -> (m (VerTwoDataTwoPtr (Message.Mut s)))
+new_Wrap2x2'mightNotBeReallyEmpty struct = (do
+    result <- (Classes.new (Untyped.message struct))
+    (set_Wrap2x2'mightNotBeReallyEmpty struct result)
+    (Std_.pure result)
+    )
+newtype Wrap2x2plus msg
+    = Wrap2x2plus'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Wrap2x2plus msg)) where
+    fromStruct struct = (Std_.pure (Wrap2x2plus'newtype_ struct))
+instance (Classes.ToStruct msg (Wrap2x2plus msg)) where
+    toStruct (Wrap2x2plus'newtype_ struct) = struct
+instance (Untyped.HasMessage (Wrap2x2plus mut) mut) where
+    message (Wrap2x2plus'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Wrap2x2plus mut) mut) where
+    messageDefault msg = (Wrap2x2plus'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Wrap2x2plus msg)) where
+    fromPtr msg ptr = (Wrap2x2plus'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Wrap2x2plus (Message.Mut s))) where
+    toPtr msg (Wrap2x2plus'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Wrap2x2plus (Message.Mut s))) where
+    new msg = (Wrap2x2plus'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (Wrap2x2plus mut)) where
+    newtype List mut (Wrap2x2plus mut)
+        = Wrap2x2plus'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Wrap2x2plus'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Wrap2x2plus'List_ l) = (Untyped.ListStruct l)
+    length (Wrap2x2plus'List_ l) = (Untyped.length l)
+    index i (Wrap2x2plus'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Wrap2x2plus (Message.Mut s))) where
+    setIndex (Wrap2x2plus'newtype_ elt) i (Wrap2x2plus'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Wrap2x2plus'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_Wrap2x2plus'mightNotBeReallyEmpty :: ((Untyped.ReadCtx m msg)
+                                         ,(Classes.FromPtr msg (VerTwoTwoPlus msg))) => (Wrap2x2plus msg) -> (m (VerTwoTwoPlus msg))
+get_Wrap2x2plus'mightNotBeReallyEmpty (Wrap2x2plus'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_Wrap2x2plus'mightNotBeReallyEmpty :: ((Untyped.RWCtx m s)
+                                         ,(Classes.ToPtr s (VerTwoTwoPlus (Message.Mut s)))) => (Wrap2x2plus (Message.Mut s)) -> (VerTwoTwoPlus (Message.Mut s)) -> (m ())
+set_Wrap2x2plus'mightNotBeReallyEmpty (Wrap2x2plus'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_Wrap2x2plus'mightNotBeReallyEmpty :: ((Untyped.ReadCtx m msg)) => (Wrap2x2plus msg) -> (m Std_.Bool)
+has_Wrap2x2plus'mightNotBeReallyEmpty (Wrap2x2plus'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_Wrap2x2plus'mightNotBeReallyEmpty :: ((Untyped.RWCtx m s)) => (Wrap2x2plus (Message.Mut s)) -> (m (VerTwoTwoPlus (Message.Mut s)))
+new_Wrap2x2plus'mightNotBeReallyEmpty struct = (do
+    result <- (Classes.new (Untyped.message struct))
+    (set_Wrap2x2plus'mightNotBeReallyEmpty struct result)
+    (Std_.pure result)
+    )
+newtype VoidUnion msg
+    = VoidUnion'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (VoidUnion msg)) where
+    fromStruct struct = (Std_.pure (VoidUnion'newtype_ struct))
+instance (Classes.ToStruct msg (VoidUnion msg)) where
+    toStruct (VoidUnion'newtype_ struct) = struct
+instance (Untyped.HasMessage (VoidUnion mut) mut) where
+    message (VoidUnion'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (VoidUnion mut) mut) where
+    messageDefault msg = (VoidUnion'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (VoidUnion msg)) where
+    fromPtr msg ptr = (VoidUnion'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (VoidUnion (Message.Mut s))) where
+    toPtr msg (VoidUnion'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (VoidUnion (Message.Mut s))) where
+    new msg = (VoidUnion'newtype_ <$> (Untyped.allocStruct msg 1 0))
+instance (Basics.ListElem mut (VoidUnion mut)) where
+    newtype List mut (VoidUnion mut)
+        = VoidUnion'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (VoidUnion'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (VoidUnion'List_ l) = (Untyped.ListStruct l)
+    length (VoidUnion'List_ l) = (Untyped.length l)
+    index i (VoidUnion'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (VoidUnion (Message.Mut s))) where
+    setIndex (VoidUnion'newtype_ elt) i (VoidUnion'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (VoidUnion'List_ <$> (Untyped.allocCompositeList msg 1 0 len))
+data VoidUnion' (mut :: Message.Mutability)
+    = VoidUnion'a 
+    | VoidUnion'b 
+    | VoidUnion'unknown' Std_.Word16
+instance (Classes.FromStruct mut (VoidUnion' mut)) where
+    fromStruct struct = (do
+        tag <- (GenHelpers.getTag struct 0)
+        case tag of
+            0 ->
+                (Std_.pure VoidUnion'a)
+            1 ->
+                (Std_.pure VoidUnion'b)
+            _ ->
+                (Std_.pure (VoidUnion'unknown' (Std_.fromIntegral tag)))
+        )
+get_VoidUnion' :: ((Untyped.ReadCtx m msg)
+                  ,(Classes.FromStruct msg (VoidUnion' msg))) => (VoidUnion msg) -> (m (VoidUnion' msg))
+get_VoidUnion' (VoidUnion'newtype_ struct) = (Classes.fromStruct struct)
+set_VoidUnion'a :: ((Untyped.RWCtx m s)) => (VoidUnion (Message.Mut s)) -> (m ())
+set_VoidUnion'a (VoidUnion'newtype_ struct) = (do
+    (GenHelpers.setWordField struct (0 :: Std_.Word16) 0 0 0)
+    (Std_.pure ())
+    )
+set_VoidUnion'b :: ((Untyped.RWCtx m s)) => (VoidUnion (Message.Mut s)) -> (m ())
+set_VoidUnion'b (VoidUnion'newtype_ struct) = (do
+    (GenHelpers.setWordField struct (1 :: Std_.Word16) 0 0 0)
+    (Std_.pure ())
+    )
+set_VoidUnion'unknown' :: ((Untyped.RWCtx m s)) => (VoidUnion (Message.Mut s)) -> Std_.Word16 -> (m ())
+set_VoidUnion'unknown' (VoidUnion'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
+newtype Nester1Capn msg
+    = Nester1Capn'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Nester1Capn msg)) where
+    fromStruct struct = (Std_.pure (Nester1Capn'newtype_ struct))
+instance (Classes.ToStruct msg (Nester1Capn msg)) where
+    toStruct (Nester1Capn'newtype_ struct) = struct
+instance (Untyped.HasMessage (Nester1Capn mut) mut) where
+    message (Nester1Capn'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Nester1Capn mut) mut) where
+    messageDefault msg = (Nester1Capn'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Nester1Capn msg)) where
+    fromPtr msg ptr = (Nester1Capn'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Nester1Capn (Message.Mut s))) where
+    toPtr msg (Nester1Capn'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Nester1Capn (Message.Mut s))) where
+    new msg = (Nester1Capn'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (Nester1Capn mut)) where
+    newtype List mut (Nester1Capn mut)
+        = Nester1Capn'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Nester1Capn'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Nester1Capn'List_ l) = (Untyped.ListStruct l)
+    length (Nester1Capn'List_ l) = (Untyped.length l)
+    index i (Nester1Capn'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Nester1Capn (Message.Mut s))) where
+    setIndex (Nester1Capn'newtype_ elt) i (Nester1Capn'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Nester1Capn'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_Nester1Capn'strs :: ((Untyped.ReadCtx m msg)
+                        ,(Classes.FromPtr msg (Basics.List msg (Basics.Text msg)))) => (Nester1Capn msg) -> (m (Basics.List msg (Basics.Text msg)))
+get_Nester1Capn'strs (Nester1Capn'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_Nester1Capn'strs :: ((Untyped.RWCtx m s)
+                        ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Basics.Text (Message.Mut s))))) => (Nester1Capn (Message.Mut s)) -> (Basics.List (Message.Mut s) (Basics.Text (Message.Mut s))) -> (m ())
+set_Nester1Capn'strs (Nester1Capn'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_Nester1Capn'strs :: ((Untyped.ReadCtx m msg)) => (Nester1Capn msg) -> (m Std_.Bool)
+has_Nester1Capn'strs (Nester1Capn'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_Nester1Capn'strs :: ((Untyped.RWCtx m s)) => Std_.Int -> (Nester1Capn (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Basics.Text (Message.Mut s))))
+new_Nester1Capn'strs len struct = (do
+    result <- (Classes.newList (Untyped.message struct) len)
+    (set_Nester1Capn'strs struct result)
+    (Std_.pure result)
+    )
+newtype RWTestCapn msg
+    = RWTestCapn'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (RWTestCapn msg)) where
+    fromStruct struct = (Std_.pure (RWTestCapn'newtype_ struct))
+instance (Classes.ToStruct msg (RWTestCapn msg)) where
+    toStruct (RWTestCapn'newtype_ struct) = struct
+instance (Untyped.HasMessage (RWTestCapn mut) mut) where
+    message (RWTestCapn'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (RWTestCapn mut) mut) where
+    messageDefault msg = (RWTestCapn'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (RWTestCapn msg)) where
+    fromPtr msg ptr = (RWTestCapn'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (RWTestCapn (Message.Mut s))) where
+    toPtr msg (RWTestCapn'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (RWTestCapn (Message.Mut s))) where
+    new msg = (RWTestCapn'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (RWTestCapn mut)) where
+    newtype List mut (RWTestCapn mut)
+        = RWTestCapn'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (RWTestCapn'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (RWTestCapn'List_ l) = (Untyped.ListStruct l)
+    length (RWTestCapn'List_ l) = (Untyped.length l)
+    index i (RWTestCapn'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (RWTestCapn (Message.Mut s))) where
+    setIndex (RWTestCapn'newtype_ elt) i (RWTestCapn'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (RWTestCapn'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_RWTestCapn'nestMatrix :: ((Untyped.ReadCtx m msg)
+                             ,(Classes.FromPtr msg (Basics.List msg (Basics.List msg (Nester1Capn msg))))) => (RWTestCapn msg) -> (m (Basics.List msg (Basics.List msg (Nester1Capn msg))))
+get_RWTestCapn'nestMatrix (RWTestCapn'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_RWTestCapn'nestMatrix :: ((Untyped.RWCtx m s)
+                             ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Basics.List (Message.Mut s) (Nester1Capn (Message.Mut s)))))) => (RWTestCapn (Message.Mut s)) -> (Basics.List (Message.Mut s) (Basics.List (Message.Mut s) (Nester1Capn (Message.Mut s)))) -> (m ())
+set_RWTestCapn'nestMatrix (RWTestCapn'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_RWTestCapn'nestMatrix :: ((Untyped.ReadCtx m msg)) => (RWTestCapn msg) -> (m Std_.Bool)
+has_RWTestCapn'nestMatrix (RWTestCapn'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_RWTestCapn'nestMatrix :: ((Untyped.RWCtx m s)) => Std_.Int -> (RWTestCapn (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Basics.List (Message.Mut s) (Nester1Capn (Message.Mut s)))))
+new_RWTestCapn'nestMatrix len struct = (do
+    result <- (Classes.newList (Untyped.message struct) len)
+    (set_RWTestCapn'nestMatrix struct result)
+    (Std_.pure result)
+    )
+newtype ListStructCapn msg
+    = ListStructCapn'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (ListStructCapn msg)) where
+    fromStruct struct = (Std_.pure (ListStructCapn'newtype_ struct))
+instance (Classes.ToStruct msg (ListStructCapn msg)) where
+    toStruct (ListStructCapn'newtype_ struct) = struct
+instance (Untyped.HasMessage (ListStructCapn mut) mut) where
+    message (ListStructCapn'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (ListStructCapn mut) mut) where
+    messageDefault msg = (ListStructCapn'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (ListStructCapn msg)) where
+    fromPtr msg ptr = (ListStructCapn'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (ListStructCapn (Message.Mut s))) where
+    toPtr msg (ListStructCapn'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (ListStructCapn (Message.Mut s))) where
+    new msg = (ListStructCapn'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (ListStructCapn mut)) where
+    newtype List mut (ListStructCapn mut)
+        = ListStructCapn'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (ListStructCapn'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (ListStructCapn'List_ l) = (Untyped.ListStruct l)
+    length (ListStructCapn'List_ l) = (Untyped.length l)
+    index i (ListStructCapn'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (ListStructCapn (Message.Mut s))) where
+    setIndex (ListStructCapn'newtype_ elt) i (ListStructCapn'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (ListStructCapn'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_ListStructCapn'vec :: ((Untyped.ReadCtx m msg)
+                          ,(Classes.FromPtr msg (Basics.List msg (Nester1Capn msg)))) => (ListStructCapn msg) -> (m (Basics.List msg (Nester1Capn msg)))
+get_ListStructCapn'vec (ListStructCapn'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_ListStructCapn'vec :: ((Untyped.RWCtx m s)
+                          ,(Classes.ToPtr s (Basics.List (Message.Mut s) (Nester1Capn (Message.Mut s))))) => (ListStructCapn (Message.Mut s)) -> (Basics.List (Message.Mut s) (Nester1Capn (Message.Mut s))) -> (m ())
+set_ListStructCapn'vec (ListStructCapn'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_ListStructCapn'vec :: ((Untyped.ReadCtx m msg)) => (ListStructCapn msg) -> (m Std_.Bool)
+has_ListStructCapn'vec (ListStructCapn'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_ListStructCapn'vec :: ((Untyped.RWCtx m s)) => Std_.Int -> (ListStructCapn (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Nester1Capn (Message.Mut s))))
+new_ListStructCapn'vec len struct = (do
+    result <- (Classes.newList (Untyped.message struct) len)
+    (set_ListStructCapn'vec struct result)
+    (Std_.pure result)
+    )
+newtype Echo msg
+    = Echo'newtype_ (Std_.Maybe (Untyped.Cap msg))
+instance (Classes.FromPtr msg (Echo msg)) where
+    fromPtr msg ptr = (Echo'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Echo (Message.Mut s))) where
+    toPtr msg (Echo'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
+    toPtr msg (Echo'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
+newtype Echo'echo'params msg
+    = Echo'echo'params'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Echo'echo'params msg)) where
+    fromStruct struct = (Std_.pure (Echo'echo'params'newtype_ struct))
+instance (Classes.ToStruct msg (Echo'echo'params msg)) where
+    toStruct (Echo'echo'params'newtype_ struct) = struct
+instance (Untyped.HasMessage (Echo'echo'params mut) mut) where
+    message (Echo'echo'params'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Echo'echo'params mut) mut) where
+    messageDefault msg = (Echo'echo'params'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Echo'echo'params msg)) where
+    fromPtr msg ptr = (Echo'echo'params'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Echo'echo'params (Message.Mut s))) where
+    toPtr msg (Echo'echo'params'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Echo'echo'params (Message.Mut s))) where
+    new msg = (Echo'echo'params'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (Echo'echo'params mut)) where
+    newtype List mut (Echo'echo'params mut)
+        = Echo'echo'params'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Echo'echo'params'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Echo'echo'params'List_ l) = (Untyped.ListStruct l)
+    length (Echo'echo'params'List_ l) = (Untyped.length l)
+    index i (Echo'echo'params'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Echo'echo'params (Message.Mut s))) where
+    setIndex (Echo'echo'params'newtype_ elt) i (Echo'echo'params'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Echo'echo'params'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_Echo'echo'params'in_ :: ((Untyped.ReadCtx m msg)
+                            ,(Classes.FromPtr msg (Basics.Text msg))) => (Echo'echo'params msg) -> (m (Basics.Text msg))
+get_Echo'echo'params'in_ (Echo'echo'params'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_Echo'echo'params'in_ :: ((Untyped.RWCtx m s)
+                            ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Echo'echo'params (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
+set_Echo'echo'params'in_ (Echo'echo'params'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_Echo'echo'params'in_ :: ((Untyped.ReadCtx m msg)) => (Echo'echo'params msg) -> (m Std_.Bool)
+has_Echo'echo'params'in_ (Echo'echo'params'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_Echo'echo'params'in_ :: ((Untyped.RWCtx m s)) => Std_.Int -> (Echo'echo'params (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
+new_Echo'echo'params'in_ len struct = (do
+    result <- (Basics.newText (Untyped.message struct) len)
+    (set_Echo'echo'params'in_ struct result)
+    (Std_.pure result)
+    )
+newtype Echo'echo'results msg
+    = Echo'echo'results'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Echo'echo'results msg)) where
+    fromStruct struct = (Std_.pure (Echo'echo'results'newtype_ struct))
+instance (Classes.ToStruct msg (Echo'echo'results msg)) where
+    toStruct (Echo'echo'results'newtype_ struct) = struct
+instance (Untyped.HasMessage (Echo'echo'results mut) mut) where
+    message (Echo'echo'results'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Echo'echo'results mut) mut) where
+    messageDefault msg = (Echo'echo'results'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Echo'echo'results msg)) where
+    fromPtr msg ptr = (Echo'echo'results'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Echo'echo'results (Message.Mut s))) where
+    toPtr msg (Echo'echo'results'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Echo'echo'results (Message.Mut s))) where
+    new msg = (Echo'echo'results'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (Echo'echo'results mut)) where
+    newtype List mut (Echo'echo'results mut)
+        = Echo'echo'results'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Echo'echo'results'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Echo'echo'results'List_ l) = (Untyped.ListStruct l)
+    length (Echo'echo'results'List_ l) = (Untyped.length l)
+    index i (Echo'echo'results'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Echo'echo'results (Message.Mut s))) where
+    setIndex (Echo'echo'results'newtype_ elt) i (Echo'echo'results'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Echo'echo'results'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_Echo'echo'results'out :: ((Untyped.ReadCtx m msg)
+                             ,(Classes.FromPtr msg (Basics.Text msg))) => (Echo'echo'results msg) -> (m (Basics.Text msg))
+get_Echo'echo'results'out (Echo'echo'results'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_Echo'echo'results'out :: ((Untyped.RWCtx m s)
+                             ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Echo'echo'results (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
+set_Echo'echo'results'out (Echo'echo'results'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_Echo'echo'results'out :: ((Untyped.ReadCtx m msg)) => (Echo'echo'results msg) -> (m Std_.Bool)
+has_Echo'echo'results'out (Echo'echo'results'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_Echo'echo'results'out :: ((Untyped.RWCtx m s)) => Std_.Int -> (Echo'echo'results (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
+new_Echo'echo'results'out len struct = (do
+    result <- (Basics.newText (Untyped.message struct) len)
+    (set_Echo'echo'results'out struct result)
+    (Std_.pure result)
+    )
+newtype Hoth msg
+    = Hoth'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Hoth msg)) where
+    fromStruct struct = (Std_.pure (Hoth'newtype_ struct))
+instance (Classes.ToStruct msg (Hoth msg)) where
+    toStruct (Hoth'newtype_ struct) = struct
+instance (Untyped.HasMessage (Hoth mut) mut) where
+    message (Hoth'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Hoth mut) mut) where
+    messageDefault msg = (Hoth'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Hoth msg)) where
+    fromPtr msg ptr = (Hoth'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Hoth (Message.Mut s))) where
+    toPtr msg (Hoth'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Hoth (Message.Mut s))) where
+    new msg = (Hoth'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (Hoth mut)) where
+    newtype List mut (Hoth mut)
+        = Hoth'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Hoth'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Hoth'List_ l) = (Untyped.ListStruct l)
+    length (Hoth'List_ l) = (Untyped.length l)
+    index i (Hoth'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Hoth (Message.Mut s))) where
+    setIndex (Hoth'newtype_ elt) i (Hoth'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Hoth'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_Hoth'base :: ((Untyped.ReadCtx m msg)
+                 ,(Classes.FromPtr msg (EchoBase msg))) => (Hoth msg) -> (m (EchoBase msg))
+get_Hoth'base (Hoth'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_Hoth'base :: ((Untyped.RWCtx m s)
+                 ,(Classes.ToPtr s (EchoBase (Message.Mut s)))) => (Hoth (Message.Mut s)) -> (EchoBase (Message.Mut s)) -> (m ())
+set_Hoth'base (Hoth'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_Hoth'base :: ((Untyped.ReadCtx m msg)) => (Hoth msg) -> (m Std_.Bool)
+has_Hoth'base (Hoth'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_Hoth'base :: ((Untyped.RWCtx m s)) => (Hoth (Message.Mut s)) -> (m (EchoBase (Message.Mut s)))
+new_Hoth'base struct = (do
+    result <- (Classes.new (Untyped.message struct))
+    (set_Hoth'base struct result)
+    (Std_.pure result)
+    )
+newtype EchoBase msg
+    = EchoBase'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (EchoBase msg)) where
+    fromStruct struct = (Std_.pure (EchoBase'newtype_ struct))
+instance (Classes.ToStruct msg (EchoBase msg)) where
+    toStruct (EchoBase'newtype_ struct) = struct
+instance (Untyped.HasMessage (EchoBase mut) mut) where
+    message (EchoBase'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (EchoBase mut) mut) where
+    messageDefault msg = (EchoBase'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (EchoBase msg)) where
+    fromPtr msg ptr = (EchoBase'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (EchoBase (Message.Mut s))) where
+    toPtr msg (EchoBase'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (EchoBase (Message.Mut s))) where
+    new msg = (EchoBase'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (EchoBase mut)) where
+    newtype List mut (EchoBase mut)
+        = EchoBase'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (EchoBase'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (EchoBase'List_ l) = (Untyped.ListStruct l)
+    length (EchoBase'List_ l) = (Untyped.length l)
+    index i (EchoBase'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (EchoBase (Message.Mut s))) where
+    setIndex (EchoBase'newtype_ elt) i (EchoBase'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (EchoBase'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_EchoBase'echo :: ((Untyped.ReadCtx m msg)
+                     ,(Classes.FromPtr msg (Echo msg))) => (EchoBase msg) -> (m (Echo msg))
+get_EchoBase'echo (EchoBase'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_EchoBase'echo :: ((Untyped.RWCtx m s)
+                     ,(Classes.ToPtr s (Echo (Message.Mut s)))) => (EchoBase (Message.Mut s)) -> (Echo (Message.Mut s)) -> (m ())
+set_EchoBase'echo (EchoBase'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_EchoBase'echo :: ((Untyped.ReadCtx m msg)) => (EchoBase msg) -> (m Std_.Bool)
+has_EchoBase'echo (EchoBase'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+newtype EchoBases msg
+    = EchoBases'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (EchoBases msg)) where
+    fromStruct struct = (Std_.pure (EchoBases'newtype_ struct))
+instance (Classes.ToStruct msg (EchoBases msg)) where
+    toStruct (EchoBases'newtype_ struct) = struct
+instance (Untyped.HasMessage (EchoBases mut) mut) where
+    message (EchoBases'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (EchoBases mut) mut) where
+    messageDefault msg = (EchoBases'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (EchoBases msg)) where
+    fromPtr msg ptr = (EchoBases'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (EchoBases (Message.Mut s))) where
+    toPtr msg (EchoBases'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (EchoBases (Message.Mut s))) where
+    new msg = (EchoBases'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (EchoBases mut)) where
+    newtype List mut (EchoBases mut)
+        = EchoBases'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (EchoBases'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (EchoBases'List_ l) = (Untyped.ListStruct l)
+    length (EchoBases'List_ l) = (Untyped.length l)
+    index i (EchoBases'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (EchoBases (Message.Mut s))) where
+    setIndex (EchoBases'newtype_ elt) i (EchoBases'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (EchoBases'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_EchoBases'bases :: ((Untyped.ReadCtx m msg)
+                       ,(Classes.FromPtr msg (Basics.List msg (EchoBase msg)))) => (EchoBases msg) -> (m (Basics.List msg (EchoBase msg)))
+get_EchoBases'bases (EchoBases'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_EchoBases'bases :: ((Untyped.RWCtx m s)
+                       ,(Classes.ToPtr s (Basics.List (Message.Mut s) (EchoBase (Message.Mut s))))) => (EchoBases (Message.Mut s)) -> (Basics.List (Message.Mut s) (EchoBase (Message.Mut s))) -> (m ())
+set_EchoBases'bases (EchoBases'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_EchoBases'bases :: ((Untyped.ReadCtx m msg)) => (EchoBases msg) -> (m Std_.Bool)
+has_EchoBases'bases (EchoBases'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_EchoBases'bases :: ((Untyped.RWCtx m s)) => Std_.Int -> (EchoBases (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (EchoBase (Message.Mut s))))
+new_EchoBases'bases len struct = (do
+    result <- (Classes.newList (Untyped.message struct) len)
+    (set_EchoBases'bases struct result)
+    (Std_.pure result)
+    )
+newtype StackingRoot msg
+    = StackingRoot'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (StackingRoot msg)) where
+    fromStruct struct = (Std_.pure (StackingRoot'newtype_ struct))
+instance (Classes.ToStruct msg (StackingRoot msg)) where
+    toStruct (StackingRoot'newtype_ struct) = struct
+instance (Untyped.HasMessage (StackingRoot mut) mut) where
+    message (StackingRoot'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (StackingRoot mut) mut) where
+    messageDefault msg = (StackingRoot'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (StackingRoot msg)) where
+    fromPtr msg ptr = (StackingRoot'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (StackingRoot (Message.Mut s))) where
+    toPtr msg (StackingRoot'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (StackingRoot (Message.Mut s))) where
+    new msg = (StackingRoot'newtype_ <$> (Untyped.allocStruct msg 0 2))
+instance (Basics.ListElem mut (StackingRoot mut)) where
+    newtype List mut (StackingRoot mut)
+        = StackingRoot'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (StackingRoot'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (StackingRoot'List_ l) = (Untyped.ListStruct l)
+    length (StackingRoot'List_ l) = (Untyped.length l)
+    index i (StackingRoot'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (StackingRoot (Message.Mut s))) where
+    setIndex (StackingRoot'newtype_ elt) i (StackingRoot'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (StackingRoot'List_ <$> (Untyped.allocCompositeList msg 0 2 len))
+get_StackingRoot'aWithDefault :: ((Untyped.ReadCtx m msg)
+                                 ,(Classes.FromPtr msg (StackingA msg))) => (StackingRoot msg) -> (m (StackingA msg))
+get_StackingRoot'aWithDefault (StackingRoot'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_StackingRoot'aWithDefault :: ((Untyped.RWCtx m s)
+                                 ,(Classes.ToPtr s (StackingA (Message.Mut s)))) => (StackingRoot (Message.Mut s)) -> (StackingA (Message.Mut s)) -> (m ())
+set_StackingRoot'aWithDefault (StackingRoot'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_StackingRoot'aWithDefault :: ((Untyped.ReadCtx m msg)) => (StackingRoot msg) -> (m Std_.Bool)
+has_StackingRoot'aWithDefault (StackingRoot'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_StackingRoot'aWithDefault :: ((Untyped.RWCtx m s)) => (StackingRoot (Message.Mut s)) -> (m (StackingA (Message.Mut s)))
+new_StackingRoot'aWithDefault struct = (do
+    result <- (Classes.new (Untyped.message struct))
+    (set_StackingRoot'aWithDefault struct result)
+    (Std_.pure result)
+    )
+get_StackingRoot'a :: ((Untyped.ReadCtx m msg)
+                      ,(Classes.FromPtr msg (StackingA msg))) => (StackingRoot msg) -> (m (StackingA msg))
+get_StackingRoot'a (StackingRoot'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 1 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_StackingRoot'a :: ((Untyped.RWCtx m s)
+                      ,(Classes.ToPtr s (StackingA (Message.Mut s)))) => (StackingRoot (Message.Mut s)) -> (StackingA (Message.Mut s)) -> (m ())
+set_StackingRoot'a (StackingRoot'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 1 struct)
+    )
+has_StackingRoot'a :: ((Untyped.ReadCtx m msg)) => (StackingRoot msg) -> (m Std_.Bool)
+has_StackingRoot'a (StackingRoot'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
+new_StackingRoot'a :: ((Untyped.RWCtx m s)) => (StackingRoot (Message.Mut s)) -> (m (StackingA (Message.Mut s)))
+new_StackingRoot'a struct = (do
+    result <- (Classes.new (Untyped.message struct))
+    (set_StackingRoot'a struct result)
+    (Std_.pure result)
+    )
+newtype StackingA msg
+    = StackingA'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (StackingA msg)) where
+    fromStruct struct = (Std_.pure (StackingA'newtype_ struct))
+instance (Classes.ToStruct msg (StackingA msg)) where
+    toStruct (StackingA'newtype_ struct) = struct
+instance (Untyped.HasMessage (StackingA mut) mut) where
+    message (StackingA'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (StackingA mut) mut) where
+    messageDefault msg = (StackingA'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (StackingA msg)) where
+    fromPtr msg ptr = (StackingA'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (StackingA (Message.Mut s))) where
+    toPtr msg (StackingA'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (StackingA (Message.Mut s))) where
+    new msg = (StackingA'newtype_ <$> (Untyped.allocStruct msg 1 1))
+instance (Basics.ListElem mut (StackingA mut)) where
+    newtype List mut (StackingA mut)
+        = StackingA'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (StackingA'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (StackingA'List_ l) = (Untyped.ListStruct l)
+    length (StackingA'List_ l) = (Untyped.length l)
+    index i (StackingA'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (StackingA (Message.Mut s))) where
+    setIndex (StackingA'newtype_ elt) i (StackingA'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (StackingA'List_ <$> (Untyped.allocCompositeList msg 1 1 len))
+get_StackingA'num :: ((Untyped.ReadCtx m msg)) => (StackingA msg) -> (m Std_.Int32)
+get_StackingA'num (StackingA'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
+set_StackingA'num :: ((Untyped.RWCtx m s)) => (StackingA (Message.Mut s)) -> Std_.Int32 -> (m ())
+set_StackingA'num (StackingA'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
+get_StackingA'b :: ((Untyped.ReadCtx m msg)
+                   ,(Classes.FromPtr msg (StackingB msg))) => (StackingA msg) -> (m (StackingB msg))
+get_StackingA'b (StackingA'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_StackingA'b :: ((Untyped.RWCtx m s)
+                   ,(Classes.ToPtr s (StackingB (Message.Mut s)))) => (StackingA (Message.Mut s)) -> (StackingB (Message.Mut s)) -> (m ())
+set_StackingA'b (StackingA'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_StackingA'b :: ((Untyped.ReadCtx m msg)) => (StackingA msg) -> (m Std_.Bool)
+has_StackingA'b (StackingA'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_StackingA'b :: ((Untyped.RWCtx m s)) => (StackingA (Message.Mut s)) -> (m (StackingB (Message.Mut s)))
+new_StackingA'b struct = (do
+    result <- (Classes.new (Untyped.message struct))
+    (set_StackingA'b struct result)
+    (Std_.pure result)
+    )
+newtype StackingB msg
+    = StackingB'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (StackingB msg)) where
+    fromStruct struct = (Std_.pure (StackingB'newtype_ struct))
+instance (Classes.ToStruct msg (StackingB msg)) where
+    toStruct (StackingB'newtype_ struct) = struct
+instance (Untyped.HasMessage (StackingB mut) mut) where
+    message (StackingB'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (StackingB mut) mut) where
+    messageDefault msg = (StackingB'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (StackingB msg)) where
+    fromPtr msg ptr = (StackingB'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (StackingB (Message.Mut s))) where
+    toPtr msg (StackingB'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (StackingB (Message.Mut s))) where
+    new msg = (StackingB'newtype_ <$> (Untyped.allocStruct msg 1 0))
+instance (Basics.ListElem mut (StackingB mut)) where
+    newtype List mut (StackingB mut)
+        = StackingB'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (StackingB'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (StackingB'List_ l) = (Untyped.ListStruct l)
+    length (StackingB'List_ l) = (Untyped.length l)
+    index i (StackingB'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (StackingB (Message.Mut s))) where
+    setIndex (StackingB'newtype_ elt) i (StackingB'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (StackingB'List_ <$> (Untyped.allocCompositeList msg 1 0 len))
+get_StackingB'num :: ((Untyped.ReadCtx m msg)) => (StackingB msg) -> (m Std_.Int32)
+get_StackingB'num (StackingB'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
+set_StackingB'num :: ((Untyped.RWCtx m s)) => (StackingB (Message.Mut s)) -> Std_.Int32 -> (m ())
+set_StackingB'num (StackingB'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
+newtype CallSequence msg
+    = CallSequence'newtype_ (Std_.Maybe (Untyped.Cap msg))
+instance (Classes.FromPtr msg (CallSequence msg)) where
+    fromPtr msg ptr = (CallSequence'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (CallSequence (Message.Mut s))) where
+    toPtr msg (CallSequence'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
+    toPtr msg (CallSequence'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
+newtype CallSequence'getNumber'params msg
+    = CallSequence'getNumber'params'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (CallSequence'getNumber'params msg)) where
+    fromStruct struct = (Std_.pure (CallSequence'getNumber'params'newtype_ struct))
+instance (Classes.ToStruct msg (CallSequence'getNumber'params msg)) where
+    toStruct (CallSequence'getNumber'params'newtype_ struct) = struct
+instance (Untyped.HasMessage (CallSequence'getNumber'params mut) mut) where
+    message (CallSequence'getNumber'params'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (CallSequence'getNumber'params mut) mut) where
+    messageDefault msg = (CallSequence'getNumber'params'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (CallSequence'getNumber'params msg)) where
+    fromPtr msg ptr = (CallSequence'getNumber'params'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (CallSequence'getNumber'params (Message.Mut s))) where
+    toPtr msg (CallSequence'getNumber'params'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (CallSequence'getNumber'params (Message.Mut s))) where
+    new msg = (CallSequence'getNumber'params'newtype_ <$> (Untyped.allocStruct msg 0 0))
+instance (Basics.ListElem mut (CallSequence'getNumber'params mut)) where
+    newtype List mut (CallSequence'getNumber'params mut)
+        = CallSequence'getNumber'params'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (CallSequence'getNumber'params'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (CallSequence'getNumber'params'List_ l) = (Untyped.ListStruct l)
+    length (CallSequence'getNumber'params'List_ l) = (Untyped.length l)
+    index i (CallSequence'getNumber'params'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (CallSequence'getNumber'params (Message.Mut s))) where
+    setIndex (CallSequence'getNumber'params'newtype_ elt) i (CallSequence'getNumber'params'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (CallSequence'getNumber'params'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
+newtype CallSequence'getNumber'results msg
+    = CallSequence'getNumber'results'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (CallSequence'getNumber'results msg)) where
+    fromStruct struct = (Std_.pure (CallSequence'getNumber'results'newtype_ struct))
+instance (Classes.ToStruct msg (CallSequence'getNumber'results msg)) where
+    toStruct (CallSequence'getNumber'results'newtype_ struct) = struct
+instance (Untyped.HasMessage (CallSequence'getNumber'results mut) mut) where
+    message (CallSequence'getNumber'results'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (CallSequence'getNumber'results mut) mut) where
+    messageDefault msg = (CallSequence'getNumber'results'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (CallSequence'getNumber'results msg)) where
+    fromPtr msg ptr = (CallSequence'getNumber'results'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (CallSequence'getNumber'results (Message.Mut s))) where
+    toPtr msg (CallSequence'getNumber'results'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (CallSequence'getNumber'results (Message.Mut s))) where
+    new msg = (CallSequence'getNumber'results'newtype_ <$> (Untyped.allocStruct msg 1 0))
+instance (Basics.ListElem mut (CallSequence'getNumber'results mut)) where
+    newtype List mut (CallSequence'getNumber'results mut)
+        = CallSequence'getNumber'results'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (CallSequence'getNumber'results'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (CallSequence'getNumber'results'List_ l) = (Untyped.ListStruct l)
+    length (CallSequence'getNumber'results'List_ l) = (Untyped.length l)
+    index i (CallSequence'getNumber'results'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (CallSequence'getNumber'results (Message.Mut s))) where
+    setIndex (CallSequence'getNumber'results'newtype_ elt) i (CallSequence'getNumber'results'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (CallSequence'getNumber'results'List_ <$> (Untyped.allocCompositeList msg 1 0 len))
+get_CallSequence'getNumber'results'n :: ((Untyped.ReadCtx m msg)) => (CallSequence'getNumber'results msg) -> (m Std_.Word32)
+get_CallSequence'getNumber'results'n (CallSequence'getNumber'results'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
+set_CallSequence'getNumber'results'n :: ((Untyped.RWCtx m s)) => (CallSequence'getNumber'results (Message.Mut s)) -> Std_.Word32 -> (m ())
+set_CallSequence'getNumber'results'n (CallSequence'getNumber'results'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
+newtype CounterFactory msg
+    = CounterFactory'newtype_ (Std_.Maybe (Untyped.Cap msg))
+instance (Classes.FromPtr msg (CounterFactory msg)) where
+    fromPtr msg ptr = (CounterFactory'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (CounterFactory (Message.Mut s))) where
+    toPtr msg (CounterFactory'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
+    toPtr msg (CounterFactory'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
+newtype CounterFactory'newCounter'params msg
+    = CounterFactory'newCounter'params'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (CounterFactory'newCounter'params msg)) where
+    fromStruct struct = (Std_.pure (CounterFactory'newCounter'params'newtype_ struct))
+instance (Classes.ToStruct msg (CounterFactory'newCounter'params msg)) where
+    toStruct (CounterFactory'newCounter'params'newtype_ struct) = struct
+instance (Untyped.HasMessage (CounterFactory'newCounter'params mut) mut) where
+    message (CounterFactory'newCounter'params'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (CounterFactory'newCounter'params mut) mut) where
+    messageDefault msg = (CounterFactory'newCounter'params'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (CounterFactory'newCounter'params msg)) where
+    fromPtr msg ptr = (CounterFactory'newCounter'params'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (CounterFactory'newCounter'params (Message.Mut s))) where
+    toPtr msg (CounterFactory'newCounter'params'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (CounterFactory'newCounter'params (Message.Mut s))) where
+    new msg = (CounterFactory'newCounter'params'newtype_ <$> (Untyped.allocStruct msg 1 0))
+instance (Basics.ListElem mut (CounterFactory'newCounter'params mut)) where
+    newtype List mut (CounterFactory'newCounter'params mut)
+        = CounterFactory'newCounter'params'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (CounterFactory'newCounter'params'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (CounterFactory'newCounter'params'List_ l) = (Untyped.ListStruct l)
+    length (CounterFactory'newCounter'params'List_ l) = (Untyped.length l)
+    index i (CounterFactory'newCounter'params'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (CounterFactory'newCounter'params (Message.Mut s))) where
+    setIndex (CounterFactory'newCounter'params'newtype_ elt) i (CounterFactory'newCounter'params'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (CounterFactory'newCounter'params'List_ <$> (Untyped.allocCompositeList msg 1 0 len))
+get_CounterFactory'newCounter'params'start :: ((Untyped.ReadCtx m msg)) => (CounterFactory'newCounter'params msg) -> (m Std_.Word32)
+get_CounterFactory'newCounter'params'start (CounterFactory'newCounter'params'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
+set_CounterFactory'newCounter'params'start :: ((Untyped.RWCtx m s)) => (CounterFactory'newCounter'params (Message.Mut s)) -> Std_.Word32 -> (m ())
+set_CounterFactory'newCounter'params'start (CounterFactory'newCounter'params'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 0)
+newtype CounterFactory'newCounter'results msg
+    = CounterFactory'newCounter'results'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (CounterFactory'newCounter'results msg)) where
+    fromStruct struct = (Std_.pure (CounterFactory'newCounter'results'newtype_ struct))
+instance (Classes.ToStruct msg (CounterFactory'newCounter'results msg)) where
+    toStruct (CounterFactory'newCounter'results'newtype_ struct) = struct
+instance (Untyped.HasMessage (CounterFactory'newCounter'results mut) mut) where
+    message (CounterFactory'newCounter'results'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (CounterFactory'newCounter'results mut) mut) where
+    messageDefault msg = (CounterFactory'newCounter'results'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (CounterFactory'newCounter'results msg)) where
+    fromPtr msg ptr = (CounterFactory'newCounter'results'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (CounterFactory'newCounter'results (Message.Mut s))) where
+    toPtr msg (CounterFactory'newCounter'results'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (CounterFactory'newCounter'results (Message.Mut s))) where
+    new msg = (CounterFactory'newCounter'results'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (CounterFactory'newCounter'results mut)) where
+    newtype List mut (CounterFactory'newCounter'results mut)
+        = CounterFactory'newCounter'results'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (CounterFactory'newCounter'results'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (CounterFactory'newCounter'results'List_ l) = (Untyped.ListStruct l)
+    length (CounterFactory'newCounter'results'List_ l) = (Untyped.length l)
+    index i (CounterFactory'newCounter'results'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (CounterFactory'newCounter'results (Message.Mut s))) where
+    setIndex (CounterFactory'newCounter'results'newtype_ elt) i (CounterFactory'newCounter'results'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (CounterFactory'newCounter'results'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_CounterFactory'newCounter'results'counter :: ((Untyped.ReadCtx m msg)
+                                                 ,(Classes.FromPtr msg (CallSequence msg))) => (CounterFactory'newCounter'results msg) -> (m (CallSequence msg))
+get_CounterFactory'newCounter'results'counter (CounterFactory'newCounter'results'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_CounterFactory'newCounter'results'counter :: ((Untyped.RWCtx m s)
+                                                 ,(Classes.ToPtr s (CallSequence (Message.Mut s)))) => (CounterFactory'newCounter'results (Message.Mut s)) -> (CallSequence (Message.Mut s)) -> (m ())
+set_CounterFactory'newCounter'results'counter (CounterFactory'newCounter'results'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_CounterFactory'newCounter'results'counter :: ((Untyped.ReadCtx m msg)) => (CounterFactory'newCounter'results msg) -> (m Std_.Bool)
+has_CounterFactory'newCounter'results'counter (CounterFactory'newCounter'results'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+newtype CounterAcceptor msg
+    = CounterAcceptor'newtype_ (Std_.Maybe (Untyped.Cap msg))
+instance (Classes.FromPtr msg (CounterAcceptor msg)) where
+    fromPtr msg ptr = (CounterAcceptor'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (CounterAcceptor (Message.Mut s))) where
+    toPtr msg (CounterAcceptor'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
+    toPtr msg (CounterAcceptor'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
+newtype CounterAcceptor'accept'params msg
+    = CounterAcceptor'accept'params'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (CounterAcceptor'accept'params msg)) where
+    fromStruct struct = (Std_.pure (CounterAcceptor'accept'params'newtype_ struct))
+instance (Classes.ToStruct msg (CounterAcceptor'accept'params msg)) where
+    toStruct (CounterAcceptor'accept'params'newtype_ struct) = struct
+instance (Untyped.HasMessage (CounterAcceptor'accept'params mut) mut) where
+    message (CounterAcceptor'accept'params'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (CounterAcceptor'accept'params mut) mut) where
+    messageDefault msg = (CounterAcceptor'accept'params'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (CounterAcceptor'accept'params msg)) where
+    fromPtr msg ptr = (CounterAcceptor'accept'params'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (CounterAcceptor'accept'params (Message.Mut s))) where
+    toPtr msg (CounterAcceptor'accept'params'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (CounterAcceptor'accept'params (Message.Mut s))) where
+    new msg = (CounterAcceptor'accept'params'newtype_ <$> (Untyped.allocStruct msg 0 1))
+instance (Basics.ListElem mut (CounterAcceptor'accept'params mut)) where
+    newtype List mut (CounterAcceptor'accept'params mut)
+        = CounterAcceptor'accept'params'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (CounterAcceptor'accept'params'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (CounterAcceptor'accept'params'List_ l) = (Untyped.ListStruct l)
+    length (CounterAcceptor'accept'params'List_ l) = (Untyped.length l)
+    index i (CounterAcceptor'accept'params'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (CounterAcceptor'accept'params (Message.Mut s))) where
+    setIndex (CounterAcceptor'accept'params'newtype_ elt) i (CounterAcceptor'accept'params'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (CounterAcceptor'accept'params'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
+get_CounterAcceptor'accept'params'counter :: ((Untyped.ReadCtx m msg)
+                                             ,(Classes.FromPtr msg (CallSequence msg))) => (CounterAcceptor'accept'params msg) -> (m (CallSequence msg))
+get_CounterAcceptor'accept'params'counter (CounterAcceptor'accept'params'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_CounterAcceptor'accept'params'counter :: ((Untyped.RWCtx m s)
+                                             ,(Classes.ToPtr s (CallSequence (Message.Mut s)))) => (CounterAcceptor'accept'params (Message.Mut s)) -> (CallSequence (Message.Mut s)) -> (m ())
+set_CounterAcceptor'accept'params'counter (CounterAcceptor'accept'params'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_CounterAcceptor'accept'params'counter :: ((Untyped.ReadCtx m msg)) => (CounterAcceptor'accept'params msg) -> (m Std_.Bool)
+has_CounterAcceptor'accept'params'counter (CounterAcceptor'accept'params'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+newtype CounterAcceptor'accept'results msg
+    = CounterAcceptor'accept'results'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (CounterAcceptor'accept'results msg)) where
+    fromStruct struct = (Std_.pure (CounterAcceptor'accept'results'newtype_ struct))
+instance (Classes.ToStruct msg (CounterAcceptor'accept'results msg)) where
+    toStruct (CounterAcceptor'accept'results'newtype_ struct) = struct
+instance (Untyped.HasMessage (CounterAcceptor'accept'results mut) mut) where
+    message (CounterAcceptor'accept'results'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (CounterAcceptor'accept'results mut) mut) where
+    messageDefault msg = (CounterAcceptor'accept'results'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (CounterAcceptor'accept'results msg)) where
+    fromPtr msg ptr = (CounterAcceptor'accept'results'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (CounterAcceptor'accept'results (Message.Mut s))) where
+    toPtr msg (CounterAcceptor'accept'results'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (CounterAcceptor'accept'results (Message.Mut s))) where
+    new msg = (CounterAcceptor'accept'results'newtype_ <$> (Untyped.allocStruct msg 0 0))
+instance (Basics.ListElem mut (CounterAcceptor'accept'results mut)) where
+    newtype List mut (CounterAcceptor'accept'results mut)
+        = CounterAcceptor'accept'results'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (CounterAcceptor'accept'results'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (CounterAcceptor'accept'results'List_ l) = (Untyped.ListStruct l)
+    length (CounterAcceptor'accept'results'List_ l) = (Untyped.length l)
+    index i (CounterAcceptor'accept'results'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (CounterAcceptor'accept'results (Message.Mut s))) where
+    setIndex (CounterAcceptor'accept'results'newtype_ elt) i (CounterAcceptor'accept'results'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (CounterAcceptor'accept'results'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
+newtype Top msg
+    = Top'newtype_ (Std_.Maybe (Untyped.Cap msg))
+instance (Classes.FromPtr msg (Top msg)) where
+    fromPtr msg ptr = (Top'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Top (Message.Mut s))) where
+    toPtr msg (Top'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
+    toPtr msg (Top'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
+newtype Top'top'params msg
+    = Top'top'params'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Top'top'params msg)) where
+    fromStruct struct = (Std_.pure (Top'top'params'newtype_ struct))
+instance (Classes.ToStruct msg (Top'top'params msg)) where
+    toStruct (Top'top'params'newtype_ struct) = struct
+instance (Untyped.HasMessage (Top'top'params mut) mut) where
+    message (Top'top'params'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Top'top'params mut) mut) where
+    messageDefault msg = (Top'top'params'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Top'top'params msg)) where
+    fromPtr msg ptr = (Top'top'params'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Top'top'params (Message.Mut s))) where
+    toPtr msg (Top'top'params'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Top'top'params (Message.Mut s))) where
+    new msg = (Top'top'params'newtype_ <$> (Untyped.allocStruct msg 0 0))
+instance (Basics.ListElem mut (Top'top'params mut)) where
+    newtype List mut (Top'top'params mut)
+        = Top'top'params'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Top'top'params'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Top'top'params'List_ l) = (Untyped.ListStruct l)
+    length (Top'top'params'List_ l) = (Untyped.length l)
+    index i (Top'top'params'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Top'top'params (Message.Mut s))) where
+    setIndex (Top'top'params'newtype_ elt) i (Top'top'params'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Top'top'params'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
+newtype Top'top'results msg
+    = Top'top'results'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Top'top'results msg)) where
+    fromStruct struct = (Std_.pure (Top'top'results'newtype_ struct))
+instance (Classes.ToStruct msg (Top'top'results msg)) where
+    toStruct (Top'top'results'newtype_ struct) = struct
+instance (Untyped.HasMessage (Top'top'results mut) mut) where
+    message (Top'top'results'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Top'top'results mut) mut) where
+    messageDefault msg = (Top'top'results'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Top'top'results msg)) where
+    fromPtr msg ptr = (Top'top'results'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Top'top'results (Message.Mut s))) where
+    toPtr msg (Top'top'results'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Top'top'results (Message.Mut s))) where
+    new msg = (Top'top'results'newtype_ <$> (Untyped.allocStruct msg 0 0))
+instance (Basics.ListElem mut (Top'top'results mut)) where
+    newtype List mut (Top'top'results mut)
+        = Top'top'results'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Top'top'results'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Top'top'results'List_ l) = (Untyped.ListStruct l)
+    length (Top'top'results'List_ l) = (Untyped.length l)
+    index i (Top'top'results'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Top'top'results (Message.Mut s))) where
+    setIndex (Top'top'results'newtype_ elt) i (Top'top'results'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Top'top'results'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
+newtype Left msg
+    = Left'newtype_ (Std_.Maybe (Untyped.Cap msg))
+instance (Classes.FromPtr msg (Left msg)) where
+    fromPtr msg ptr = (Left'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Left (Message.Mut s))) where
+    toPtr msg (Left'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
+    toPtr msg (Left'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
+newtype Left'left'params msg
+    = Left'left'params'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Left'left'params msg)) where
+    fromStruct struct = (Std_.pure (Left'left'params'newtype_ struct))
+instance (Classes.ToStruct msg (Left'left'params msg)) where
+    toStruct (Left'left'params'newtype_ struct) = struct
+instance (Untyped.HasMessage (Left'left'params mut) mut) where
+    message (Left'left'params'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Left'left'params mut) mut) where
+    messageDefault msg = (Left'left'params'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Left'left'params msg)) where
+    fromPtr msg ptr = (Left'left'params'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Left'left'params (Message.Mut s))) where
+    toPtr msg (Left'left'params'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Left'left'params (Message.Mut s))) where
+    new msg = (Left'left'params'newtype_ <$> (Untyped.allocStruct msg 0 0))
+instance (Basics.ListElem mut (Left'left'params mut)) where
+    newtype List mut (Left'left'params mut)
+        = Left'left'params'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Left'left'params'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Left'left'params'List_ l) = (Untyped.ListStruct l)
+    length (Left'left'params'List_ l) = (Untyped.length l)
+    index i (Left'left'params'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Left'left'params (Message.Mut s))) where
+    setIndex (Left'left'params'newtype_ elt) i (Left'left'params'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Left'left'params'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
+newtype Left'left'results msg
+    = Left'left'results'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Left'left'results msg)) where
+    fromStruct struct = (Std_.pure (Left'left'results'newtype_ struct))
+instance (Classes.ToStruct msg (Left'left'results msg)) where
+    toStruct (Left'left'results'newtype_ struct) = struct
+instance (Untyped.HasMessage (Left'left'results mut) mut) where
+    message (Left'left'results'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Left'left'results mut) mut) where
+    messageDefault msg = (Left'left'results'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Left'left'results msg)) where
+    fromPtr msg ptr = (Left'left'results'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Left'left'results (Message.Mut s))) where
+    toPtr msg (Left'left'results'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Left'left'results (Message.Mut s))) where
+    new msg = (Left'left'results'newtype_ <$> (Untyped.allocStruct msg 0 0))
+instance (Basics.ListElem mut (Left'left'results mut)) where
+    newtype List mut (Left'left'results mut)
+        = Left'left'results'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Left'left'results'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Left'left'results'List_ l) = (Untyped.ListStruct l)
+    length (Left'left'results'List_ l) = (Untyped.length l)
+    index i (Left'left'results'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Left'left'results (Message.Mut s))) where
+    setIndex (Left'left'results'newtype_ elt) i (Left'left'results'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Left'left'results'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
+newtype Right msg
+    = Right'newtype_ (Std_.Maybe (Untyped.Cap msg))
+instance (Classes.FromPtr msg (Right msg)) where
+    fromPtr msg ptr = (Right'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Right (Message.Mut s))) where
+    toPtr msg (Right'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
+    toPtr msg (Right'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
+newtype Right'right'params msg
+    = Right'right'params'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Right'right'params msg)) where
+    fromStruct struct = (Std_.pure (Right'right'params'newtype_ struct))
+instance (Classes.ToStruct msg (Right'right'params msg)) where
+    toStruct (Right'right'params'newtype_ struct) = struct
+instance (Untyped.HasMessage (Right'right'params mut) mut) where
+    message (Right'right'params'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Right'right'params mut) mut) where
+    messageDefault msg = (Right'right'params'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Right'right'params msg)) where
+    fromPtr msg ptr = (Right'right'params'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Right'right'params (Message.Mut s))) where
+    toPtr msg (Right'right'params'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Right'right'params (Message.Mut s))) where
+    new msg = (Right'right'params'newtype_ <$> (Untyped.allocStruct msg 0 0))
+instance (Basics.ListElem mut (Right'right'params mut)) where
+    newtype List mut (Right'right'params mut)
+        = Right'right'params'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Right'right'params'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Right'right'params'List_ l) = (Untyped.ListStruct l)
+    length (Right'right'params'List_ l) = (Untyped.length l)
+    index i (Right'right'params'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Right'right'params (Message.Mut s))) where
+    setIndex (Right'right'params'newtype_ elt) i (Right'right'params'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Right'right'params'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
+newtype Right'right'results msg
+    = Right'right'results'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Right'right'results msg)) where
+    fromStruct struct = (Std_.pure (Right'right'results'newtype_ struct))
+instance (Classes.ToStruct msg (Right'right'results msg)) where
+    toStruct (Right'right'results'newtype_ struct) = struct
+instance (Untyped.HasMessage (Right'right'results mut) mut) where
+    message (Right'right'results'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Right'right'results mut) mut) where
+    messageDefault msg = (Right'right'results'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Right'right'results msg)) where
+    fromPtr msg ptr = (Right'right'results'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Right'right'results (Message.Mut s))) where
+    toPtr msg (Right'right'results'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Right'right'results (Message.Mut s))) where
+    new msg = (Right'right'results'newtype_ <$> (Untyped.allocStruct msg 0 0))
+instance (Basics.ListElem mut (Right'right'results mut)) where
+    newtype List mut (Right'right'results mut)
+        = Right'right'results'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Right'right'results'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Right'right'results'List_ l) = (Untyped.ListStruct l)
+    length (Right'right'results'List_ l) = (Untyped.length l)
+    index i (Right'right'results'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Right'right'results (Message.Mut s))) where
+    setIndex (Right'right'results'newtype_ elt) i (Right'right'results'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Right'right'results'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
+newtype Bottom msg
+    = Bottom'newtype_ (Std_.Maybe (Untyped.Cap msg))
+instance (Classes.FromPtr msg (Bottom msg)) where
+    fromPtr msg ptr = (Bottom'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Bottom (Message.Mut s))) where
+    toPtr msg (Bottom'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
+    toPtr msg (Bottom'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
+newtype Bottom'bottom'params msg
+    = Bottom'bottom'params'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Bottom'bottom'params msg)) where
+    fromStruct struct = (Std_.pure (Bottom'bottom'params'newtype_ struct))
+instance (Classes.ToStruct msg (Bottom'bottom'params msg)) where
+    toStruct (Bottom'bottom'params'newtype_ struct) = struct
+instance (Untyped.HasMessage (Bottom'bottom'params mut) mut) where
+    message (Bottom'bottom'params'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Bottom'bottom'params mut) mut) where
+    messageDefault msg = (Bottom'bottom'params'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Bottom'bottom'params msg)) where
+    fromPtr msg ptr = (Bottom'bottom'params'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Bottom'bottom'params (Message.Mut s))) where
+    toPtr msg (Bottom'bottom'params'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Bottom'bottom'params (Message.Mut s))) where
+    new msg = (Bottom'bottom'params'newtype_ <$> (Untyped.allocStruct msg 0 0))
+instance (Basics.ListElem mut (Bottom'bottom'params mut)) where
+    newtype List mut (Bottom'bottom'params mut)
+        = Bottom'bottom'params'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Bottom'bottom'params'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Bottom'bottom'params'List_ l) = (Untyped.ListStruct l)
+    length (Bottom'bottom'params'List_ l) = (Untyped.length l)
+    index i (Bottom'bottom'params'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Bottom'bottom'params (Message.Mut s))) where
+    setIndex (Bottom'bottom'params'newtype_ elt) i (Bottom'bottom'params'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Bottom'bottom'params'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
+newtype Bottom'bottom'results msg
+    = Bottom'bottom'results'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Bottom'bottom'results msg)) where
+    fromStruct struct = (Std_.pure (Bottom'bottom'results'newtype_ struct))
+instance (Classes.ToStruct msg (Bottom'bottom'results msg)) where
+    toStruct (Bottom'bottom'results'newtype_ struct) = struct
+instance (Untyped.HasMessage (Bottom'bottom'results mut) mut) where
+    message (Bottom'bottom'results'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Bottom'bottom'results mut) mut) where
+    messageDefault msg = (Bottom'bottom'results'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Bottom'bottom'results msg)) where
+    fromPtr msg ptr = (Bottom'bottom'results'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Bottom'bottom'results (Message.Mut s))) where
+    toPtr msg (Bottom'bottom'results'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Bottom'bottom'results (Message.Mut s))) where
+    new msg = (Bottom'bottom'results'newtype_ <$> (Untyped.allocStruct msg 0 0))
+instance (Basics.ListElem mut (Bottom'bottom'results mut)) where
+    newtype List mut (Bottom'bottom'results mut)
+        = Bottom'bottom'results'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Bottom'bottom'results'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Bottom'bottom'results'List_ l) = (Untyped.ListStruct l)
+    length (Bottom'bottom'results'List_ l) = (Untyped.length l)
+    index i (Bottom'bottom'results'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Bottom'bottom'results (Message.Mut s))) where
+    setIndex (Bottom'bottom'results'newtype_ elt) i (Bottom'bottom'results'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Bottom'bottom'results'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
+newtype Defaults msg
+    = Defaults'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (Defaults msg)) where
+    fromStruct struct = (Std_.pure (Defaults'newtype_ struct))
+instance (Classes.ToStruct msg (Defaults msg)) where
+    toStruct (Defaults'newtype_ struct) = struct
+instance (Untyped.HasMessage (Defaults mut) mut) where
+    message (Defaults'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (Defaults mut) mut) where
+    messageDefault msg = (Defaults'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (Defaults msg)) where
+    fromPtr msg ptr = (Defaults'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (Defaults (Message.Mut s))) where
+    toPtr msg (Defaults'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (Defaults (Message.Mut s))) where
+    new msg = (Defaults'newtype_ <$> (Untyped.allocStruct msg 2 2))
+instance (Basics.ListElem mut (Defaults mut)) where
+    newtype List mut (Defaults mut)
+        = Defaults'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (Defaults'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (Defaults'List_ l) = (Untyped.ListStruct l)
+    length (Defaults'List_ l) = (Untyped.length l)
+    index i (Defaults'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (Defaults (Message.Mut s))) where
+    setIndex (Defaults'newtype_ elt) i (Defaults'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (Defaults'List_ <$> (Untyped.allocCompositeList msg 2 2 len))
+get_Defaults'text :: ((Untyped.ReadCtx m msg)
+                     ,(Classes.FromPtr msg (Basics.Text msg))) => (Defaults msg) -> (m (Basics.Text msg))
+get_Defaults'text (Defaults'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_Defaults'text :: ((Untyped.RWCtx m s)
+                     ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Defaults (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
+set_Defaults'text (Defaults'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_Defaults'text :: ((Untyped.ReadCtx m msg)) => (Defaults msg) -> (m Std_.Bool)
+has_Defaults'text (Defaults'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_Defaults'text :: ((Untyped.RWCtx m s)) => Std_.Int -> (Defaults (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
+new_Defaults'text len struct = (do
+    result <- (Basics.newText (Untyped.message struct) len)
+    (set_Defaults'text struct result)
+    (Std_.pure result)
+    )
+get_Defaults'data_ :: ((Untyped.ReadCtx m msg)
+                      ,(Classes.FromPtr msg (Basics.Data msg))) => (Defaults msg) -> (m (Basics.Data msg))
+get_Defaults'data_ (Defaults'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 1 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_Defaults'data_ :: ((Untyped.RWCtx m s)
+                      ,(Classes.ToPtr s (Basics.Data (Message.Mut s)))) => (Defaults (Message.Mut s)) -> (Basics.Data (Message.Mut s)) -> (m ())
+set_Defaults'data_ (Defaults'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 1 struct)
+    )
+has_Defaults'data_ :: ((Untyped.ReadCtx m msg)) => (Defaults msg) -> (m Std_.Bool)
+has_Defaults'data_ (Defaults'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
+new_Defaults'data_ :: ((Untyped.RWCtx m s)) => Std_.Int -> (Defaults (Message.Mut s)) -> (m (Basics.Data (Message.Mut s)))
+new_Defaults'data_ len struct = (do
+    result <- (Basics.newData (Untyped.message struct) len)
+    (set_Defaults'data_ struct result)
+    (Std_.pure result)
+    )
+get_Defaults'float :: ((Untyped.ReadCtx m msg)) => (Defaults msg) -> (m Std_.Float)
+get_Defaults'float (Defaults'newtype_ struct) = (GenHelpers.getWordField struct 0 0 1078523331)
+set_Defaults'float :: ((Untyped.RWCtx m s)) => (Defaults (Message.Mut s)) -> Std_.Float -> (m ())
+set_Defaults'float (Defaults'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 0 1078523331)
+get_Defaults'int :: ((Untyped.ReadCtx m msg)) => (Defaults msg) -> (m Std_.Int32)
+get_Defaults'int (Defaults'newtype_ struct) = (GenHelpers.getWordField struct 0 32 18446744073709551493)
+set_Defaults'int :: ((Untyped.RWCtx m s)) => (Defaults (Message.Mut s)) -> Std_.Int32 -> (m ())
+set_Defaults'int (Defaults'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 0 32 18446744073709551493)
+get_Defaults'uint :: ((Untyped.ReadCtx m msg)) => (Defaults msg) -> (m Std_.Word32)
+get_Defaults'uint (Defaults'newtype_ struct) = (GenHelpers.getWordField struct 1 0 42)
+set_Defaults'uint :: ((Untyped.RWCtx m s)) => (Defaults (Message.Mut s)) -> Std_.Word32 -> (m ())
+set_Defaults'uint (Defaults'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 1 0 42)
+newtype BenchmarkA msg
+    = BenchmarkA'newtype_ (Untyped.Struct msg)
+instance (Classes.FromStruct msg (BenchmarkA msg)) where
+    fromStruct struct = (Std_.pure (BenchmarkA'newtype_ struct))
+instance (Classes.ToStruct msg (BenchmarkA msg)) where
+    toStruct (BenchmarkA'newtype_ struct) = struct
+instance (Untyped.HasMessage (BenchmarkA mut) mut) where
+    message (BenchmarkA'newtype_ struct) = (Untyped.message struct)
+instance (Untyped.MessageDefault (BenchmarkA mut) mut) where
+    messageDefault msg = (BenchmarkA'newtype_ <$> (Untyped.messageDefault msg))
+instance (Classes.FromPtr msg (BenchmarkA msg)) where
+    fromPtr msg ptr = (BenchmarkA'newtype_ <$> (Classes.fromPtr msg ptr))
+instance (Classes.ToPtr s (BenchmarkA (Message.Mut s))) where
+    toPtr msg (BenchmarkA'newtype_ struct) = (Classes.toPtr msg struct)
+instance (Classes.Allocate s (BenchmarkA (Message.Mut s))) where
+    new msg = (BenchmarkA'newtype_ <$> (Untyped.allocStruct msg 3 2))
+instance (Basics.ListElem mut (BenchmarkA mut)) where
+    newtype List mut (BenchmarkA mut)
+        = BenchmarkA'List_ (Untyped.ListOf mut (Untyped.Struct mut))
+    listFromPtr msg ptr = (BenchmarkA'List_ <$> (Classes.fromPtr msg ptr))
+    toUntypedList (BenchmarkA'List_ l) = (Untyped.ListStruct l)
+    length (BenchmarkA'List_ l) = (Untyped.length l)
+    index i (BenchmarkA'List_ l) = (do
+        elt <- (Untyped.index i l)
+        (Classes.fromStruct elt)
+        )
+instance (Basics.MutListElem s (BenchmarkA (Message.Mut s))) where
+    setIndex (BenchmarkA'newtype_ elt) i (BenchmarkA'List_ l) = (Untyped.setIndex elt i l)
+    newList msg len = (BenchmarkA'List_ <$> (Untyped.allocCompositeList msg 3 2 len))
+get_BenchmarkA'name :: ((Untyped.ReadCtx m msg)
+                       ,(Classes.FromPtr msg (Basics.Text msg))) => (BenchmarkA msg) -> (m (Basics.Text msg))
+get_BenchmarkA'name (BenchmarkA'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 0 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_BenchmarkA'name :: ((Untyped.RWCtx m s)
+                       ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (BenchmarkA (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
+set_BenchmarkA'name (BenchmarkA'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 0 struct)
+    )
+has_BenchmarkA'name :: ((Untyped.ReadCtx m msg)) => (BenchmarkA msg) -> (m Std_.Bool)
+has_BenchmarkA'name (BenchmarkA'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
+new_BenchmarkA'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (BenchmarkA (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
+new_BenchmarkA'name len struct = (do
+    result <- (Basics.newText (Untyped.message struct) len)
+    (set_BenchmarkA'name struct result)
+    (Std_.pure result)
+    )
+get_BenchmarkA'birthDay :: ((Untyped.ReadCtx m msg)) => (BenchmarkA msg) -> (m Std_.Int64)
+get_BenchmarkA'birthDay (BenchmarkA'newtype_ struct) = (GenHelpers.getWordField struct 0 0 0)
+set_BenchmarkA'birthDay :: ((Untyped.RWCtx m s)) => (BenchmarkA (Message.Mut s)) -> Std_.Int64 -> (m ())
+set_BenchmarkA'birthDay (BenchmarkA'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 0 0 0)
+get_BenchmarkA'phone :: ((Untyped.ReadCtx m msg)
+                        ,(Classes.FromPtr msg (Basics.Text msg))) => (BenchmarkA msg) -> (m (Basics.Text msg))
+get_BenchmarkA'phone (BenchmarkA'newtype_ struct) = (do
+    ptr <- (Untyped.getPtr 1 struct)
+    (Classes.fromPtr (Untyped.message struct) ptr)
+    )
+set_BenchmarkA'phone :: ((Untyped.RWCtx m s)
+                        ,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (BenchmarkA (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
+set_BenchmarkA'phone (BenchmarkA'newtype_ struct) value = (do
+    ptr <- (Classes.toPtr (Untyped.message struct) value)
+    (Untyped.setPtr ptr 1 struct)
+    )
+has_BenchmarkA'phone :: ((Untyped.ReadCtx m msg)) => (BenchmarkA msg) -> (m Std_.Bool)
+has_BenchmarkA'phone (BenchmarkA'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
+new_BenchmarkA'phone :: ((Untyped.RWCtx m s)) => Std_.Int -> (BenchmarkA (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
+new_BenchmarkA'phone len struct = (do
+    result <- (Basics.newText (Untyped.message struct) len)
+    (set_BenchmarkA'phone struct result)
+    (Std_.pure result)
+    )
+get_BenchmarkA'siblings :: ((Untyped.ReadCtx m msg)) => (BenchmarkA msg) -> (m Std_.Int32)
+get_BenchmarkA'siblings (BenchmarkA'newtype_ struct) = (GenHelpers.getWordField struct 1 0 0)
+set_BenchmarkA'siblings :: ((Untyped.RWCtx m s)) => (BenchmarkA (Message.Mut s)) -> Std_.Int32 -> (m ())
+set_BenchmarkA'siblings (BenchmarkA'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word32) 1 0 0)
+get_BenchmarkA'spouse :: ((Untyped.ReadCtx m msg)) => (BenchmarkA msg) -> (m Std_.Bool)
+get_BenchmarkA'spouse (BenchmarkA'newtype_ struct) = (GenHelpers.getWordField struct 1 32 0)
+set_BenchmarkA'spouse :: ((Untyped.RWCtx m s)) => (BenchmarkA (Message.Mut s)) -> Std_.Bool -> (m ())
+set_BenchmarkA'spouse (BenchmarkA'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word1) 1 32 0)
+get_BenchmarkA'money :: ((Untyped.ReadCtx m msg)) => (BenchmarkA msg) -> (m Std_.Double)
+get_BenchmarkA'money (BenchmarkA'newtype_ struct) = (GenHelpers.getWordField struct 2 0 0)
+set_BenchmarkA'money :: ((Untyped.RWCtx m s)) => (BenchmarkA (Message.Mut s)) -> Std_.Double -> (m ())
 set_BenchmarkA'money (BenchmarkA'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word64) 2 0 0)
diff --git a/gen/tests/Capnp/Gen/Aircraft/Pure.hs b/gen/tests/Capnp/Gen/Aircraft/Pure.hs
--- a/gen/tests/Capnp/Gen/Aircraft/Pure.hs
+++ b/gen/tests/Capnp/Gen/Aircraft/Pure.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds #-}
 {-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE DuplicateRecordFields #-}
 {-# LANGUAGE FlexibleContexts #-}
@@ -11,6 +12,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.Aircraft.Pure(Capnp.Gen.ById.X832bcc6686a26d56.Airport(..)
                               ,constDate
                               ,constList
@@ -136,7 +138,7 @@
             ,Generics.Generic)
 instance (Default.Default (Zdate)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Zdate)) where
+instance (Classes.FromStruct Message.Const (Zdate)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Zdate)) where
     type Cerial msg (Zdate) = (Capnp.Gen.ById.X832bcc6686a26d56.Zdate msg)
@@ -175,7 +177,7 @@
             ,Generics.Generic)
 instance (Default.Default (Zdata)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Zdata)) where
+instance (Classes.FromStruct Message.Const (Zdata)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Zdata)) where
     type Cerial msg (Zdata) = (Capnp.Gen.ById.X832bcc6686a26d56.Zdata msg)
@@ -215,7 +217,7 @@
             ,Generics.Generic)
 instance (Default.Default (PlaneBase)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (PlaneBase)) where
+instance (Classes.FromStruct Message.Const (PlaneBase)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (PlaneBase)) where
     type Cerial msg (PlaneBase) = (Capnp.Gen.ById.X832bcc6686a26d56.PlaneBase msg)
@@ -260,7 +262,7 @@
             ,Generics.Generic)
 instance (Default.Default (B737)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (B737)) where
+instance (Classes.FromStruct Message.Const (B737)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (B737)) where
     type Cerial msg (B737) = (Capnp.Gen.ById.X832bcc6686a26d56.B737 msg)
@@ -295,7 +297,7 @@
             ,Generics.Generic)
 instance (Default.Default (A320)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (A320)) where
+instance (Classes.FromStruct Message.Const (A320)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (A320)) where
     type Cerial msg (A320) = (Capnp.Gen.ById.X832bcc6686a26d56.A320 msg)
@@ -330,7 +332,7 @@
             ,Generics.Generic)
 instance (Default.Default (F16)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (F16)) where
+instance (Classes.FromStruct Message.Const (F16)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (F16)) where
     type Cerial msg (F16) = (Capnp.Gen.ById.X832bcc6686a26d56.F16 msg)
@@ -370,7 +372,7 @@
             ,Generics.Generic)
 instance (Default.Default (Regression)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Regression)) where
+instance (Classes.FromStruct Message.Const (Regression)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Regression)) where
     type Cerial msg (Regression) = (Capnp.Gen.ById.X832bcc6686a26d56.Regression msg)
@@ -418,7 +420,7 @@
             ,Generics.Generic)
 instance (Default.Default (Aircraft)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Aircraft)) where
+instance (Classes.FromStruct Message.Const (Aircraft)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Aircraft)) where
     type Cerial msg (Aircraft) = (Capnp.Gen.ById.X832bcc6686a26d56.Aircraft msg)
@@ -515,7 +517,7 @@
             ,Generics.Generic)
 instance (Default.Default (Z)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Z)) where
+instance (Classes.FromStruct Message.Const (Z)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Z)) where
     type Cerial msg (Z) = (Capnp.Gen.ById.X832bcc6686a26d56.Z msg)
@@ -736,7 +738,7 @@
             ,Generics.Generic)
 instance (Default.Default (Z'grp)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Z'grp)) where
+instance (Classes.FromStruct Message.Const (Z'grp)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Z'grp)) where
     type Cerial msg (Z'grp) = (Capnp.Gen.ById.X832bcc6686a26d56.Z'grp msg)
@@ -760,7 +762,7 @@
             ,Generics.Generic)
 instance (Default.Default (Counter)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Counter)) where
+instance (Classes.FromStruct Message.Const (Counter)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Counter)) where
     type Cerial msg (Counter) = (Capnp.Gen.ById.X832bcc6686a26d56.Counter msg)
@@ -799,7 +801,7 @@
             ,Generics.Generic)
 instance (Default.Default (Bag)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Bag)) where
+instance (Classes.FromStruct Message.Const (Bag)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Bag)) where
     type Cerial msg (Bag) = (Capnp.Gen.ById.X832bcc6686a26d56.Bag msg)
@@ -834,7 +836,7 @@
             ,Generics.Generic)
 instance (Default.Default (Zserver)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Zserver)) where
+instance (Classes.FromStruct Message.Const (Zserver)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Zserver)) where
     type Cerial msg (Zserver) = (Capnp.Gen.ById.X832bcc6686a26d56.Zserver msg)
@@ -870,7 +872,7 @@
             ,Generics.Generic)
 instance (Default.Default (Zjob)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Zjob)) where
+instance (Classes.FromStruct Message.Const (Zjob)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Zjob)) where
     type Cerial msg (Zjob) = (Capnp.Gen.ById.X832bcc6686a26d56.Zjob msg)
@@ -907,7 +909,7 @@
             ,Generics.Generic)
 instance (Default.Default (VerEmpty)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (VerEmpty)) where
+instance (Classes.FromStruct Message.Const (VerEmpty)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (VerEmpty)) where
     type Cerial msg (VerEmpty) = (Capnp.Gen.ById.X832bcc6686a26d56.VerEmpty msg)
@@ -941,7 +943,7 @@
             ,Generics.Generic)
 instance (Default.Default (VerOneData)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (VerOneData)) where
+instance (Classes.FromStruct Message.Const (VerOneData)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (VerOneData)) where
     type Cerial msg (VerOneData) = (Capnp.Gen.ById.X832bcc6686a26d56.VerOneData msg)
@@ -977,7 +979,7 @@
             ,Generics.Generic)
 instance (Default.Default (VerTwoData)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (VerTwoData)) where
+instance (Classes.FromStruct Message.Const (VerTwoData)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (VerTwoData)) where
     type Cerial msg (VerTwoData) = (Capnp.Gen.ById.X832bcc6686a26d56.VerTwoData msg)
@@ -1014,7 +1016,7 @@
             ,Generics.Generic)
 instance (Default.Default (VerOnePtr)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (VerOnePtr)) where
+instance (Classes.FromStruct Message.Const (VerOnePtr)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (VerOnePtr)) where
     type Cerial msg (VerOnePtr) = (Capnp.Gen.ById.X832bcc6686a26d56.VerOnePtr msg)
@@ -1050,7 +1052,7 @@
             ,Generics.Generic)
 instance (Default.Default (VerTwoPtr)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (VerTwoPtr)) where
+instance (Classes.FromStruct Message.Const (VerTwoPtr)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (VerTwoPtr)) where
     type Cerial msg (VerTwoPtr) = (Capnp.Gen.ById.X832bcc6686a26d56.VerTwoPtr msg)
@@ -1090,7 +1092,7 @@
             ,Generics.Generic)
 instance (Default.Default (VerTwoDataTwoPtr)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (VerTwoDataTwoPtr)) where
+instance (Classes.FromStruct Message.Const (VerTwoDataTwoPtr)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (VerTwoDataTwoPtr)) where
     type Cerial msg (VerTwoDataTwoPtr) = (Capnp.Gen.ById.X832bcc6686a26d56.VerTwoDataTwoPtr msg)
@@ -1131,7 +1133,7 @@
             ,Generics.Generic)
 instance (Default.Default (HoldsVerEmptyList)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (HoldsVerEmptyList)) where
+instance (Classes.FromStruct Message.Const (HoldsVerEmptyList)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (HoldsVerEmptyList)) where
     type Cerial msg (HoldsVerEmptyList) = (Capnp.Gen.ById.X832bcc6686a26d56.HoldsVerEmptyList msg)
@@ -1166,7 +1168,7 @@
             ,Generics.Generic)
 instance (Default.Default (HoldsVerOneDataList)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (HoldsVerOneDataList)) where
+instance (Classes.FromStruct Message.Const (HoldsVerOneDataList)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (HoldsVerOneDataList)) where
     type Cerial msg (HoldsVerOneDataList) = (Capnp.Gen.ById.X832bcc6686a26d56.HoldsVerOneDataList msg)
@@ -1201,7 +1203,7 @@
             ,Generics.Generic)
 instance (Default.Default (HoldsVerTwoDataList)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (HoldsVerTwoDataList)) where
+instance (Classes.FromStruct Message.Const (HoldsVerTwoDataList)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (HoldsVerTwoDataList)) where
     type Cerial msg (HoldsVerTwoDataList) = (Capnp.Gen.ById.X832bcc6686a26d56.HoldsVerTwoDataList msg)
@@ -1236,7 +1238,7 @@
             ,Generics.Generic)
 instance (Default.Default (HoldsVerOnePtrList)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (HoldsVerOnePtrList)) where
+instance (Classes.FromStruct Message.Const (HoldsVerOnePtrList)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (HoldsVerOnePtrList)) where
     type Cerial msg (HoldsVerOnePtrList) = (Capnp.Gen.ById.X832bcc6686a26d56.HoldsVerOnePtrList msg)
@@ -1271,7 +1273,7 @@
             ,Generics.Generic)
 instance (Default.Default (HoldsVerTwoPtrList)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (HoldsVerTwoPtrList)) where
+instance (Classes.FromStruct Message.Const (HoldsVerTwoPtrList)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (HoldsVerTwoPtrList)) where
     type Cerial msg (HoldsVerTwoPtrList) = (Capnp.Gen.ById.X832bcc6686a26d56.HoldsVerTwoPtrList msg)
@@ -1306,7 +1308,7 @@
             ,Generics.Generic)
 instance (Default.Default (HoldsVerTwoTwoList)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (HoldsVerTwoTwoList)) where
+instance (Classes.FromStruct Message.Const (HoldsVerTwoTwoList)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (HoldsVerTwoTwoList)) where
     type Cerial msg (HoldsVerTwoTwoList) = (Capnp.Gen.ById.X832bcc6686a26d56.HoldsVerTwoTwoList msg)
@@ -1341,7 +1343,7 @@
             ,Generics.Generic)
 instance (Default.Default (HoldsVerTwoTwoPlus)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (HoldsVerTwoTwoPlus)) where
+instance (Classes.FromStruct Message.Const (HoldsVerTwoTwoPlus)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (HoldsVerTwoTwoPlus)) where
     type Cerial msg (HoldsVerTwoTwoPlus) = (Capnp.Gen.ById.X832bcc6686a26d56.HoldsVerTwoTwoPlus msg)
@@ -1381,7 +1383,7 @@
             ,Generics.Generic)
 instance (Default.Default (VerTwoTwoPlus)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (VerTwoTwoPlus)) where
+instance (Classes.FromStruct Message.Const (VerTwoTwoPlus)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (VerTwoTwoPlus)) where
     type Cerial msg (VerTwoTwoPlus) = (Capnp.Gen.ById.X832bcc6686a26d56.VerTwoTwoPlus msg)
@@ -1428,7 +1430,7 @@
             ,Generics.Generic)
 instance (Default.Default (HoldsText)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (HoldsText)) where
+instance (Classes.FromStruct Message.Const (HoldsText)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (HoldsText)) where
     type Cerial msg (HoldsText) = (Capnp.Gen.ById.X832bcc6686a26d56.HoldsText msg)
@@ -1467,7 +1469,7 @@
             ,Generics.Generic)
 instance (Default.Default (WrapEmpty)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (WrapEmpty)) where
+instance (Classes.FromStruct Message.Const (WrapEmpty)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (WrapEmpty)) where
     type Cerial msg (WrapEmpty) = (Capnp.Gen.ById.X832bcc6686a26d56.WrapEmpty msg)
@@ -1502,7 +1504,7 @@
             ,Generics.Generic)
 instance (Default.Default (Wrap2x2)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Wrap2x2)) where
+instance (Classes.FromStruct Message.Const (Wrap2x2)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Wrap2x2)) where
     type Cerial msg (Wrap2x2) = (Capnp.Gen.ById.X832bcc6686a26d56.Wrap2x2 msg)
@@ -1537,7 +1539,7 @@
             ,Generics.Generic)
 instance (Default.Default (Wrap2x2plus)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Wrap2x2plus)) where
+instance (Classes.FromStruct Message.Const (Wrap2x2plus)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Wrap2x2plus)) where
     type Cerial msg (Wrap2x2plus) = (Capnp.Gen.ById.X832bcc6686a26d56.Wrap2x2plus msg)
@@ -1573,7 +1575,7 @@
             ,Generics.Generic)
 instance (Default.Default (VoidUnion)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (VoidUnion)) where
+instance (Classes.FromStruct Message.Const (VoidUnion)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (VoidUnion)) where
     type Cerial msg (VoidUnion) = (Capnp.Gen.ById.X832bcc6686a26d56.VoidUnion msg)
@@ -1618,7 +1620,7 @@
             ,Generics.Generic)
 instance (Default.Default (Nester1Capn)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Nester1Capn)) where
+instance (Classes.FromStruct Message.Const (Nester1Capn)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Nester1Capn)) where
     type Cerial msg (Nester1Capn) = (Capnp.Gen.ById.X832bcc6686a26d56.Nester1Capn msg)
@@ -1653,7 +1655,7 @@
             ,Generics.Generic)
 instance (Default.Default (RWTestCapn)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (RWTestCapn)) where
+instance (Classes.FromStruct Message.Const (RWTestCapn)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (RWTestCapn)) where
     type Cerial msg (RWTestCapn) = (Capnp.Gen.ById.X832bcc6686a26d56.RWTestCapn msg)
@@ -1688,7 +1690,7 @@
             ,Generics.Generic)
 instance (Default.Default (ListStructCapn)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (ListStructCapn)) where
+instance (Classes.FromStruct Message.Const (ListStructCapn)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (ListStructCapn)) where
     type Cerial msg (ListStructCapn) = (Capnp.Gen.ById.X832bcc6686a26d56.ListStructCapn msg)
@@ -1765,7 +1767,7 @@
             ,Generics.Generic)
 instance (Default.Default (Echo'echo'params)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Echo'echo'params)) where
+instance (Classes.FromStruct Message.Const (Echo'echo'params)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Echo'echo'params)) where
     type Cerial msg (Echo'echo'params) = (Capnp.Gen.ById.X832bcc6686a26d56.Echo'echo'params msg)
@@ -1800,7 +1802,7 @@
             ,Generics.Generic)
 instance (Default.Default (Echo'echo'results)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Echo'echo'results)) where
+instance (Classes.FromStruct Message.Const (Echo'echo'results)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Echo'echo'results)) where
     type Cerial msg (Echo'echo'results) = (Capnp.Gen.ById.X832bcc6686a26d56.Echo'echo'results msg)
@@ -1835,7 +1837,7 @@
             ,Generics.Generic)
 instance (Default.Default (Hoth)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Hoth)) where
+instance (Classes.FromStruct Message.Const (Hoth)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Hoth)) where
     type Cerial msg (Hoth) = (Capnp.Gen.ById.X832bcc6686a26d56.Hoth msg)
@@ -1870,7 +1872,7 @@
             ,Generics.Generic)
 instance (Default.Default (EchoBase)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (EchoBase)) where
+instance (Classes.FromStruct Message.Const (EchoBase)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (EchoBase)) where
     type Cerial msg (EchoBase) = (Capnp.Gen.ById.X832bcc6686a26d56.EchoBase msg)
@@ -1905,7 +1907,7 @@
             ,Generics.Generic)
 instance (Default.Default (EchoBases)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (EchoBases)) where
+instance (Classes.FromStruct Message.Const (EchoBases)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (EchoBases)) where
     type Cerial msg (EchoBases) = (Capnp.Gen.ById.X832bcc6686a26d56.EchoBases msg)
@@ -1941,7 +1943,7 @@
             ,Generics.Generic)
 instance (Default.Default (StackingRoot)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (StackingRoot)) where
+instance (Classes.FromStruct Message.Const (StackingRoot)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (StackingRoot)) where
     type Cerial msg (StackingRoot) = (Capnp.Gen.ById.X832bcc6686a26d56.StackingRoot msg)
@@ -1979,7 +1981,7 @@
             ,Generics.Generic)
 instance (Default.Default (StackingA)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (StackingA)) where
+instance (Classes.FromStruct Message.Const (StackingA)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (StackingA)) where
     type Cerial msg (StackingA) = (Capnp.Gen.ById.X832bcc6686a26d56.StackingA msg)
@@ -2016,7 +2018,7 @@
             ,Generics.Generic)
 instance (Default.Default (StackingB)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (StackingB)) where
+instance (Classes.FromStruct Message.Const (StackingB)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (StackingB)) where
     type Cerial msg (StackingB) = (Capnp.Gen.ById.X832bcc6686a26d56.StackingB msg)
@@ -2093,7 +2095,7 @@
             ,Generics.Generic)
 instance (Default.Default (CallSequence'getNumber'params)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (CallSequence'getNumber'params)) where
+instance (Classes.FromStruct Message.Const (CallSequence'getNumber'params)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (CallSequence'getNumber'params)) where
     type Cerial msg (CallSequence'getNumber'params) = (Capnp.Gen.ById.X832bcc6686a26d56.CallSequence'getNumber'params msg)
@@ -2127,7 +2129,7 @@
             ,Generics.Generic)
 instance (Default.Default (CallSequence'getNumber'results)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (CallSequence'getNumber'results)) where
+instance (Classes.FromStruct Message.Const (CallSequence'getNumber'results)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (CallSequence'getNumber'results)) where
     type Cerial msg (CallSequence'getNumber'results) = (Capnp.Gen.ById.X832bcc6686a26d56.CallSequence'getNumber'results msg)
@@ -2204,7 +2206,7 @@
             ,Generics.Generic)
 instance (Default.Default (CounterFactory'newCounter'params)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (CounterFactory'newCounter'params)) where
+instance (Classes.FromStruct Message.Const (CounterFactory'newCounter'params)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (CounterFactory'newCounter'params)) where
     type Cerial msg (CounterFactory'newCounter'params) = (Capnp.Gen.ById.X832bcc6686a26d56.CounterFactory'newCounter'params msg)
@@ -2239,7 +2241,7 @@
             ,Generics.Generic)
 instance (Default.Default (CounterFactory'newCounter'results)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (CounterFactory'newCounter'results)) where
+instance (Classes.FromStruct Message.Const (CounterFactory'newCounter'results)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (CounterFactory'newCounter'results)) where
     type Cerial msg (CounterFactory'newCounter'results) = (Capnp.Gen.ById.X832bcc6686a26d56.CounterFactory'newCounter'results msg)
@@ -2316,7 +2318,7 @@
             ,Generics.Generic)
 instance (Default.Default (CounterAcceptor'accept'params)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (CounterAcceptor'accept'params)) where
+instance (Classes.FromStruct Message.Const (CounterAcceptor'accept'params)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (CounterAcceptor'accept'params)) where
     type Cerial msg (CounterAcceptor'accept'params) = (Capnp.Gen.ById.X832bcc6686a26d56.CounterAcceptor'accept'params msg)
@@ -2351,7 +2353,7 @@
             ,Generics.Generic)
 instance (Default.Default (CounterAcceptor'accept'results)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (CounterAcceptor'accept'results)) where
+instance (Classes.FromStruct Message.Const (CounterAcceptor'accept'results)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (CounterAcceptor'accept'results)) where
     type Cerial msg (CounterAcceptor'accept'results) = (Capnp.Gen.ById.X832bcc6686a26d56.CounterAcceptor'accept'results msg)
@@ -2427,7 +2429,7 @@
             ,Generics.Generic)
 instance (Default.Default (Top'top'params)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Top'top'params)) where
+instance (Classes.FromStruct Message.Const (Top'top'params)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Top'top'params)) where
     type Cerial msg (Top'top'params) = (Capnp.Gen.ById.X832bcc6686a26d56.Top'top'params msg)
@@ -2461,7 +2463,7 @@
             ,Generics.Generic)
 instance (Default.Default (Top'top'results)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Top'top'results)) where
+instance (Classes.FromStruct Message.Const (Top'top'results)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Top'top'results)) where
     type Cerial msg (Top'top'results) = (Capnp.Gen.ById.X832bcc6686a26d56.Top'top'results msg)
@@ -2545,7 +2547,7 @@
             ,Generics.Generic)
 instance (Default.Default (Left'left'params)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Left'left'params)) where
+instance (Classes.FromStruct Message.Const (Left'left'params)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Left'left'params)) where
     type Cerial msg (Left'left'params) = (Capnp.Gen.ById.X832bcc6686a26d56.Left'left'params msg)
@@ -2579,7 +2581,7 @@
             ,Generics.Generic)
 instance (Default.Default (Left'left'results)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Left'left'results)) where
+instance (Classes.FromStruct Message.Const (Left'left'results)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Left'left'results)) where
     type Cerial msg (Left'left'results) = (Capnp.Gen.ById.X832bcc6686a26d56.Left'left'results msg)
@@ -2663,7 +2665,7 @@
             ,Generics.Generic)
 instance (Default.Default (Right'right'params)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Right'right'params)) where
+instance (Classes.FromStruct Message.Const (Right'right'params)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Right'right'params)) where
     type Cerial msg (Right'right'params) = (Capnp.Gen.ById.X832bcc6686a26d56.Right'right'params msg)
@@ -2697,7 +2699,7 @@
             ,Generics.Generic)
 instance (Default.Default (Right'right'results)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Right'right'results)) where
+instance (Classes.FromStruct Message.Const (Right'right'results)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Right'right'results)) where
     type Cerial msg (Right'right'results) = (Capnp.Gen.ById.X832bcc6686a26d56.Right'right'results msg)
@@ -2798,7 +2800,7 @@
             ,Generics.Generic)
 instance (Default.Default (Bottom'bottom'params)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Bottom'bottom'params)) where
+instance (Classes.FromStruct Message.Const (Bottom'bottom'params)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Bottom'bottom'params)) where
     type Cerial msg (Bottom'bottom'params) = (Capnp.Gen.ById.X832bcc6686a26d56.Bottom'bottom'params msg)
@@ -2832,7 +2834,7 @@
             ,Generics.Generic)
 instance (Default.Default (Bottom'bottom'results)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Bottom'bottom'results)) where
+instance (Classes.FromStruct Message.Const (Bottom'bottom'results)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Bottom'bottom'results)) where
     type Cerial msg (Bottom'bottom'results) = (Capnp.Gen.ById.X832bcc6686a26d56.Bottom'bottom'results msg)
@@ -2870,7 +2872,7 @@
             ,Generics.Generic)
 instance (Default.Default (Defaults)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (Defaults)) where
+instance (Classes.FromStruct Message.Const (Defaults)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (Defaults)) where
     type Cerial msg (Defaults) = (Capnp.Gen.ById.X832bcc6686a26d56.Defaults msg)
@@ -2918,7 +2920,7 @@
             ,Generics.Generic)
 instance (Default.Default (BenchmarkA)) where
     def  = GenHelpersPure.defaultStruct
-instance (Classes.FromStruct Message.ConstMsg (BenchmarkA)) where
+instance (Classes.FromStruct Message.Const (BenchmarkA)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance (Classes.Decerialize (BenchmarkA)) where
     type Cerial msg (BenchmarkA) = (Capnp.Gen.ById.X832bcc6686a26d56.BenchmarkA msg)
diff --git a/gen/tests/Capnp/Gen/ById/X832bcc6686a26d56.hs b/gen/tests/Capnp/Gen/ById/X832bcc6686a26d56.hs
--- a/gen/tests/Capnp/Gen/ById/X832bcc6686a26d56.hs
+++ b/gen/tests/Capnp/Gen/ById/X832bcc6686a26d56.hs
@@ -2,6 +2,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.ById.X832bcc6686a26d56(module Capnp.Gen.Aircraft) where
 import Capnp.Gen.Aircraft
 import qualified Prelude as Std_
diff --git a/gen/tests/Capnp/Gen/ById/X832bcc6686a26d56/Pure.hs b/gen/tests/Capnp/Gen/ById/X832bcc6686a26d56/Pure.hs
--- a/gen/tests/Capnp/Gen/ById/X832bcc6686a26d56/Pure.hs
+++ b/gen/tests/Capnp/Gen/ById/X832bcc6686a26d56/Pure.hs
@@ -2,6 +2,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.ById.X832bcc6686a26d56.Pure(module Capnp.Gen.Aircraft.Pure) where
 import Capnp.Gen.Aircraft.Pure
 import qualified Prelude as Std_
diff --git a/gen/tests/Capnp/Gen/ById/Xb6421fb8e478d144.hs b/gen/tests/Capnp/Gen/ById/Xb6421fb8e478d144.hs
--- a/gen/tests/Capnp/Gen/ById/Xb6421fb8e478d144.hs
+++ b/gen/tests/Capnp/Gen/ById/Xb6421fb8e478d144.hs
@@ -2,6 +2,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.ById.Xb6421fb8e478d144(module Capnp.Gen.Generics) where
 import Capnp.Gen.Generics
 import qualified Prelude as Std_
diff --git a/gen/tests/Capnp/Gen/ById/Xb6421fb8e478d144/Pure.hs b/gen/tests/Capnp/Gen/ById/Xb6421fb8e478d144/Pure.hs
--- a/gen/tests/Capnp/Gen/ById/Xb6421fb8e478d144/Pure.hs
+++ b/gen/tests/Capnp/Gen/ById/Xb6421fb8e478d144/Pure.hs
@@ -2,6 +2,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.ById.Xb6421fb8e478d144.Pure(module Capnp.Gen.Generics.Pure) where
 import Capnp.Gen.Generics.Pure
 import qualified Prelude as Std_
diff --git a/gen/tests/Capnp/Gen/Generics.hs b/gen/tests/Capnp/Gen/Generics.hs
--- a/gen/tests/Capnp/Gen/Generics.hs
+++ b/gen/tests/Capnp/Gen/Generics.hs
@@ -3,11 +3,13 @@
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE DataKinds #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# OPTIONS_GHC -Wno-unused-imports #-}
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.Generics where
 import qualified Capnp.Message as Message
 import qualified Capnp.Untyped as Untyped
@@ -28,20 +30,19 @@
     fromStruct struct = (Std_.pure (Maybe'newtype_ struct))
 instance (Classes.ToStruct msg (Maybe t msg)) where
     toStruct (Maybe'newtype_ struct) = struct
-instance (Untyped.HasMessage (Maybe t msg)) where
-    type InMessage (Maybe t msg) = msg
+instance (Untyped.HasMessage (Maybe t mut) mut) where
     message (Maybe'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Maybe t msg)) where
+instance (Untyped.MessageDefault (Maybe t mut) mut) where
     messageDefault msg = (Maybe'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Maybe t msg)) where
     fromPtr msg ptr = (Maybe'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Maybe t (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Maybe t (Message.Mut s))) where
     toPtr msg (Maybe'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Maybe t (Message.MutMsg s))) where
+instance (Classes.Allocate s (Maybe t (Message.Mut s))) where
     new msg = (Maybe'newtype_ <$> (Untyped.allocStruct msg 1 1))
-instance (Basics.ListElem msg (Maybe t msg)) where
-    newtype List msg (Maybe t msg)
-        = Maybe'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Maybe t mut)) where
+    newtype List mut (Maybe t mut)
+        = Maybe'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Maybe'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Maybe'List_ l) = (Untyped.ListStruct l)
     length (Maybe'List_ l) = (Untyped.length l)
@@ -49,14 +50,14 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Maybe t (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Maybe t (Message.Mut s))) where
     setIndex (Maybe'newtype_ elt) i (Maybe'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Maybe'List_ <$> (Untyped.allocCompositeList msg 1 1 len))
-data Maybe' t msg
+data Maybe' t (mut :: Message.Mutability)
     = Maybe'nothing 
     | Maybe'just t
     | Maybe'unknown' Std_.Word16
-instance ((Classes.FromPtr msg t)) => (Classes.FromStruct msg (Maybe' t msg)) where
+instance ((Classes.FromPtr mut t)) => (Classes.FromStruct mut (Maybe' t mut)) where
     fromStruct struct = (do
         tag <- (GenHelpers.getTag struct 0)
         case tag of
@@ -73,13 +74,13 @@
 get_Maybe' :: ((Untyped.ReadCtx m msg)
               ,(Classes.FromStruct msg (Maybe' t msg))) => (Maybe t msg) -> (m (Maybe' t msg))
 get_Maybe' (Maybe'newtype_ struct) = (Classes.fromStruct struct)
-set_Maybe'nothing :: ((Untyped.RWCtx m s)) => (Maybe t (Message.MutMsg s)) -> (m ())
+set_Maybe'nothing :: ((Untyped.RWCtx m s)) => (Maybe t (Message.Mut s)) -> (m ())
 set_Maybe'nothing (Maybe'newtype_ struct) = (do
     (GenHelpers.setWordField struct (0 :: Std_.Word16) 0 0 0)
     (Std_.pure ())
     )
 set_Maybe'just :: ((Untyped.RWCtx m s)
-                  ,(Classes.ToPtr s t)) => (Maybe t (Message.MutMsg s)) -> t -> (m ())
+                  ,(Classes.ToPtr s t)) => (Maybe t (Message.Mut s)) -> t -> (m ())
 set_Maybe'just (Maybe'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (1 :: Std_.Word16) 0 0 0)
     (do
@@ -87,7 +88,7 @@
         (Untyped.setPtr ptr 0 struct)
         )
     )
-set_Maybe'unknown' :: ((Untyped.RWCtx m s)) => (Maybe t (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Maybe'unknown' :: ((Untyped.RWCtx m s)) => (Maybe t (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Maybe'unknown' (Maybe'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
 newtype Either a b msg
     = Either'newtype_ (Untyped.Struct msg)
@@ -95,20 +96,19 @@
     fromStruct struct = (Std_.pure (Either'newtype_ struct))
 instance (Classes.ToStruct msg (Either a b msg)) where
     toStruct (Either'newtype_ struct) = struct
-instance (Untyped.HasMessage (Either a b msg)) where
-    type InMessage (Either a b msg) = msg
+instance (Untyped.HasMessage (Either a b mut) mut) where
     message (Either'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Either a b msg)) where
+instance (Untyped.MessageDefault (Either a b mut) mut) where
     messageDefault msg = (Either'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Either a b msg)) where
     fromPtr msg ptr = (Either'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Either a b (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Either a b (Message.Mut s))) where
     toPtr msg (Either'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Either a b (Message.MutMsg s))) where
+instance (Classes.Allocate s (Either a b (Message.Mut s))) where
     new msg = (Either'newtype_ <$> (Untyped.allocStruct msg 1 1))
-instance (Basics.ListElem msg (Either a b msg)) where
-    newtype List msg (Either a b msg)
-        = Either'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Either a b mut)) where
+    newtype List mut (Either a b mut)
+        = Either'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Either'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Either'List_ l) = (Untyped.ListStruct l)
     length (Either'List_ l) = (Untyped.length l)
@@ -116,15 +116,15 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Either a b (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Either a b (Message.Mut s))) where
     setIndex (Either'newtype_ elt) i (Either'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Either'List_ <$> (Untyped.allocCompositeList msg 1 1 len))
-data Either' a b msg
+data Either' a b (mut :: Message.Mutability)
     = Either'left a
     | Either'right b
     | Either'unknown' Std_.Word16
-instance ((Classes.FromPtr msg a)
-         ,(Classes.FromPtr msg b)) => (Classes.FromStruct msg (Either' a b msg)) where
+instance ((Classes.FromPtr mut a)
+         ,(Classes.FromPtr mut b)) => (Classes.FromStruct mut (Either' a b mut)) where
     fromStruct struct = (do
         tag <- (GenHelpers.getTag struct 0)
         case tag of
@@ -145,7 +145,7 @@
                ,(Classes.FromStruct msg (Either' a b msg))) => (Either a b msg) -> (m (Either' a b msg))
 get_Either' (Either'newtype_ struct) = (Classes.fromStruct struct)
 set_Either'left :: ((Untyped.RWCtx m s)
-                   ,(Classes.ToPtr s a)) => (Either a b (Message.MutMsg s)) -> a -> (m ())
+                   ,(Classes.ToPtr s a)) => (Either a b (Message.Mut s)) -> a -> (m ())
 set_Either'left (Either'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (0 :: Std_.Word16) 0 0 0)
     (do
@@ -154,7 +154,7 @@
         )
     )
 set_Either'right :: ((Untyped.RWCtx m s)
-                    ,(Classes.ToPtr s b)) => (Either a b (Message.MutMsg s)) -> b -> (m ())
+                    ,(Classes.ToPtr s b)) => (Either a b (Message.Mut s)) -> b -> (m ())
 set_Either'right (Either'newtype_ struct) value = (do
     (GenHelpers.setWordField struct (1 :: Std_.Word16) 0 0 0)
     (do
@@ -162,7 +162,7 @@
         (Untyped.setPtr ptr 0 struct)
         )
     )
-set_Either'unknown' :: ((Untyped.RWCtx m s)) => (Either a b (Message.MutMsg s)) -> Std_.Word16 -> (m ())
+set_Either'unknown' :: ((Untyped.RWCtx m s)) => (Either a b (Message.Mut s)) -> Std_.Word16 -> (m ())
 set_Either'unknown' (Either'newtype_ struct) value = (GenHelpers.setWordField struct ((Std_.fromIntegral (Classes.toWord value)) :: Std_.Word16) 0 0 0)
 newtype Pair a b msg
     = Pair'newtype_ (Untyped.Struct msg)
@@ -170,20 +170,19 @@
     fromStruct struct = (Std_.pure (Pair'newtype_ struct))
 instance (Classes.ToStruct msg (Pair a b msg)) where
     toStruct (Pair'newtype_ struct) = struct
-instance (Untyped.HasMessage (Pair a b msg)) where
-    type InMessage (Pair a b msg) = msg
+instance (Untyped.HasMessage (Pair a b mut) mut) where
     message (Pair'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Pair a b msg)) where
+instance (Untyped.MessageDefault (Pair a b mut) mut) where
     messageDefault msg = (Pair'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Pair a b msg)) where
     fromPtr msg ptr = (Pair'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Pair a b (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Pair a b (Message.Mut s))) where
     toPtr msg (Pair'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Pair a b (Message.MutMsg s))) where
+instance (Classes.Allocate s (Pair a b (Message.Mut s))) where
     new msg = (Pair'newtype_ <$> (Untyped.allocStruct msg 0 2))
-instance (Basics.ListElem msg (Pair a b msg)) where
-    newtype List msg (Pair a b msg)
-        = Pair'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Pair a b mut)) where
+    newtype List mut (Pair a b mut)
+        = Pair'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Pair'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Pair'List_ l) = (Untyped.ListStruct l)
     length (Pair'List_ l) = (Untyped.length l)
@@ -191,7 +190,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Pair a b (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Pair a b (Message.Mut s))) where
     setIndex (Pair'newtype_ elt) i (Pair'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Pair'List_ <$> (Untyped.allocCompositeList msg 0 2 len))
 get_Pair'fst :: ((Untyped.ReadCtx m msg)
@@ -201,7 +200,7 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Pair'fst :: ((Untyped.RWCtx m s)
-                ,(Classes.ToPtr s a)) => (Pair a b (Message.MutMsg s)) -> a -> (m ())
+                ,(Classes.ToPtr s a)) => (Pair a b (Message.Mut s)) -> a -> (m ())
 set_Pair'fst (Pair'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
@@ -215,7 +214,7 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Pair'snd :: ((Untyped.RWCtx m s)
-                ,(Classes.ToPtr s b)) => (Pair a b (Message.MutMsg s)) -> b -> (m ())
+                ,(Classes.ToPtr s b)) => (Pair a b (Message.Mut s)) -> b -> (m ())
 set_Pair'snd (Pair'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 1 struct)
@@ -228,20 +227,19 @@
     fromStruct struct = (Std_.pure (Nested'newtype_ struct))
 instance (Classes.ToStruct msg (Nested t msg)) where
     toStruct (Nested'newtype_ struct) = struct
-instance (Untyped.HasMessage (Nested t msg)) where
-    type InMessage (Nested t msg) = msg
+instance (Untyped.HasMessage (Nested t mut) mut) where
     message (Nested'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Nested t msg)) where
+instance (Untyped.MessageDefault (Nested t mut) mut) where
     messageDefault msg = (Nested'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Nested t msg)) where
     fromPtr msg ptr = (Nested'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Nested t (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Nested t (Message.Mut s))) where
     toPtr msg (Nested'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Nested t (Message.MutMsg s))) where
+instance (Classes.Allocate s (Nested t (Message.Mut s))) where
     new msg = (Nested'newtype_ <$> (Untyped.allocStruct msg 0 0))
-instance (Basics.ListElem msg (Nested t msg)) where
-    newtype List msg (Nested t msg)
-        = Nested'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Nested t mut)) where
+    newtype List mut (Nested t mut)
+        = Nested'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Nested'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Nested'List_ l) = (Untyped.ListStruct l)
     length (Nested'List_ l) = (Untyped.length l)
@@ -249,7 +247,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Nested t (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Nested t (Message.Mut s))) where
     setIndex (Nested'newtype_ elt) i (Nested'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Nested'List_ <$> (Untyped.allocCompositeList msg 0 0 len))
 newtype Nested'SomeStruct t msg
@@ -258,20 +256,19 @@
     fromStruct struct = (Std_.pure (Nested'SomeStruct'newtype_ struct))
 instance (Classes.ToStruct msg (Nested'SomeStruct t msg)) where
     toStruct (Nested'SomeStruct'newtype_ struct) = struct
-instance (Untyped.HasMessage (Nested'SomeStruct t msg)) where
-    type InMessage (Nested'SomeStruct t msg) = msg
+instance (Untyped.HasMessage (Nested'SomeStruct t mut) mut) where
     message (Nested'SomeStruct'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Nested'SomeStruct t msg)) where
+instance (Untyped.MessageDefault (Nested'SomeStruct t mut) mut) where
     messageDefault msg = (Nested'SomeStruct'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Nested'SomeStruct t msg)) where
     fromPtr msg ptr = (Nested'SomeStruct'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Nested'SomeStruct t (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Nested'SomeStruct t (Message.Mut s))) where
     toPtr msg (Nested'SomeStruct'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Nested'SomeStruct t (Message.MutMsg s))) where
+instance (Classes.Allocate s (Nested'SomeStruct t (Message.Mut s))) where
     new msg = (Nested'SomeStruct'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Nested'SomeStruct t msg)) where
-    newtype List msg (Nested'SomeStruct t msg)
-        = Nested'SomeStruct'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Nested'SomeStruct t mut)) where
+    newtype List mut (Nested'SomeStruct t mut)
+        = Nested'SomeStruct'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Nested'SomeStruct'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Nested'SomeStruct'List_ l) = (Untyped.ListStruct l)
     length (Nested'SomeStruct'List_ l) = (Untyped.length l)
@@ -279,7 +276,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Nested'SomeStruct t (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Nested'SomeStruct t (Message.Mut s))) where
     setIndex (Nested'SomeStruct'newtype_ elt) i (Nested'SomeStruct'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Nested'SomeStruct'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
 get_Nested'SomeStruct'value :: ((Untyped.ReadCtx m msg)
@@ -289,7 +286,7 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Nested'SomeStruct'value :: ((Untyped.RWCtx m s)
-                               ,(Classes.ToPtr s t)) => (Nested'SomeStruct t (Message.MutMsg s)) -> t -> (m ())
+                               ,(Classes.ToPtr s t)) => (Nested'SomeStruct t (Message.Mut s)) -> t -> (m ())
 set_Nested'SomeStruct'value (Nested'SomeStruct'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
@@ -300,7 +297,7 @@
     = Nested'SomeInterface'newtype_ (Std_.Maybe (Untyped.Cap msg))
 instance (Classes.FromPtr msg (Nested'SomeInterface t msg)) where
     fromPtr msg ptr = (Nested'SomeInterface'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Nested'SomeInterface t (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Nested'SomeInterface t (Message.Mut s))) where
     toPtr msg (Nested'SomeInterface'newtype_ (Std_.Nothing)) = (Std_.pure Std_.Nothing)
     toPtr msg (Nested'SomeInterface'newtype_ (Std_.Just cap)) = (Std_.pure (Std_.Just (Untyped.PtrCap cap)))
 newtype Nested'SomeInterface'method'params t msg
@@ -309,20 +306,19 @@
     fromStruct struct = (Std_.pure (Nested'SomeInterface'method'params'newtype_ struct))
 instance (Classes.ToStruct msg (Nested'SomeInterface'method'params t msg)) where
     toStruct (Nested'SomeInterface'method'params'newtype_ struct) = struct
-instance (Untyped.HasMessage (Nested'SomeInterface'method'params t msg)) where
-    type InMessage (Nested'SomeInterface'method'params t msg) = msg
+instance (Untyped.HasMessage (Nested'SomeInterface'method'params t mut) mut) where
     message (Nested'SomeInterface'method'params'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Nested'SomeInterface'method'params t msg)) where
+instance (Untyped.MessageDefault (Nested'SomeInterface'method'params t mut) mut) where
     messageDefault msg = (Nested'SomeInterface'method'params'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Nested'SomeInterface'method'params t msg)) where
     fromPtr msg ptr = (Nested'SomeInterface'method'params'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Nested'SomeInterface'method'params t (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Nested'SomeInterface'method'params t (Message.Mut s))) where
     toPtr msg (Nested'SomeInterface'method'params'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Nested'SomeInterface'method'params t (Message.MutMsg s))) where
+instance (Classes.Allocate s (Nested'SomeInterface'method'params t (Message.Mut s))) where
     new msg = (Nested'SomeInterface'method'params'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Nested'SomeInterface'method'params t msg)) where
-    newtype List msg (Nested'SomeInterface'method'params t msg)
-        = Nested'SomeInterface'method'params'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Nested'SomeInterface'method'params t mut)) where
+    newtype List mut (Nested'SomeInterface'method'params t mut)
+        = Nested'SomeInterface'method'params'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Nested'SomeInterface'method'params'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Nested'SomeInterface'method'params'List_ l) = (Untyped.ListStruct l)
     length (Nested'SomeInterface'method'params'List_ l) = (Untyped.length l)
@@ -330,7 +326,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Nested'SomeInterface'method'params t (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Nested'SomeInterface'method'params t (Message.Mut s))) where
     setIndex (Nested'SomeInterface'method'params'newtype_ elt) i (Nested'SomeInterface'method'params'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Nested'SomeInterface'method'params'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
 get_Nested'SomeInterface'method'params'arg :: ((Untyped.ReadCtx m msg)
@@ -340,7 +336,7 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Nested'SomeInterface'method'params'arg :: ((Untyped.RWCtx m s)
-                                              ,(Classes.ToPtr s t)) => (Nested'SomeInterface'method'params t (Message.MutMsg s)) -> t -> (m ())
+                                              ,(Classes.ToPtr s t)) => (Nested'SomeInterface'method'params t (Message.Mut s)) -> t -> (m ())
 set_Nested'SomeInterface'method'params'arg (Nested'SomeInterface'method'params'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
@@ -353,20 +349,19 @@
     fromStruct struct = (Std_.pure (Nested'SomeInterface'method'results'newtype_ struct))
 instance (Classes.ToStruct msg (Nested'SomeInterface'method'results t msg)) where
     toStruct (Nested'SomeInterface'method'results'newtype_ struct) = struct
-instance (Untyped.HasMessage (Nested'SomeInterface'method'results t msg)) where
-    type InMessage (Nested'SomeInterface'method'results t msg) = msg
+instance (Untyped.HasMessage (Nested'SomeInterface'method'results t mut) mut) where
     message (Nested'SomeInterface'method'results'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Nested'SomeInterface'method'results t msg)) where
+instance (Untyped.MessageDefault (Nested'SomeInterface'method'results t mut) mut) where
     messageDefault msg = (Nested'SomeInterface'method'results'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Nested'SomeInterface'method'results t msg)) where
     fromPtr msg ptr = (Nested'SomeInterface'method'results'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Nested'SomeInterface'method'results t (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Nested'SomeInterface'method'results t (Message.Mut s))) where
     toPtr msg (Nested'SomeInterface'method'results'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Nested'SomeInterface'method'results t (Message.MutMsg s))) where
+instance (Classes.Allocate s (Nested'SomeInterface'method'results t (Message.Mut s))) where
     new msg = (Nested'SomeInterface'method'results'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (Nested'SomeInterface'method'results t msg)) where
-    newtype List msg (Nested'SomeInterface'method'results t msg)
-        = Nested'SomeInterface'method'results'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Nested'SomeInterface'method'results t mut)) where
+    newtype List mut (Nested'SomeInterface'method'results t mut)
+        = Nested'SomeInterface'method'results'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Nested'SomeInterface'method'results'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Nested'SomeInterface'method'results'List_ l) = (Untyped.ListStruct l)
     length (Nested'SomeInterface'method'results'List_ l) = (Untyped.length l)
@@ -374,7 +369,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Nested'SomeInterface'method'results t (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Nested'SomeInterface'method'results t (Message.Mut s))) where
     setIndex (Nested'SomeInterface'method'results'newtype_ elt) i (Nested'SomeInterface'method'results'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Nested'SomeInterface'method'results'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
 get_Nested'SomeInterface'method'results'result :: ((Untyped.ReadCtx m msg)
@@ -384,7 +379,7 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Nested'SomeInterface'method'results'result :: ((Untyped.RWCtx m s)
-                                                  ,(Classes.ToPtr s t)) => (Nested'SomeInterface'method'results t (Message.MutMsg s)) -> t -> (m ())
+                                                  ,(Classes.ToPtr s t)) => (Nested'SomeInterface'method'results t (Message.Mut s)) -> t -> (m ())
 set_Nested'SomeInterface'method'results'result (Nested'SomeInterface'method'results'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
@@ -397,20 +392,19 @@
     fromStruct struct = (Std_.pure (Specialized'newtype_ struct))
 instance (Classes.ToStruct msg (Specialized t msg)) where
     toStruct (Specialized'newtype_ struct) = struct
-instance (Untyped.HasMessage (Specialized t msg)) where
-    type InMessage (Specialized t msg) = msg
+instance (Untyped.HasMessage (Specialized t mut) mut) where
     message (Specialized'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (Specialized t msg)) where
+instance (Untyped.MessageDefault (Specialized t mut) mut) where
     messageDefault msg = (Specialized'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (Specialized t msg)) where
     fromPtr msg ptr = (Specialized'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (Specialized t (Message.MutMsg s))) where
+instance (Classes.ToPtr s (Specialized t (Message.Mut s))) where
     toPtr msg (Specialized'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (Specialized t (Message.MutMsg s))) where
+instance (Classes.Allocate s (Specialized t (Message.Mut s))) where
     new msg = (Specialized'newtype_ <$> (Untyped.allocStruct msg 0 2))
-instance (Basics.ListElem msg (Specialized t msg)) where
-    newtype List msg (Specialized t msg)
-        = Specialized'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (Specialized t mut)) where
+    newtype List mut (Specialized t mut)
+        = Specialized'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (Specialized'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (Specialized'List_ l) = (Untyped.ListStruct l)
     length (Specialized'List_ l) = (Untyped.length l)
@@ -418,7 +412,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (Specialized t (Message.MutMsg s))) where
+instance (Basics.MutListElem s (Specialized t (Message.Mut s))) where
     setIndex (Specialized'newtype_ elt) i (Specialized'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (Specialized'List_ <$> (Untyped.allocCompositeList msg 0 2 len))
 get_Specialized'either :: ((Untyped.ReadCtx m msg)
@@ -428,14 +422,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Specialized'either :: ((Untyped.RWCtx m s)
-                          ,(Classes.ToPtr s (Either (Basics.Text (Message.MutMsg s)) t (Message.MutMsg s)))) => (Specialized t (Message.MutMsg s)) -> (Either (Basics.Text (Message.MutMsg s)) t (Message.MutMsg s)) -> (m ())
+                          ,(Classes.ToPtr s (Either (Basics.Text (Message.Mut s)) t (Message.Mut s)))) => (Specialized t (Message.Mut s)) -> (Either (Basics.Text (Message.Mut s)) t (Message.Mut s)) -> (m ())
 set_Specialized'either (Specialized'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
     )
 has_Specialized'either :: ((Untyped.ReadCtx m msg)) => (Specialized t msg) -> (m Std_.Bool)
 has_Specialized'either (Specialized'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 0 struct))
-new_Specialized'either :: ((Untyped.RWCtx m s)) => (Specialized t (Message.MutMsg s)) -> (m (Either (Basics.Text (Message.MutMsg s)) t (Message.MutMsg s)))
+new_Specialized'either :: ((Untyped.RWCtx m s)) => (Specialized t (Message.Mut s)) -> (m (Either (Basics.Text (Message.Mut s)) t (Message.Mut s)))
 new_Specialized'either struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Specialized'either struct result)
@@ -448,14 +442,14 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_Specialized'nestedStruct :: ((Untyped.RWCtx m s)
-                                ,(Classes.ToPtr s (Nested'SomeStruct (Basics.Data (Message.MutMsg s)) (Message.MutMsg s)))) => (Specialized t (Message.MutMsg s)) -> (Nested'SomeStruct (Basics.Data (Message.MutMsg s)) (Message.MutMsg s)) -> (m ())
+                                ,(Classes.ToPtr s (Nested'SomeStruct (Basics.Data (Message.Mut s)) (Message.Mut s)))) => (Specialized t (Message.Mut s)) -> (Nested'SomeStruct (Basics.Data (Message.Mut s)) (Message.Mut s)) -> (m ())
 set_Specialized'nestedStruct (Specialized'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 1 struct)
     )
 has_Specialized'nestedStruct :: ((Untyped.ReadCtx m msg)) => (Specialized t msg) -> (m Std_.Bool)
 has_Specialized'nestedStruct (Specialized'newtype_ struct) = (Std_.isJust <$> (Untyped.getPtr 1 struct))
-new_Specialized'nestedStruct :: ((Untyped.RWCtx m s)) => (Specialized t (Message.MutMsg s)) -> (m (Nested'SomeStruct (Basics.Data (Message.MutMsg s)) (Message.MutMsg s)))
+new_Specialized'nestedStruct :: ((Untyped.RWCtx m s)) => (Specialized t (Message.Mut s)) -> (m (Nested'SomeStruct (Basics.Data (Message.Mut s)) (Message.Mut s)))
 new_Specialized'nestedStruct struct = (do
     result <- (Classes.new (Untyped.message struct))
     (set_Specialized'nestedStruct struct result)
@@ -467,20 +461,19 @@
     fromStruct struct = (Std_.pure (HasGroup'newtype_ struct))
 instance (Classes.ToStruct msg (HasGroup t msg)) where
     toStruct (HasGroup'newtype_ struct) = struct
-instance (Untyped.HasMessage (HasGroup t msg)) where
-    type InMessage (HasGroup t msg) = msg
+instance (Untyped.HasMessage (HasGroup t mut) mut) where
     message (HasGroup'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (HasGroup t msg)) where
+instance (Untyped.MessageDefault (HasGroup t mut) mut) where
     messageDefault msg = (HasGroup'newtype_ <$> (Untyped.messageDefault msg))
 instance (Classes.FromPtr msg (HasGroup t msg)) where
     fromPtr msg ptr = (HasGroup'newtype_ <$> (Classes.fromPtr msg ptr))
-instance (Classes.ToPtr s (HasGroup t (Message.MutMsg s))) where
+instance (Classes.ToPtr s (HasGroup t (Message.Mut s))) where
     toPtr msg (HasGroup'newtype_ struct) = (Classes.toPtr msg struct)
-instance (Classes.Allocate s (HasGroup t (Message.MutMsg s))) where
+instance (Classes.Allocate s (HasGroup t (Message.Mut s))) where
     new msg = (HasGroup'newtype_ <$> (Untyped.allocStruct msg 0 1))
-instance (Basics.ListElem msg (HasGroup t msg)) where
-    newtype List msg (HasGroup t msg)
-        = HasGroup'List_ (Untyped.ListOf msg (Untyped.Struct msg))
+instance (Basics.ListElem mut (HasGroup t mut)) where
+    newtype List mut (HasGroup t mut)
+        = HasGroup'List_ (Untyped.ListOf mut (Untyped.Struct mut))
     listFromPtr msg ptr = (HasGroup'List_ <$> (Classes.fromPtr msg ptr))
     toUntypedList (HasGroup'List_ l) = (Untyped.ListStruct l)
     length (HasGroup'List_ l) = (Untyped.length l)
@@ -488,7 +481,7 @@
         elt <- (Untyped.index i l)
         (Classes.fromStruct elt)
         )
-instance (Basics.MutListElem s (HasGroup t (Message.MutMsg s))) where
+instance (Basics.MutListElem s (HasGroup t (Message.Mut s))) where
     setIndex (HasGroup'newtype_ elt) i (HasGroup'List_ l) = (Untyped.setIndex elt i l)
     newList msg len = (HasGroup'List_ <$> (Untyped.allocCompositeList msg 0 1 len))
 get_HasGroup'theGroup :: ((Untyped.ReadCtx m msg)
@@ -500,10 +493,9 @@
     fromStruct struct = (Std_.pure (HasGroup'theGroup'newtype_ struct))
 instance (Classes.ToStruct msg (HasGroup'theGroup t msg)) where
     toStruct (HasGroup'theGroup'newtype_ struct) = struct
-instance (Untyped.HasMessage (HasGroup'theGroup t msg)) where
-    type InMessage (HasGroup'theGroup t msg) = msg
+instance (Untyped.HasMessage (HasGroup'theGroup t mut) mut) where
     message (HasGroup'theGroup'newtype_ struct) = (Untyped.message struct)
-instance (Untyped.MessageDefault (HasGroup'theGroup t msg)) where
+instance (Untyped.MessageDefault (HasGroup'theGroup t mut) mut) where
     messageDefault msg = (HasGroup'theGroup'newtype_ <$> (Untyped.messageDefault msg))
 get_HasGroup'theGroup'value :: ((Untyped.ReadCtx m msg)
                                ,(Classes.FromPtr msg t)) => (HasGroup'theGroup t msg) -> (m t)
@@ -512,7 +504,7 @@
     (Classes.fromPtr (Untyped.message struct) ptr)
     )
 set_HasGroup'theGroup'value :: ((Untyped.RWCtx m s)
-                               ,(Classes.ToPtr s t)) => (HasGroup'theGroup t (Message.MutMsg s)) -> t -> (m ())
+                               ,(Classes.ToPtr s t)) => (HasGroup'theGroup t (Message.Mut s)) -> t -> (m ())
 set_HasGroup'theGroup'value (HasGroup'theGroup'newtype_ struct) value = (do
     ptr <- (Classes.toPtr (Untyped.message struct) value)
     (Untyped.setPtr ptr 0 struct)
diff --git a/gen/tests/Capnp/Gen/Generics/Pure.hs b/gen/tests/Capnp/Gen/Generics/Pure.hs
--- a/gen/tests/Capnp/Gen/Generics/Pure.hs
+++ b/gen/tests/Capnp/Gen/Generics/Pure.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds #-}
 {-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE DuplicateRecordFields #-}
 {-# LANGUAGE FlexibleContexts #-}
@@ -11,6 +12,7 @@
 {-# OPTIONS_GHC -Wno-dodgy-exports #-}
 {-# OPTIONS_GHC -Wno-unused-matches #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
 module Capnp.Gen.Generics.Pure(Maybe(..)
                               ,Either(..)
                               ,Pair(..)
@@ -55,13 +57,13 @@
             ,Std_.Eq
             ,Generics.Generic)
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Default.Default (Maybe t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Default.Default (Maybe t)) where
     def  = GenHelpersPure.defaultStruct
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Classes.FromStruct Message.ConstMsg (Maybe t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Classes.FromStruct Message.Const (Maybe t)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Classes.Decerialize (Maybe t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Classes.Decerialize (Maybe t)) where
     type Cerial msg (Maybe t) = (Capnp.Gen.ById.Xb6421fb8e478d144.Maybe (Classes.Cerial msg t) msg)
     decerialize raw = (do
         raw <- (Capnp.Gen.ById.Xb6421fb8e478d144.get_Maybe' raw)
@@ -74,9 +76,9 @@
                 (Std_.pure (Maybe'unknown' tag))
         )
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Marshal s (Maybe t)) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Marshal s (Maybe t)) where
     marshalInto raw_ value_ = case value_ of
         (Maybe'nothing) ->
             (Capnp.Gen.ById.Xb6421fb8e478d144.set_Maybe'nothing raw_)
@@ -85,43 +87,43 @@
         (Maybe'unknown' tag) ->
             (Capnp.Gen.ById.Xb6421fb8e478d144.set_Maybe'unknown' raw_ tag)
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (Maybe t))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (Maybe t))
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (Maybe t))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (Maybe t))) where
     cerialize  = GenHelpersPure.cerializeCompositeVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (Maybe t)))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (Maybe t)))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (Maybe t))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (Maybe t))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (Maybe t)))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (Maybe t)))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Maybe t))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Maybe t))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Maybe t)))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Maybe t)))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Maybe t))))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Maybe t))))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 data Either a b
     = Either'left a
@@ -131,19 +133,19 @@
             ,Std_.Eq
             ,Generics.Generic)
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))) => (Default.Default (Either a b)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))) => (Default.Default (Either a b)) where
     def  = GenHelpersPure.defaultStruct
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))) => (Classes.FromStruct Message.ConstMsg (Either a b)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))) => (Classes.FromStruct Message.Const (Either a b)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))) => (Classes.Decerialize (Either a b)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))) => (Classes.Decerialize (Either a b)) where
     type Cerial msg (Either a b) = (Capnp.Gen.ById.Xb6421fb8e478d144.Either (Classes.Cerial msg a) (Classes.Cerial msg b) msg)
     decerialize raw = (do
         raw <- (Capnp.Gen.ById.Xb6421fb8e478d144.get_Either' raw)
@@ -156,13 +158,13 @@
                 (Std_.pure (Either'unknown' tag))
         )
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))
          ,(Classes.Cerialize s a)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) a))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) a))
          ,(Classes.Cerialize s b)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) b))) => (Classes.Marshal s (Either a b)) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) b))) => (Classes.Marshal s (Either a b)) where
     marshalInto raw_ value_ = case value_ of
         (Either'left arg_) ->
             ((Classes.cerialize (Untyped.message raw_) arg_) >>= (Capnp.Gen.ById.Xb6421fb8e478d144.set_Either'left raw_))
@@ -171,75 +173,75 @@
         (Either'unknown' tag) ->
             (Capnp.Gen.ById.Xb6421fb8e478d144.set_Either'unknown' raw_ tag)
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))
          ,(Classes.Cerialize s a)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) a))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) a))
          ,(Classes.Cerialize s b)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) b))) => (Classes.Cerialize s (Either a b))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) b))) => (Classes.Cerialize s (Either a b))
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))
          ,(Classes.Cerialize s a)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) a))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) a))
          ,(Classes.Cerialize s b)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) b))) => (Classes.Cerialize s (V.Vector (Either a b))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) b))) => (Classes.Cerialize s (V.Vector (Either a b))) where
     cerialize  = GenHelpersPure.cerializeCompositeVec
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))
          ,(Classes.Cerialize s a)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) a))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) a))
          ,(Classes.Cerialize s b)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (Either a b)))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (Either a b)))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))
          ,(Classes.Cerialize s a)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) a))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) a))
          ,(Classes.Cerialize s b)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (Either a b))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (Either a b))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))
          ,(Classes.Cerialize s a)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) a))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) a))
          ,(Classes.Cerialize s b)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (Either a b)))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (Either a b)))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))
          ,(Classes.Cerialize s a)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) a))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) a))
          ,(Classes.Cerialize s b)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Either a b))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Either a b))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))
          ,(Classes.Cerialize s a)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) a))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) a))
          ,(Classes.Cerialize s b)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Either a b)))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Either a b)))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))
          ,(Classes.Cerialize s a)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) a))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) a))
          ,(Classes.Cerialize s b)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Either a b))))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Either a b))))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 data Pair a b
     = Pair 
@@ -248,30 +250,30 @@
             ,Std_.Eq
             ,Generics.Generic)
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))) => (Default.Default (Pair a b)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))) => (Default.Default (Pair a b)) where
     def  = GenHelpersPure.defaultStruct
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))) => (Classes.FromStruct Message.ConstMsg (Pair a b)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))) => (Classes.FromStruct Message.Const (Pair a b)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))) => (Classes.Decerialize (Pair a b)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))) => (Classes.Decerialize (Pair a b)) where
     type Cerial msg (Pair a b) = (Capnp.Gen.ById.Xb6421fb8e478d144.Pair (Classes.Cerial msg a) (Classes.Cerial msg b) msg)
     decerialize raw = (Pair <$> ((Capnp.Gen.ById.Xb6421fb8e478d144.get_Pair'fst raw) >>= Classes.decerialize)
                             <*> ((Capnp.Gen.ById.Xb6421fb8e478d144.get_Pair'snd raw) >>= Classes.decerialize))
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))
          ,(Classes.Cerialize s a)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) a))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) a))
          ,(Classes.Cerialize s b)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) b))) => (Classes.Marshal s (Pair a b)) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) b))) => (Classes.Marshal s (Pair a b)) where
     marshalInto raw_ value_ = case value_ of
         Pair{..} ->
             (do
@@ -280,75 +282,75 @@
                 (Std_.pure ())
                 )
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))
          ,(Classes.Cerialize s a)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) a))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) a))
          ,(Classes.Cerialize s b)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) b))) => (Classes.Cerialize s (Pair a b))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) b))) => (Classes.Cerialize s (Pair a b))
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))
          ,(Classes.Cerialize s a)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) a))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) a))
          ,(Classes.Cerialize s b)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) b))) => (Classes.Cerialize s (V.Vector (Pair a b))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) b))) => (Classes.Cerialize s (V.Vector (Pair a b))) where
     cerialize  = GenHelpersPure.cerializeCompositeVec
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))
          ,(Classes.Cerialize s a)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) a))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) a))
          ,(Classes.Cerialize s b)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (Pair a b)))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (Pair a b)))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))
          ,(Classes.Cerialize s a)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) a))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) a))
          ,(Classes.Cerialize s b)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (Pair a b))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (Pair a b))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))
          ,(Classes.Cerialize s a)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) a))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) a))
          ,(Classes.Cerialize s b)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (Pair a b)))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (Pair a b)))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))
          ,(Classes.Cerialize s a)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) a))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) a))
          ,(Classes.Cerialize s b)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Pair a b))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Pair a b))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))
          ,(Classes.Cerialize s a)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) a))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) a))
          ,(Classes.Cerialize s b)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Pair a b)))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Pair a b)))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize a)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg a))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const a))
          ,(Classes.Decerialize b)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg b))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const b))
          ,(Classes.Cerialize s a)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) a))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) a))
          ,(Classes.Cerialize s b)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Pair a b))))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) b))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Pair a b))))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 data Nested t
     = Nested 
@@ -357,62 +359,62 @@
             ,Std_.Eq
             ,Generics.Generic)
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Default.Default (Nested t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Default.Default (Nested t)) where
     def  = GenHelpersPure.defaultStruct
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Classes.FromStruct Message.ConstMsg (Nested t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Classes.FromStruct Message.Const (Nested t)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Classes.Decerialize (Nested t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Classes.Decerialize (Nested t)) where
     type Cerial msg (Nested t) = (Capnp.Gen.ById.Xb6421fb8e478d144.Nested (Classes.Cerial msg t) msg)
     decerialize raw = (Std_.pure Nested)
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Marshal s (Nested t)) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Marshal s (Nested t)) where
     marshalInto raw_ value_ = case value_ of
         (Nested) ->
             (do
                 (Std_.pure ())
                 )
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (Nested t))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (Nested t))
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (Nested t))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (Nested t))) where
     cerialize  = GenHelpersPure.cerializeCompositeVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (Nested t)))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (Nested t)))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (Nested t))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (Nested t))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (Nested t)))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (Nested t)))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested t))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested t))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested t)))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested t)))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested t))))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested t))))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 data Nested'SomeStruct t
     = Nested'SomeStruct 
@@ -421,19 +423,19 @@
             ,Std_.Eq
             ,Generics.Generic)
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Default.Default (Nested'SomeStruct t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Default.Default (Nested'SomeStruct t)) where
     def  = GenHelpersPure.defaultStruct
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Classes.FromStruct Message.ConstMsg (Nested'SomeStruct t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Classes.FromStruct Message.Const (Nested'SomeStruct t)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Classes.Decerialize (Nested'SomeStruct t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Classes.Decerialize (Nested'SomeStruct t)) where
     type Cerial msg (Nested'SomeStruct t) = (Capnp.Gen.ById.Xb6421fb8e478d144.Nested'SomeStruct (Classes.Cerial msg t) msg)
     decerialize raw = (Nested'SomeStruct <$> ((Capnp.Gen.ById.Xb6421fb8e478d144.get_Nested'SomeStruct'value raw) >>= Classes.decerialize))
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Marshal s (Nested'SomeStruct t)) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Marshal s (Nested'SomeStruct t)) where
     marshalInto raw_ value_ = case value_ of
         Nested'SomeStruct{..} ->
             (do
@@ -441,43 +443,43 @@
                 (Std_.pure ())
                 )
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (Nested'SomeStruct t))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (Nested'SomeStruct t))
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (Nested'SomeStruct t))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (Nested'SomeStruct t))) where
     cerialize  = GenHelpersPure.cerializeCompositeVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (Nested'SomeStruct t)))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (Nested'SomeStruct t)))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (Nested'SomeStruct t))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (Nested'SomeStruct t))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeStruct t)))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeStruct t)))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeStruct t))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeStruct t))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeStruct t)))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeStruct t)))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeStruct t))))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeStruct t))))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 newtype Nested'SomeInterface t
     = Nested'SomeInterface Message.Client
@@ -528,19 +530,19 @@
             ,Std_.Eq
             ,Generics.Generic)
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Default.Default (Nested'SomeInterface'method'params t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Default.Default (Nested'SomeInterface'method'params t)) where
     def  = GenHelpersPure.defaultStruct
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Classes.FromStruct Message.ConstMsg (Nested'SomeInterface'method'params t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Classes.FromStruct Message.Const (Nested'SomeInterface'method'params t)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Classes.Decerialize (Nested'SomeInterface'method'params t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Classes.Decerialize (Nested'SomeInterface'method'params t)) where
     type Cerial msg (Nested'SomeInterface'method'params t) = (Capnp.Gen.ById.Xb6421fb8e478d144.Nested'SomeInterface'method'params (Classes.Cerial msg t) msg)
     decerialize raw = (Nested'SomeInterface'method'params <$> ((Capnp.Gen.ById.Xb6421fb8e478d144.get_Nested'SomeInterface'method'params'arg raw) >>= Classes.decerialize))
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Marshal s (Nested'SomeInterface'method'params t)) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Marshal s (Nested'SomeInterface'method'params t)) where
     marshalInto raw_ value_ = case value_ of
         Nested'SomeInterface'method'params{..} ->
             (do
@@ -548,43 +550,43 @@
                 (Std_.pure ())
                 )
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (Nested'SomeInterface'method'params t))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (Nested'SomeInterface'method'params t))
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (Nested'SomeInterface'method'params t))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (Nested'SomeInterface'method'params t))) where
     cerialize  = GenHelpersPure.cerializeCompositeVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (Nested'SomeInterface'method'params t)))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (Nested'SomeInterface'method'params t)))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (Nested'SomeInterface'method'params t))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (Nested'SomeInterface'method'params t))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeInterface'method'params t)))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeInterface'method'params t)))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeInterface'method'params t))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeInterface'method'params t))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeInterface'method'params t)))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeInterface'method'params t)))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeInterface'method'params t))))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeInterface'method'params t))))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 data Nested'SomeInterface'method'results t
     = Nested'SomeInterface'method'results 
@@ -593,19 +595,19 @@
             ,Std_.Eq
             ,Generics.Generic)
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Default.Default (Nested'SomeInterface'method'results t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Default.Default (Nested'SomeInterface'method'results t)) where
     def  = GenHelpersPure.defaultStruct
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Classes.FromStruct Message.ConstMsg (Nested'SomeInterface'method'results t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Classes.FromStruct Message.Const (Nested'SomeInterface'method'results t)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Classes.Decerialize (Nested'SomeInterface'method'results t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Classes.Decerialize (Nested'SomeInterface'method'results t)) where
     type Cerial msg (Nested'SomeInterface'method'results t) = (Capnp.Gen.ById.Xb6421fb8e478d144.Nested'SomeInterface'method'results (Classes.Cerial msg t) msg)
     decerialize raw = (Nested'SomeInterface'method'results <$> ((Capnp.Gen.ById.Xb6421fb8e478d144.get_Nested'SomeInterface'method'results'result raw) >>= Classes.decerialize))
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Marshal s (Nested'SomeInterface'method'results t)) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Marshal s (Nested'SomeInterface'method'results t)) where
     marshalInto raw_ value_ = case value_ of
         Nested'SomeInterface'method'results{..} ->
             (do
@@ -613,43 +615,43 @@
                 (Std_.pure ())
                 )
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (Nested'SomeInterface'method'results t))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (Nested'SomeInterface'method'results t))
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (Nested'SomeInterface'method'results t))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (Nested'SomeInterface'method'results t))) where
     cerialize  = GenHelpersPure.cerializeCompositeVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (Nested'SomeInterface'method'results t)))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (Nested'SomeInterface'method'results t)))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (Nested'SomeInterface'method'results t))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (Nested'SomeInterface'method'results t))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeInterface'method'results t)))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeInterface'method'results t)))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeInterface'method'results t))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeInterface'method'results t))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeInterface'method'results t)))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeInterface'method'results t)))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeInterface'method'results t))))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Nested'SomeInterface'method'results t))))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 data Specialized t
     = Specialized 
@@ -659,20 +661,20 @@
             ,Std_.Eq
             ,Generics.Generic)
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Default.Default (Specialized t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Default.Default (Specialized t)) where
     def  = GenHelpersPure.defaultStruct
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Classes.FromStruct Message.ConstMsg (Specialized t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Classes.FromStruct Message.Const (Specialized t)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Classes.Decerialize (Specialized t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Classes.Decerialize (Specialized t)) where
     type Cerial msg (Specialized t) = (Capnp.Gen.ById.Xb6421fb8e478d144.Specialized (Classes.Cerial msg t) msg)
     decerialize raw = (Specialized <$> ((Capnp.Gen.ById.Xb6421fb8e478d144.get_Specialized'either raw) >>= Classes.decerialize)
                                    <*> ((Capnp.Gen.ById.Xb6421fb8e478d144.get_Specialized'nestedStruct raw) >>= Classes.decerialize))
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Marshal s (Specialized t)) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Marshal s (Specialized t)) where
     marshalInto raw_ value_ = case value_ of
         Specialized{..} ->
             (do
@@ -681,43 +683,43 @@
                 (Std_.pure ())
                 )
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (Specialized t))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (Specialized t))
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (Specialized t))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (Specialized t))) where
     cerialize  = GenHelpersPure.cerializeCompositeVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (Specialized t)))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (Specialized t)))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (Specialized t))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (Specialized t))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (Specialized t)))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (Specialized t)))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Specialized t))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Specialized t))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Specialized t)))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Specialized t)))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Specialized t))))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (Specialized t))))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 data HasGroup t
     = HasGroup 
@@ -726,19 +728,19 @@
             ,Std_.Eq
             ,Generics.Generic)
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Default.Default (HasGroup t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Default.Default (HasGroup t)) where
     def  = GenHelpersPure.defaultStruct
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Classes.FromStruct Message.ConstMsg (HasGroup t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Classes.FromStruct Message.Const (HasGroup t)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Classes.Decerialize (HasGroup t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Classes.Decerialize (HasGroup t)) where
     type Cerial msg (HasGroup t) = (Capnp.Gen.ById.Xb6421fb8e478d144.HasGroup (Classes.Cerial msg t) msg)
     decerialize raw = (HasGroup <$> ((Capnp.Gen.ById.Xb6421fb8e478d144.get_HasGroup'theGroup raw) >>= Classes.decerialize))
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Marshal s (HasGroup t)) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Marshal s (HasGroup t)) where
     marshalInto raw_ value_ = case value_ of
         HasGroup{..} ->
             (do
@@ -749,43 +751,43 @@
                 (Std_.pure ())
                 )
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (HasGroup t))
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (HasGroup t))
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (HasGroup t))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (HasGroup t))) where
     cerialize  = GenHelpersPure.cerializeCompositeVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (HasGroup t)))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (HasGroup t)))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (HasGroup t))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (HasGroup t))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (HasGroup t)))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (HasGroup t)))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (HasGroup t))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (HasGroup t))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (HasGroup t)))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (HasGroup t)))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (HasGroup t))))))))) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Cerialize s (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (V.Vector (HasGroup t))))))))) where
     cerialize  = GenHelpersPure.cerializeBasicVec
 data HasGroup'theGroup t
     = HasGroup'theGroup' 
@@ -794,19 +796,19 @@
             ,Std_.Eq
             ,Generics.Generic)
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Default.Default (HasGroup'theGroup t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Default.Default (HasGroup'theGroup t)) where
     def  = GenHelpersPure.defaultStruct
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Classes.FromStruct Message.ConstMsg (HasGroup'theGroup t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Classes.FromStruct Message.Const (HasGroup'theGroup t)) where
     fromStruct struct = ((Classes.fromStruct struct) >>= Classes.decerialize)
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))) => (Classes.Decerialize (HasGroup'theGroup t)) where
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))) => (Classes.Decerialize (HasGroup'theGroup t)) where
     type Cerial msg (HasGroup'theGroup t) = (Capnp.Gen.ById.Xb6421fb8e478d144.HasGroup'theGroup (Classes.Cerial msg t) msg)
     decerialize raw = (HasGroup'theGroup' <$> ((Capnp.Gen.ById.Xb6421fb8e478d144.get_HasGroup'theGroup'value raw) >>= Classes.decerialize))
 instance ((Classes.Decerialize t)
-         ,(Classes.FromPtr Message.ConstMsg (Classes.Cerial Message.ConstMsg t))
+         ,(Classes.FromPtr Message.Const (Classes.Cerial Message.Const t))
          ,(Classes.Cerialize s t)
-         ,(Classes.ToPtr s (Classes.Cerial (Message.MutMsg s) t))) => (Classes.Marshal s (HasGroup'theGroup t)) where
+         ,(Classes.ToPtr s (Classes.Cerial (Message.Mut s) t))) => (Classes.Marshal s (HasGroup'theGroup t)) where
     marshalInto raw_ value_ = case value_ of
         HasGroup'theGroup'{..} ->
             (do
diff --git a/lib/Capnp.hs b/lib/Capnp.hs
--- a/lib/Capnp.hs
+++ b/lib/Capnp.hs
@@ -21,10 +21,13 @@
     , Basics.textBytes
 
     -- * Working with messages
-    , Message.ConstMsg
-    , Message.Message(..)
-    , Message.MutMsg
+    , Message.Message
+    , Message.Segment
+    , Message.Mutability(..)
+    , Message.MonadReadMessage(..)
     , Message.newMessage
+    , Message.fromByteString
+    , Message.toByteString
 
     -- * Canonicalizing messages
     , canonicalize
diff --git a/lib/Capnp/Basics.hs b/lib/Capnp/Basics.hs
--- a/lib/Capnp/Basics.hs
+++ b/lib/Capnp/Basics.hs
@@ -10,6 +10,8 @@
   Whereas 'U.ListOf' only deals with low-level encodings of lists,
   this module's 'List' type can represent typed lists.
 -}
+{-# LANGUAGE DataKinds             #-}
+{-# LANGUAGE FlexibleContexts      #-}
 {-# LANGUAGE FlexibleInstances     #-}
 {-# LANGUAGE GADTs                 #-}
 {-# LANGUAGE MultiParamTypeClasses #-}
@@ -35,7 +37,10 @@
 
 import qualified Data.ByteString as BS
 
-import Capnp.Classes (FromPtr (..), ListElem (..), MutListElem (..), ToPtr (..))
+import Capnp.Classes
+    (FromPtr (..), ListElem (..), MutListElem (..), ToPtr (..))
+import Capnp.Message          (Mutability (..))
+import Data.Mutable           (Thaw (..))
 import Internal.Gen.Instances ()
 
 import qualified Capnp.Errors  as E
@@ -50,27 +55,41 @@
 --
 -- Rationale: validation would require doing an up-front pass over the data,
 -- which runs counter to the overall design of capnproto.
-newtype Text msg = Text (U.ListOf msg Word8)
+newtype Text mut = Text (U.ListOf mut Word8)
 -- The argument to the data constructor is the slice of the original message
 -- containing the text, including the NUL terminator.
 
+instance Thaw (Text 'Const) where
+    type Mutable s (Text 'Const) = Text ('Mut s)
+    thaw (Text l) = Text <$> thaw l
+    unsafeThaw (Text l) = Text <$> unsafeThaw l
+    freeze (Text l) = Text <$> freeze l
+    unsafeFreeze (Text l) = Text <$> unsafeFreeze l
+
 -- | A blob of bytes (@Data@ in capnproto's schema language). The argument
 -- to the data constructor is a slice into the message, containing the raw
 -- bytes.
-newtype Data msg = Data (U.ListOf msg Word8)
+newtype Data mut = Data (U.ListOf mut Word8)
 
+instance Thaw (Data 'Const) where
+    type Mutable s (Data 'Const) = Data ('Mut s)
+    thaw (Data l) = Data <$> thaw l
+    unsafeThaw (Data l) = Data <$> unsafeThaw l
+    freeze (Data l) = Data <$> freeze l
+    unsafeFreeze (Data l) = Data <$> unsafeFreeze l
+
 -- | @'newData' msg len@ allocates a new data blob of length @len@ bytes
 -- inside the message.
-newData :: M.WriteCtx m s => M.MutMsg s -> Int -> m (Data (M.MutMsg s))
+newData :: M.WriteCtx m s => M.Message ('Mut s) -> Int -> m (Data ('Mut s))
 newData msg len = Data <$> U.allocList8 msg len
 
 -- | Interpret a list of 'Word8' as a capnproto 'Data' value.
-getData :: U.ReadCtx m msg => U.ListOf msg Word8 -> m (Data msg)
+getData :: U.ReadCtx m mut => U.ListOf mut Word8 -> m (Data mut)
 getData = pure . Data
 
 -- | @'newText' msg len@ Allocates a new 'Text' inside the message. The
 -- value has space for @len@ *bytes* (not characters).
-newText :: M.WriteCtx m s => M.MutMsg s -> Int -> m (Text (M.MutMsg s))
+newText :: M.WriteCtx m s => M.Message ('Mut s) -> Int -> m (Text ('Mut s))
 newText msg len =
     Text <$> U.allocList8 msg (len+1)
 
@@ -78,7 +97,7 @@
 --
 -- This vaildates that the list is NUL-terminated, but not that it is valid
 -- UTF-8. If it is not NUL-terminaed, a 'SchemaViolationError' is thrown.
-getText :: U.ReadCtx m msg => U.ListOf msg Word8 -> m (Text msg)
+getText :: U.ReadCtx m mut => U.ListOf mut Word8 -> m (Text mut)
 getText list = do
     let len = U.length list
     when (len == 0) $ throwM $ E.SchemaViolationError
@@ -89,36 +108,37 @@
     pure $ Text list
 
 -- | Convert a 'Data' to a 'BS.ByteString'.
-dataBytes :: U.ReadCtx m msg => Data msg -> m BS.ByteString
+dataBytes :: U.ReadCtx m 'Const => Data 'Const -> m BS.ByteString
 dataBytes (Data list) = U.rawBytes list
 
 -- | Return the underlying buffer containing the text. This does not include the
 -- null terminator.
-textBuffer :: U.ReadCtx m msg => Text msg -> m (U.ListOf msg Word8)
+textBuffer :: U.ReadCtx m mut => Text mut -> m (U.ListOf mut Word8)
 textBuffer (Text list) = U.take (U.length list - 1) list
 
 -- | Convert a 'Text' to a 'BS.ByteString', comprising the raw bytes of the text
 -- (not counting the NUL terminator).
-textBytes :: U.ReadCtx m msg => Text msg -> m BS.ByteString
+textBytes :: U.ReadCtx m 'Const => Text 'Const -> m BS.ByteString
 textBytes = textBuffer >=> U.rawBytes
 
 ------------------- (Mut)ListElem instances for text and data ------------------
-instance ListElem msg (Data msg) where
-    newtype List msg (Data msg) = DataList (U.ListOf msg (Maybe (U.Ptr msg)))
 
+instance ListElem mut (Data mut) where
+    newtype List mut (Data mut) = DataList (U.ListOf mut (Maybe (U.Ptr mut)))
+
     listFromPtr msg ptr = DataList <$> fromPtr msg ptr
     toUntypedList (DataList l) = U.ListPtr l
 
     length (DataList l) = U.length l
     index i (DataList l) = ptrListIndex i l
 
-instance MutListElem s (Data (M.MutMsg s)) where
+instance MutListElem s (Data ('Mut s)) where
     setIndex (Data e) i (DataList l) =
         U.setIndex (Just (U.PtrList (U.List8 e))) i l
     newList msg len = DataList <$> U.allocListPtr msg len
 
-instance ListElem msg (Text msg) where
-    newtype List msg (Text msg) = TextList (U.ListOf msg (Maybe (U.Ptr msg)))
+instance ListElem mut (Text mut) where
+    newtype List mut (Text mut) = TextList (U.ListOf mut (Maybe (U.Ptr mut)))
 
     listFromPtr msg ptr = TextList <$> fromPtr msg ptr
     toUntypedList (TextList l) = U.ListPtr l
@@ -126,25 +146,27 @@
     length (TextList l) = U.length l
     index i (TextList l) = ptrListIndex i l
 
-instance MutListElem s (Text (M.MutMsg s)) where
+instance MutListElem s (Text ('Mut s)) where
     setIndex (Text e) i (TextList l) =
         U.setIndex (Just (U.PtrList (U.List8 e))) i l
     newList msg len = TextList <$> U.allocListPtr msg len
 
 -- helper for the above instances.
-ptrListIndex :: (U.ReadCtx m msg, FromPtr msg a) => Int -> U.ListOf msg (Maybe (U.Ptr msg)) -> m a
+ptrListIndex
+    :: (U.ReadCtx m mut, FromPtr mut a)
+    => Int -> U.ListOf mut (Maybe (U.Ptr mut)) -> m a
 ptrListIndex i list = do
     ptr <- U.index i list
     fromPtr (U.message list) ptr
 
 --------- To/FromPtr instances for Text and Data. These wrap lists of bytes. --------
 
-instance FromPtr msg (Data msg) where
+instance FromPtr mut (Data mut) where
     fromPtr msg ptr = fromPtr msg ptr >>= getData
-instance ToPtr s (Data (M.MutMsg s)) where
+instance ToPtr s (Data ('Mut s)) where
     toPtr msg (Data l) = toPtr msg l
 
-instance FromPtr msg (Text msg) where
+instance FromPtr mut (Text mut) where
     fromPtr msg ptr = case ptr of
         Just _ ->
             fromPtr msg ptr >>= getText
@@ -154,5 +176,5 @@
             -- the empty string, so we bypass it here.
             Data bytes <- fromPtr msg ptr
             pure $ Text bytes
-instance ToPtr s (Text (M.MutMsg s)) where
+instance ToPtr s (Text ('Mut s)) where
     toPtr msg (Text l) = toPtr msg l
diff --git a/lib/Capnp/Basics/Pure.hs b/lib/Capnp/Basics/Pure.hs
--- a/lib/Capnp/Basics/Pure.hs
+++ b/lib/Capnp/Basics/Pure.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds             #-}
 {-# LANGUAGE FlexibleContexts      #-}
 {-# LANGUAGE FlexibleInstances     #-}
 {-# LANGUAGE MultiParamTypeClasses #-}
@@ -33,10 +34,10 @@
 import Capnp.Classes
 
 import Capnp.Errors  (Error(InvalidUtf8Error))
+import Capnp.Message (Mutability (..))
 import Capnp.Untyped (rawBytes)
 
 import qualified Capnp.Basics  as Basics
-import qualified Capnp.Message as M
 import qualified Capnp.Untyped as Untyped
 
 -- | A capnproto @Data@ value. This is just an alias for 'BS.ByteString'.
@@ -78,7 +79,7 @@
         marshalTextBytes bytes ret
         pure ret
 
-marshalTextBytes :: Untyped.RWCtx m s => BS.ByteString -> Basics.Text (M.MutMsg s) -> m ()
+marshalTextBytes :: Untyped.RWCtx m s => BS.ByteString -> Basics.Text ('Mut s) -> m ()
 marshalTextBytes bytes text = do
     buffer <- Basics.textBuffer text
     marshalInto (Basics.Data buffer) bytes
diff --git a/lib/Capnp/Canonicalize.hs b/lib/Capnp/Canonicalize.hs
--- a/lib/Capnp/Canonicalize.hs
+++ b/lib/Capnp/Canonicalize.hs
@@ -2,6 +2,7 @@
 --
 -- https://capnproto.org/encoding.html#canonicalization
 {-# LANGUAGE BangPatterns     #-}
+{-# LANGUAGE DataKinds        #-}
 {-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE TypeFamilies     #-}
 module Capnp.Canonicalize
@@ -31,6 +32,7 @@
 import Data.Traversable (for)
 
 import           Capnp.Bits    (WordCount)
+import           Capnp.Message (Mutability (..))
 import qualified Capnp.Message as M
 import qualified Capnp.Untyped as U
 
@@ -41,7 +43,9 @@
 -- In addition to the usual reasons for failure when reading a message (traversal limit,
 -- malformed messages), this can fail if the message does not fit in a single segment,
 -- as the canonical form requires single-segment messages.
-canonicalize :: (U.RWCtx m s, M.Message m msgIn) => U.Struct msgIn -> m (M.MutMsg s, M.Segment (M.MutMsg s))
+canonicalize
+    :: (U.RWCtx m s, M.MonadReadMessage mutIn m)
+    => U.Struct mutIn -> m (M.Message ('Mut s), M.Segment ('Mut s))
 canonicalize rootStructIn = do
     let msgIn = U.message rootStructIn
     -- Note [Allocation strategy]
@@ -52,7 +56,7 @@
     segOut <- M.getSegment msgOut 0
     pure (msgOut, segOut)
 
-totalWords :: U.ReadCtx m msg => msg -> m WordCount
+totalWords :: U.ReadCtx m mut => M.Message mut -> m WordCount
 totalWords msg = do
     -- Note [Allocation strategy]
     segCount <- M.numSegs msg
@@ -61,14 +65,18 @@
         M.numWords seg
     pure $ sum sizes
 
-cloneCanonicalStruct :: (U.RWCtx m s, M.Message m msgIn) => U.Struct msgIn -> M.MutMsg s -> m (U.Struct (M.MutMsg s))
+cloneCanonicalStruct
+    :: (U.RWCtx m s, M.MonadReadMessage mutIn m)
+    => U.Struct mutIn -> M.Message ('Mut s) -> m (U.Struct ('Mut s))
 cloneCanonicalStruct structIn msgOut = do
     (nWords, nPtrs) <- findCanonicalSectionCounts structIn
     structOut <- U.allocStruct msgOut (fromIntegral nWords) (fromIntegral nPtrs)
     copyCanonicalStruct structIn structOut
     pure structOut
 
-copyCanonicalStruct :: (U.RWCtx m s, M.Message m msgIn) => U.Struct msgIn -> U.Struct (M.MutMsg s) -> m ()
+copyCanonicalStruct
+    :: (U.RWCtx m s, M.MonadReadMessage mutIn m)
+    => U.Struct mutIn -> U.Struct ('Mut s) -> m ()
 copyCanonicalStruct structIn structOut = do
     let nWords = fromIntegral $ U.structWordCount structOut
         nPtrs = fromIntegral $ U.structPtrCount structOut
@@ -94,7 +102,9 @@
         then canonicalSectionCount isDefault getIndex (total - 1)
         else pure $ fromIntegral total
 
-cloneCanonicalPtr :: (U.RWCtx m s, M.Message m msgIn) => Maybe (U.Ptr msgIn) -> M.MutMsg s -> m (Maybe (U.Ptr (M.MutMsg s)))
+cloneCanonicalPtr
+    :: (U.RWCtx m s, M.MonadReadMessage mutIn m)
+    => Maybe (U.Ptr mutIn) -> M.Message ('Mut s) -> m (Maybe (U.Ptr ('Mut s)))
 cloneCanonicalPtr ptrIn msgOut =
     case ptrIn of
         Nothing ->
@@ -107,7 +117,9 @@
         Just (U.PtrList list) ->
             Just . U.PtrList <$> cloneCanonicalList list msgOut
 
-cloneCanonicalList :: (U.RWCtx m s, M.Message m msgIn) => U.List msgIn -> M.MutMsg s -> m (U.List (M.MutMsg s))
+cloneCanonicalList
+    :: (U.RWCtx m s, M.MonadReadMessage mutIn m)
+    => U.List mutIn -> M.Message ('Mut s) -> m (U.List ('Mut s))
 cloneCanonicalList listIn msgOut =
     case listIn of
         U.List0 l -> U.List0 <$> U.allocList0 msgOut (U.length l)
@@ -119,7 +131,9 @@
         U.ListPtr l -> U.ListPtr <$> (U.allocListPtr msgOut (U.length l) >>= copyCanonicalPtrList l)
         U.ListStruct l -> U.ListStruct <$> cloneCanonicalStructList l msgOut
 
-copyCanonicalDataList :: (U.RWCtx m s, M.Message m msgIn) => U.ListOf msgIn a -> U.ListOf (M.MutMsg s) a -> m (U.ListOf (M.MutMsg s) a)
+copyCanonicalDataList
+    :: (U.RWCtx m s, M.MonadReadMessage mutIn m)
+    => U.ListOf mutIn a -> U.ListOf ('Mut s) a -> m (U.ListOf ('Mut s) a)
 copyCanonicalDataList listIn listOut = do
     for_ [0..U.length listIn - 1] $ \i -> do
         value <- U.index i listIn
@@ -127,10 +141,10 @@
     pure listOut
 
 copyCanonicalPtrList
-    :: (U.RWCtx m s, M.Message m msgIn)
-    => U.ListOf msgIn (Maybe (U.Ptr msgIn))
-    -> U.ListOf (M.MutMsg s) (Maybe (U.Ptr (M.MutMsg s)))
-    -> m (U.ListOf (M.MutMsg s) (Maybe (U.Ptr (M.MutMsg s))))
+    :: (U.RWCtx m s, M.MonadReadMessage mutIn m)
+    => U.ListOf mutIn (Maybe (U.Ptr mutIn))
+    -> U.ListOf ('Mut s) (Maybe (U.Ptr ('Mut s)))
+    -> m (U.ListOf ('Mut s) (Maybe (U.Ptr ('Mut s))))
 copyCanonicalPtrList listIn listOut = do
     for_ [0..U.length listIn - 1] $ \i -> do
         ptrIn <- U.index i listIn
@@ -139,10 +153,10 @@
     pure listOut
 
 cloneCanonicalStructList
-    :: (U.RWCtx m s, M.Message m msgIn)
-    => U.ListOf msgIn (U.Struct msgIn)
-    -> M.MutMsg s
-    -> m (U.ListOf (M.MutMsg s) (U.Struct (M.MutMsg s)))
+    :: (U.RWCtx m s, M.MonadReadMessage mutIn m)
+    => U.ListOf mutIn (U.Struct mutIn)
+    -> M.Message ('Mut s)
+    -> m (U.ListOf ('Mut s) (U.Struct ('Mut s)))
 cloneCanonicalStructList listIn msgOut = do
     (nWords, nPtrs) <- findCanonicalListSectionCounts listIn
     listOut <- U.allocCompositeList msgOut nWords nPtrs (U.length listIn)
@@ -150,9 +164,9 @@
     pure listOut
 
 copyCanonicalStructList
-    :: (U.RWCtx m s, M.Message m msgIn)
-    => U.ListOf msgIn (U.Struct msgIn)
-    -> U.ListOf (M.MutMsg s) (U.Struct (M.MutMsg s))
+    :: (U.RWCtx m s, M.MonadReadMessage mutIn m)
+    => U.ListOf mutIn (U.Struct mutIn)
+    -> U.ListOf ('Mut s) (U.Struct ('Mut s))
     -> m ()
 copyCanonicalStructList listIn listOut =
     for_ [0..U.length listIn - 1] $ \i -> do
@@ -160,7 +174,9 @@
         structOut <- U.index i listOut
         copyCanonicalStruct structIn structOut
 
-findCanonicalListSectionCounts :: U.ReadCtx m msg => U.ListOf msg (U.Struct msg) -> m (Word16, Word16)
+findCanonicalListSectionCounts
+    :: U.ReadCtx m mut
+    => U.ListOf mut (U.Struct mut) -> m (Word16, Word16)
 findCanonicalListSectionCounts list = go 0 0 0 where
     go i !nWords !nPtrs
         | i >= U.length list =
diff --git a/lib/Capnp/Classes.hs b/lib/Capnp/Classes.hs
--- a/lib/Capnp/Classes.hs
+++ b/lib/Capnp/Classes.hs
@@ -1,4 +1,5 @@
 {-# LANGUAGE ConstraintKinds        #-}
+{-# LANGUAGE DataKinds              #-}
 {-# LANGUAGE DefaultSignatures      #-}
 {-# LANGUAGE FlexibleContexts       #-}
 {-# LANGUAGE FlexibleInstances      #-}
@@ -55,6 +56,7 @@
 
 import Capnp.Bits    (Word1 (..))
 import Capnp.Errors  (Error(SchemaViolationError))
+import Capnp.Message (Mutability (..))
 import Capnp.Untyped (Cap, ListOf, Ptr (..), ReadCtx, Struct, messageDefault)
 
 import qualified Capnp.Message as M
@@ -66,14 +68,14 @@
 -- type parameter for pure modules, when reading.
 type ReadParam a =
     ( Decerialize a
-    , FromPtr M.ConstMsg (Cerial M.ConstMsg a)
+    , FromPtr 'Const  (Cerial 'Const a)
     )
 -- | Type alias for the constraints needed for 'a' to be used as a capnp
 -- type parameter for pure modules, when writing with state token 's'.
 type WriteParam s a =
     ( Cerialize s a
-    , ToPtr s (Cerial (M.MutMsg s) a)
-    , FromPtr (M.MutMsg s) (Cerial (M.MutMsg s) a)
+    , ToPtr s (Cerial ('Mut s) a)
+    , FromPtr ('Mut s) (Cerial ('Mut s) a)
     )
 
 -- | Types that can be converted to and from a 64-bit word.
@@ -89,9 +91,9 @@
     toWord :: a -> Word64
 
 -- | Types which may be stored as an element of a capnproto list.
-class ListElem msg e where
+class ListElem mut e where
     -- | The type of lists of @e@ stored in messages of type @msg@
-    data List msg e
+    data List mut e
 
     -- | Convert an untyped list to a list of this type. May fail
     -- with a 'SchemaViolationError' if the list does not have the
@@ -99,24 +101,24 @@
     --
     -- TODO: this is basically just fromPtr; refactor so this is less
     -- redundant.
-    listFromPtr :: U.ReadCtx m msg => msg -> Maybe (U.Ptr msg) -> m (List msg e)
+    listFromPtr :: U.ReadCtx m mut => M.Message mut -> Maybe (U.Ptr mut) -> m (List mut e)
 
-    toUntypedList :: List msg e -> U.List msg
+    toUntypedList :: List mut e -> U.List mut
 
     -- | Get the length of a list.
-    length :: List msg e -> Int
+    length :: List mut e -> Int
 
     -- | @'index' i list@ gets the @i@th element of a list.
-    index :: U.ReadCtx m msg => Int -> List msg e -> m e
+    index :: U.ReadCtx m mut => Int -> List mut e -> m e
 
 -- | Types which may be stored as an element of a *mutable* capnproto list.
-class (ListElem (M.MutMsg s) e) => MutListElem s e where
+class (ListElem ('Mut s) e) => MutListElem s e where
     -- | @'setIndex' value i list@ sets the @i@th index in @list@ to @value@
-    setIndex :: U.RWCtx m s => e -> Int -> List (M.MutMsg s) e -> m ()
+    setIndex :: U.RWCtx m s => e -> Int -> List ('Mut s) e -> m ()
 
     -- | @'newList' msg size@ allocates and returns a new list of length
     -- @size@ inside @msg@.
-    newList :: M.WriteCtx m s => M.MutMsg s -> Int -> m (List (M.MutMsg s) e)
+    newList :: M.WriteCtx m s => M.Message ('Mut s) -> Int -> m (List ('Mut s) e)
 
 -- | Types which may be stored in a capnproto message, and have a fixed size.
 --
@@ -124,7 +126,7 @@
 -- must be known to allocate a list.
 class Allocate s e | e -> s where
     -- @'new' msg@ allocates a new value of type @e@ inside @msg@.
-    new :: M.WriteCtx m s => M.MutMsg s -> m e
+    new :: M.WriteCtx m s => M.Message ('Mut s) -> m e
 
 -- | Types which may be extracted from a message.
 --
@@ -135,10 +137,10 @@
     --
     -- For the case of instances in generated high-level API code, this will
     -- be the low-level API analouge of the type.
-    type Cerial msg a
+    type Cerial (mut :: Mutability) a
 
     -- | Extract the value from the message.
-    decerialize :: U.ReadCtx m M.ConstMsg => Cerial M.ConstMsg a -> m a
+    decerialize :: U.ReadCtx m 'Const => Cerial 'Const a -> m a
 
 -- | Types which may be marshaled into a pre-allocated object in a message.
 class Decerialize a => Marshal s a where
@@ -148,16 +150,16 @@
     -- Note that caller must arrange for the object to be of the correct size.
     -- This is is not necessarily guaranteed; for example, list types must
     -- coordinate the length of the list.
-    marshalInto :: U.RWCtx m s => Cerial (M.MutMsg s) a -> a -> m ()
+    marshalInto :: U.RWCtx m s => Cerial ('Mut s) a -> a -> m ()
 
 -- | Types which may be inserted into a message.
 class Decerialize a => Cerialize s a where
 
     -- | Cerialize a value into the supplied message, returning the result.
-    cerialize :: U.RWCtx m s => M.MutMsg s -> a -> m (Cerial (M.MutMsg s) a)
+    cerialize :: U.RWCtx m s => M.Message ('Mut s) -> a -> m (Cerial ('Mut s) a)
 
-    default cerialize :: (U.RWCtx m s, Marshal s a, Allocate s (Cerial (M.MutMsg s) a))
-        => M.MutMsg s -> a -> m (Cerial (M.MutMsg s) a)
+    default cerialize :: (U.RWCtx m s, Marshal s a, Allocate s (Cerial ('Mut s) a))
+        => M.Message ('Mut s) -> a -> m (Cerial ('Mut s) a)
     cerialize msg value = do
         raw <- new msg
         marshalInto raw value
@@ -165,26 +167,26 @@
 
 -- | Types that can be converted from an untyped pointer.
 --
--- Note that decoding do not have to succeed, if the pointer is
+-- Note that decoding does not have to succeed, if the pointer is
 -- the wrong type.
-class FromPtr msg a where
+class FromPtr mut a where
     -- | Convert an untyped pointer to an @a@.
-    fromPtr :: ReadCtx m msg => msg -> Maybe (Ptr msg) -> m a
+    fromPtr :: ReadCtx m mut => M.Message mut -> Maybe (Ptr mut) -> m a
 
 -- | Types that can be converted to an untyped pointer.
 class ToPtr s a where
     -- | Convert an @a@ to an untyped pointer.
-    toPtr :: M.WriteCtx m s => M.MutMsg s -> a -> m (Maybe (Ptr (M.MutMsg s)))
+    toPtr :: M.WriteCtx m s => M.Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
 
 -- | Types that can be extracted from a struct.
-class FromStruct msg a | a -> msg where
+class FromStruct mut a | a -> mut where
     -- | Extract a value from a struct.
-    fromStruct :: ReadCtx m msg => Struct msg -> m a
+    fromStruct :: ReadCtx m mut => Struct mut -> m a
 
 -- | Types that can be converted to a struct.
-class ToStruct msg a | a -> msg where
+class ToStruct mut a | a -> mut where
     -- | Convert a value to a struct.
-    toStruct :: a -> Struct msg
+    toStruct :: a -> Struct mut
 
 ------- instances -------
 
@@ -235,77 +237,77 @@
 expected msg = throwM $ SchemaViolationError $ "expected " ++ msg
 
 -- To/FromPtr instance for lists of Void/().
-instance FromPtr msg (ListOf msg ()) where
-    fromPtr msg Nothing                         = messageDefault msg
+instance FromPtr mut (ListOf mut ()) where
+    fromPtr msg Nothing                       = messageDefault msg
     fromPtr _ (Just (PtrList (U.List0 list))) = pure list
     fromPtr _ _ = expected "pointer to list with element size 0"
-instance ToPtr s (ListOf (M.MutMsg s) ()) where
+instance ToPtr s (ListOf ('Mut s) ()) where
     toPtr _ = pure . Just . PtrList . U.List0
 
 -- To/FromPtr instances for lists of unsigned integers.
-instance FromPtr msg (ListOf msg Word8) where
+instance FromPtr mut (ListOf mut Word8) where
     fromPtr msg Nothing                       = messageDefault msg
     fromPtr _ (Just (PtrList (U.List8 list))) = pure list
     fromPtr _ _ = expected "pointer to list with element size 8"
-instance ToPtr s (ListOf (M.MutMsg s) Word8) where
+instance ToPtr s (ListOf ('Mut s) Word8) where
     toPtr _ = pure . Just . PtrList . U.List8
-instance FromPtr msg (ListOf msg Word16) where
+instance FromPtr mut (ListOf mut Word16) where
     fromPtr msg Nothing                       = messageDefault msg
     fromPtr _ (Just (PtrList (U.List16 list))) = pure list
     fromPtr _ _ = expected "pointer to list with element size 16"
-instance ToPtr s (ListOf (M.MutMsg s) Word16) where
+instance ToPtr s (ListOf ('Mut s) Word16) where
     toPtr _ = pure . Just . PtrList . U.List16
-instance FromPtr msg (ListOf msg Word32) where
+instance FromPtr mut (ListOf mut Word32) where
     fromPtr msg Nothing                       = messageDefault msg
     fromPtr _ (Just (PtrList (U.List32 list))) = pure list
     fromPtr _ _ = expected "pointer to list with element size 32"
-instance ToPtr s (ListOf (M.MutMsg s) Word32) where
+instance ToPtr s (ListOf ('Mut s) Word32) where
     toPtr _ = pure . Just . PtrList . U.List32
-instance FromPtr msg (ListOf msg Word64) where
-    fromPtr msg Nothing                       = messageDefault msg
+instance FromPtr mut (ListOf mut Word64) where
+    fromPtr msg Nothing                        = messageDefault msg
     fromPtr _ (Just (PtrList (U.List64 list))) = pure list
     fromPtr _ _ = expected "pointer to list with element size 64"
-instance ToPtr s (ListOf (M.MutMsg s) Word64) where
+instance ToPtr s (ListOf ('Mut s) Word64) where
     toPtr _ = pure . Just . PtrList . U.List64
 
-instance FromPtr msg (ListOf msg Bool) where
+instance FromPtr mut (ListOf mut Bool) where
     fromPtr msg Nothing = messageDefault msg
     fromPtr _ (Just (PtrList (U.List1 list))) = pure list
     fromPtr _ _ = expected "pointer to list with element size 1."
-instance ToPtr s (ListOf (M.MutMsg s) Bool) where
+instance ToPtr s (ListOf ('Mut s) Bool) where
     toPtr _ = pure . Just . PtrList . U.List1
 
 -- To/FromPtr instance for pointers -- this is just the identity.
-instance FromPtr msg (Maybe (Ptr msg)) where
+instance FromPtr mut (Maybe (Ptr mut)) where
     fromPtr _ = pure
-instance ToPtr s (Maybe (Ptr (M.MutMsg s))) where
+instance ToPtr s (Maybe (Ptr ('Mut s))) where
     toPtr _ = pure
 
 -- To/FromPtr instance for composite lists.
-instance FromPtr msg (ListOf msg (Struct msg)) where
+instance FromPtr mut (ListOf mut (Struct mut)) where
     fromPtr msg Nothing                            = messageDefault msg
     fromPtr _ (Just (PtrList (U.ListStruct list))) = pure list
     fromPtr _ _ = expected "pointer to list of structs"
-instance ToPtr s (ListOf (M.MutMsg s) (Struct (M.MutMsg s))) where
+instance ToPtr s (ListOf ('Mut s) (Struct ('Mut s))) where
     toPtr _ = pure . Just . PtrList . U.ListStruct
 
 -- To/FromPtr instance for lists of pointers.
-instance FromPtr msg (ListOf msg (Maybe (Ptr msg))) where
+instance FromPtr mut (ListOf mut (Maybe (Ptr mut))) where
     fromPtr msg Nothing                         = messageDefault msg
     fromPtr _ (Just (PtrList (U.ListPtr list))) = pure list
     fromPtr _ _ = expected "pointer to list of pointers"
-instance ToPtr s (ListOf (M.MutMsg s) (Maybe (Ptr (M.MutMsg s)))) where
+instance ToPtr s (ListOf ('Mut s) (Maybe (Ptr ('Mut s)))) where
     toPtr _ = pure . Just . PtrList . U.ListPtr
 
 -- To/FromPtr instance for *typed* lists.
-instance ListElem msg e => FromPtr msg (List msg e) where
+instance ListElem mut e => FromPtr mut (List mut e) where
     fromPtr = listFromPtr
-instance ListElem (M.MutMsg s) e => ToPtr s (List (M.MutMsg s) e) where
+instance ListElem ('Mut s) e => ToPtr s (List ('Mut s) e) where
     toPtr _ = pure . Just . PtrList . toUntypedList
 
 -- ListElem instance for (typed) nested lists.
-instance ListElem msg e => ListElem msg (List msg e) where
-    newtype List msg (List msg e) = NestedList (U.ListOf msg (Maybe (U.Ptr msg)))
+instance ListElem mut e => ListElem mut (List mut e) where
+    newtype List mut (List mut e) = NestedList (U.ListOf mut (Maybe (U.Ptr mut)))
 
     listFromPtr msg ptr = NestedList <$> fromPtr msg ptr
     toUntypedList (NestedList l) = U.ListPtr l
@@ -315,29 +317,29 @@
         ptr <- U.index i l
         fromPtr (U.message l) ptr
 
-instance MutListElem s e => MutListElem s (List (M.MutMsg s) e) where
+instance MutListElem s e => MutListElem s (List ('Mut s) e) where
     setIndex e i (NestedList l) = U.setIndex (Just (U.PtrList (toUntypedList e))) i l
     newList msg len = NestedList <$> U.allocListPtr msg len
 
 -- FromStruct instance for Struct; just the identity.
-instance FromStruct msg (Struct msg) where
+instance FromStruct mut (Struct mut) where
     fromStruct = pure
 
-instance ToStruct msg (Struct msg) where
+instance ToStruct mut (Struct mut) where
     toStruct = id
 
-instance FromPtr msg (Struct msg) where
+instance FromPtr mut (Struct mut) where
     fromPtr msg Nothing            = messageDefault msg >>= fromStruct
     fromPtr _ (Just (PtrStruct s)) = fromStruct s
     fromPtr _ _                    = expected "pointer to struct"
-instance ToPtr s (Struct (M.MutMsg s)) where
+instance ToPtr s (Struct ('Mut s)) where
     toPtr _ = pure . Just . PtrStruct
 
-instance FromPtr msg (Maybe (Cap msg)) where
+instance FromPtr mut (Maybe (Cap mut)) where
     fromPtr _ Nothing             = pure Nothing
     fromPtr _ (Just (PtrCap cap)) = pure (Just cap)
     fromPtr _ _                   = expected "pointer to capability"
-instance ToPtr s (Maybe (Cap (M.MutMsg s))) where
+instance ToPtr s (Maybe (Cap ('Mut s))) where
     toPtr _ = pure . fmap PtrCap
 
 -- | A valid implementation of 'cerialize', which just cerializes the
@@ -348,12 +350,12 @@
 -- the list, doing extra work and leaking space. See 'cerializeCompositeVec'.
 cerializeBasicVec ::
     ( U.RWCtx m s
-    , MutListElem s (Cerial (M.MutMsg s) a)
+    , MutListElem s (Cerial ('Mut s) a)
     , Cerialize s a
     )
-    => M.MutMsg s
+    => M.Message ('Mut s)
     -> V.Vector a
-    -> m (List (M.MutMsg s) (Cerial (M.MutMsg s) a))
+    -> m (List ('Mut s) (Cerial ('Mut s) a))
 cerializeBasicVec msg vec = do
     list <- newList msg (V.length vec)
     for_ [0..V.length vec - 1] $ \i -> do
@@ -367,12 +369,12 @@
 -- 'cerializeBasicVec', hence the name.
 cerializeCompositeVec ::
     ( U.RWCtx m s
-    , MutListElem s (Cerial (M.MutMsg s) a)
+    , MutListElem s (Cerial ('Mut s) a)
     , Marshal s a
     )
-    => M.MutMsg s
+    => M.Message ('Mut s)
     -> V.Vector a
-    -> m (List (M.MutMsg s) (Cerial (M.MutMsg s) a))
+    -> m (List ('Mut s) (Cerial ('Mut s) a))
 cerializeCompositeVec msg vec = do
     list <- newList msg (V.length vec)
     for_ [0..V.length vec - 1] $ \i -> do
@@ -382,9 +384,9 @@
 
 -- Generic decerialize instances for lists, given that the element type has an instance.
 instance
-    ( ListElem M.ConstMsg (Cerial M.ConstMsg a)
+    ( ListElem 'Const (Cerial 'Const a)
     , Decerialize a
     ) => Decerialize (V.Vector a)
   where
-    type Cerial msg (V.Vector a) = List msg (Cerial msg a)
+    type Cerial mut (V.Vector a) = List mut (Cerial mut a)
     decerialize raw = V.generateM (length raw) (\i -> index i raw >>= decerialize)
diff --git a/lib/Capnp/Convert.hs b/lib/Capnp/Convert.hs
--- a/lib/Capnp/Convert.hs
+++ b/lib/Capnp/Convert.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds        #-}
 {-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE TypeFamilies     #-}
 {-|
@@ -29,10 +30,9 @@
     , valueToMsg
     ) where
 
-import Control.Monad         ((>=>))
-import Control.Monad.Catch   (MonadThrow)
-import Data.Foldable         (foldlM)
-import Data.Functor.Identity (runIdentity)
+import Control.Monad       ((>=>))
+import Control.Monad.Catch (MonadThrow)
+import Data.Foldable       (foldlM)
 
 import qualified Data.ByteString         as BS
 import qualified Data.ByteString.Builder as BB
@@ -41,6 +41,7 @@
 import Capnp.Classes
 
 import Capnp.Bits           (WordCount)
+import Capnp.Message        (Mutability (..))
 import Capnp.TraversalLimit (LimitT, MonadLimit, evalLimitT)
 import Codec.Capnp          (getRoot, setRoot)
 import Data.Mutable         (freeze)
@@ -50,7 +51,7 @@
 -- | Compute a reasonable limit based on the size of a message. The limit
 -- is the total number of words in all of the message's segments, multiplied
 -- by 10 to provide some slack for decoding default values.
-limitFromMsg :: (MonadThrow m, M.Message m msg) => msg -> m WordCount
+limitFromMsg :: (MonadThrow m, M.MonadReadMessage mut m) => M.Message mut -> m WordCount
 limitFromMsg msg = do
     messageWords <- countMessageWords
     pure (messageWords * 10)
@@ -67,55 +68,55 @@
 
 -- | Convert an immutable message to a bytestring 'BB.Builder'.
 -- To convert a mutable message, 'freeze' it first.
-msgToBuilder :: M.ConstMsg -> BB.Builder
-msgToBuilder = runIdentity . M.encode
+msgToBuilder :: M.Message 'Const -> BB.Builder
+msgToBuilder = M.encode
 
 -- | Convert an immutable message to a lazy 'LBS.ByteString'.
 -- To convert a mutable message, 'freeze' it first.
-msgToLBS :: M.ConstMsg -> LBS.ByteString
+msgToLBS :: M.Message 'Const -> LBS.ByteString
 msgToLBS = BB.toLazyByteString . msgToBuilder
 
 -- | Convert an immutable message to a strict 'BS.ByteString'.
 -- To convert a mutable message, 'freeze' it first.
-msgToBS :: M.ConstMsg -> BS.ByteString
+msgToBS :: M.Message 'Const -> BS.ByteString
 msgToBS = LBS.toStrict . msgToLBS
 
 -- | Convert a message to a value.
-msgToValue :: (MonadThrow m, M.Message (LimitT m) msg, M.Message m msg, FromStruct msg a) => msg -> m a
+msgToValue :: (MonadThrow m, M.MonadReadMessage mut (LimitT m), M.MonadReadMessage mut m, FromStruct mut a) => M.Message mut -> m a
 msgToValue msg = do
     limit <- limitFromMsg msg
     evalLimitT limit (getRoot msg)
 
 -- | Convert a strict 'BS.ByteString' to a message.
-bsToMsg :: MonadThrow m => BS.ByteString -> m M.ConstMsg
+bsToMsg :: MonadThrow m => BS.ByteString -> m (M.Message 'Const)
 bsToMsg = M.decode
 
 -- | Convert a strict 'BS.ByteString' to a value.
-bsToValue :: (MonadThrow m, FromStruct M.ConstMsg a) => BS.ByteString -> m a
+bsToValue :: (MonadThrow m, FromStruct 'Const a) => BS.ByteString -> m a
 bsToValue = bsToMsg >=> msgToValue
 
 -- | Convert a lazy 'LBS.ByteString' to a message.
-lbsToMsg :: MonadThrow m => LBS.ByteString -> m M.ConstMsg
+lbsToMsg :: MonadThrow m => LBS.ByteString -> m (M.Message 'Const)
 lbsToMsg = bsToMsg . LBS.toStrict
 
 -- | Convert a lazy 'LBS.ByteString' to a value.
-lbsToValue :: (MonadThrow m, FromStruct M.ConstMsg a) => LBS.ByteString -> m a
+lbsToValue :: (MonadThrow m, FromStruct 'Const a) => LBS.ByteString -> m a
 lbsToValue = bsToValue . LBS.toStrict
 
 -- | Convert a value to a 'BS.Builder'.
-valueToBuilder :: (MonadLimit m, M.WriteCtx m s, Cerialize s a, ToStruct (M.MutMsg s) (Cerial (M.MutMsg s) a)) => a -> m BB.Builder
+valueToBuilder :: (MonadLimit m, M.WriteCtx m s, Cerialize s a, ToStruct ('Mut s) (Cerial ('Mut s) a)) => a -> m BB.Builder
 valueToBuilder val = msgToBuilder <$> (valueToMsg val >>= freeze)
 
 -- | Convert a value to a strict 'BS.ByteString'.
-valueToBS :: (MonadLimit m, M.WriteCtx m s, Cerialize s a, ToStruct (M.MutMsg s) (Cerial (M.MutMsg s) a)) => a -> m BS.ByteString
+valueToBS :: (MonadLimit m, M.WriteCtx m s, Cerialize s a, ToStruct ('Mut s) (Cerial ('Mut s) a)) => a -> m BS.ByteString
 valueToBS = fmap LBS.toStrict . valueToLBS
 
 -- | Convert a value to a lazy 'LBS.ByteString'.
-valueToLBS :: (MonadLimit m, M.WriteCtx m s, Cerialize s a, ToStruct (M.MutMsg s) (Cerial (M.MutMsg s) a)) => a -> m LBS.ByteString
+valueToLBS :: (MonadLimit m, M.WriteCtx m s, Cerialize s a, ToStruct ('Mut s) (Cerial ('Mut s) a)) => a -> m LBS.ByteString
 valueToLBS = fmap BB.toLazyByteString . valueToBuilder
 
 -- | Convert a value to a message.
-valueToMsg :: (MonadLimit m, M.WriteCtx m s, Cerialize s a, ToStruct (M.MutMsg s) (Cerial (M.MutMsg s) a)) => a -> m (M.MutMsg s)
+valueToMsg :: (MonadLimit m, M.WriteCtx m s, Cerialize s a, ToStruct ('Mut s) (Cerial ('Mut s) a)) => a -> m (M.Message ('Mut s))
 valueToMsg val = do
     msg <- M.newMessage Nothing
     ret <- cerialize msg val
diff --git a/lib/Capnp/GenHelpers.hs b/lib/Capnp/GenHelpers.hs
--- a/lib/Capnp/GenHelpers.hs
+++ b/lib/Capnp/GenHelpers.hs
@@ -8,6 +8,7 @@
 These helpers are used by the low-level api. "Capnp.GenHelpers.Pure"
 defines helpers used by high-level api.
 -}
+{-# LANGUAGE DataKinds        #-}
 {-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE TypeFamilies     #-}
 module Capnp.GenHelpers where
@@ -21,7 +22,7 @@
 
 import Capnp.Bits
 
-import Capnp (bsToMsg, evalLimitT)
+import Capnp (Mutability (..), bsToMsg, evalLimitT)
 
 import qualified Capnp.Classes as C
 import qualified Capnp.Message as M
@@ -31,7 +32,7 @@
 -- struct's data section. @index@ is the index of the 64-bit word in the data
 -- section in which the field resides. @offset@ is the offset in bits from the
 -- start of that word to the field. @def@ is the default value for this field.
-getWordField :: (U.ReadCtx m msg, C.IsWord a) => U.Struct msg -> Int -> Int -> Word64 -> m a
+getWordField :: (U.ReadCtx m mut, C.IsWord a) => U.Struct mut -> Int -> Int -> Word64 -> m a
 getWordField struct idx offset def = fmap
     ( C.fromWord
     . xor def
@@ -47,13 +48,13 @@
     ( U.RWCtx m s
     , Bounded a, Integral a, C.IsWord a, Bits a
     )
-    => U.Struct (M.MutMsg s) -> a -> Int -> Int -> Word64 -> m ()
+    => U.Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
 setWordField struct value idx offset def = do
     old <- U.getData idx struct
     let new = replaceBits (value `xor` C.fromWord def) old offset
     U.setData new idx struct
 
-embedCapPtr :: M.WriteCtx m s => M.MutMsg s -> M.Client -> m (Maybe (U.Ptr (M.MutMsg s)))
+embedCapPtr :: M.WriteCtx m s => M.Message ('Mut s) -> M.Client -> m (Maybe (U.Ptr ('Mut s)))
 embedCapPtr msg client =
     Just . U.PtrCap <$> U.appendCap msg client
 
@@ -64,13 +65,13 @@
 -- if decoding is not successful.
 --
 -- The purpose of this is for defining constants of pointer type from a schema.
-getPtrConst :: C.FromPtr M.ConstMsg a => BS.ByteString -> a
+getPtrConst :: C.FromPtr 'Const a => BS.ByteString -> a
 getPtrConst bytes = fromJust $ do
     msg <- bsToMsg bytes
     evalLimitT maxBound $ U.rootPtr msg >>= U.getPtr 0 >>= C.fromPtr msg
 
 
-getTag :: U.ReadCtx m msg => U.Struct msg -> Int -> m Word16
+getTag :: U.ReadCtx m mut => U.Struct mut -> Int -> m Word16
 getTag struct offset = do
     word <- U.getData (offset `div` 4) struct
     pure $ fromIntegral $ word `shiftR` ((offset `mod` 4) * 16)
diff --git a/lib/Capnp/GenHelpers/Pure.hs b/lib/Capnp/GenHelpers/Pure.hs
--- a/lib/Capnp/GenHelpers/Pure.hs
+++ b/lib/Capnp/GenHelpers/Pure.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds             #-}
 {-# LANGUAGE FlexibleContexts      #-}
 {-# LANGUAGE FlexibleInstances     #-}
 {-# LANGUAGE MultiParamTypeClasses #-}
@@ -26,6 +27,7 @@
 import Data.Maybe (fromJust)
 
 import Capnp.Classes        (cerializeBasicVec, cerializeCompositeVec)
+import Capnp.Message        (Mutability (..))
 import Capnp.TraversalLimit (evalLimitT)
 import Codec.Capnp          (getRoot)
 
@@ -39,7 +41,7 @@
 
 -- | A valid implementation for 'Data.Default.Default' for any type that meets
 -- the given constraints.
-defaultStruct :: (C.Decerialize a, C.FromStruct M.ConstMsg (C.Cerial M.ConstMsg a)) => a
+defaultStruct :: (C.Decerialize a, C.FromStruct 'Const (C.Cerial 'Const a)) => a
 defaultStruct =
     fromJust $
     evalLimitT maxBound $
@@ -47,17 +49,17 @@
 
 convertValue ::
     ( U.RWCtx m s
-    , M.Message m M.ConstMsg
+    , M.MonadReadMessage 'Const m
     , C.Cerialize s a
-    , C.ToStruct (M.MutMsg s) (C.Cerial (M.MutMsg s) a)
+    , C.ToStruct ('Mut s) (C.Cerial ('Mut s) a)
     , C.Decerialize b
-    , C.FromStruct M.ConstMsg (C.Cerial M.ConstMsg b)
+    , C.FromStruct 'Const (C.Cerial 'Const b)
     ) => a -> m b
 convertValue from = do
-    constMsg :: M.ConstMsg <- Convert.valueToMsg from >>= freeze
+    constMsg :: M.Message 'Const <- Convert.valueToMsg from >>= freeze
     Convert.msgToValue constMsg >>= C.decerialize
 
 -- | convert a low-level value to a high-level one. This is not safe against
 -- malicious or invalid input; it is used for declaring top-level constants.
-toPurePtrConst :: C.Decerialize a => C.Cerial M.ConstMsg a -> a
+toPurePtrConst :: C.Decerialize a => C.Cerial 'Const a -> a
 toPurePtrConst = fromJust . evalLimitT maxBound . C.decerialize
diff --git a/lib/Capnp/GenHelpers/Rpc.hs b/lib/Capnp/GenHelpers/Rpc.hs
--- a/lib/Capnp/GenHelpers/Rpc.hs
+++ b/lib/Capnp/GenHelpers/Rpc.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds             #-}
 {-# LANGUAGE DuplicateRecordFields #-}
 {-# LANGUAGE FlexibleContexts      #-}
 {-# LANGUAGE OverloadedStrings     #-}
@@ -15,6 +16,7 @@
 import Data.Default           (def)
 
 import Capnp.Classes        (Decerialize (..), FromPtr (..))
+import Capnp.Message        (Mutability (..))
 import Capnp.TraversalLimit (evalLimitT)
 
 import qualified Capnp.Errors          as E
@@ -48,7 +50,7 @@
 -- GHC gets very confused if we try to just define a single instance
 -- @IsClient a => FromPtr msg a@, so instead we define this helper function and
 -- emit a trivial instance for each type from the code generator.
-isClientFromPtr :: (Rpc.IsClient a, U.ReadCtx m msg) => msg -> Maybe (U.Ptr msg) -> m a
+isClientFromPtr :: (Rpc.IsClient a, U.ReadCtx m mut) => M.Message mut -> Maybe (U.Ptr mut) -> m a
 isClientFromPtr _ Nothing                     = pure $ Rpc.fromClient Rpc.nullClient
 isClientFromPtr _ (Just (U.PtrCap cap)) = Rpc.fromClient <$> U.getClient cap
 isClientFromPtr _ (Just _) = throwM $ E.SchemaViolationError "Expected capability pointer"
@@ -56,7 +58,7 @@
 -- | A valid implementation of 'toPtr' for any type that implements 'IsClient'.
 --
 -- See the notes for 'isClientFromPtr'.
-isClientToPtr :: (Rpc.IsClient a, M.WriteCtx m s) => M.MutMsg s -> a -> m (Maybe (U.Ptr (M.MutMsg s)))
+isClientToPtr :: (Rpc.IsClient a, M.WriteCtx m s) => M.Message ('Mut s) -> a -> m (Maybe (U.Ptr ('Mut s)))
 isClientToPtr msg client = do
     cap <- U.appendCap msg (Rpc.toClient client)
     pure $ Just $ U.PtrCap cap
diff --git a/lib/Capnp/IO.hs b/lib/Capnp/IO.hs
--- a/lib/Capnp/IO.hs
+++ b/lib/Capnp/IO.hs
@@ -6,6 +6,7 @@
 from file 'Handle's.
 -}
 {-# LANGUAGE BangPatterns     #-}
+{-# LANGUAGE DataKinds        #-}
 {-# LANGUAGE FlexibleContexts #-}
 module Capnp.IO
     ( hGetValue
@@ -33,10 +34,11 @@
 
 import qualified Data.ByteString as BS
 
-import Capnp.Bits    (WordCount, wordsToBytes)
+import Capnp.Bits           (WordCount, wordsToBytes)
 import Capnp.Classes
     (Cerialize (..), Decerialize (..), FromStruct (..), ToStruct (..))
 import Capnp.Convert        (msgToLBS, valueToLBS)
+import Capnp.Message        (Mutability (..))
 import Capnp.TraversalLimit (evalLimitT)
 import Codec.Capnp          (getRoot, setRoot)
 import Data.Mutable         (Thaw (..))
@@ -49,23 +51,23 @@
 --
 -- It may throw a 'Capnp.Errors.Error' if there is a problem decoding the message,
 -- or an 'IOError' raised by the underlying IO libraries.
-hGetValue :: FromStruct M.ConstMsg a => Handle -> WordCount -> IO a
+hGetValue :: FromStruct 'Const a => Handle -> WordCount -> IO a
 hGetValue handle limit = do
     msg <- M.hGetMsg handle limit
     evalLimitT limit (getRoot msg)
 
 -- | @'getValue'@ is equivalent to @'hGetValue' 'stdin'@.
-getValue :: FromStruct M.ConstMsg a => WordCount -> IO a
+getValue :: FromStruct 'Const a => WordCount -> IO a
 getValue = hGetValue stdin
 
 -- | Like 'hGetValue', except that it takes a socket instead of a 'Handle'.
-sGetValue :: FromStruct M.ConstMsg a => Socket -> WordCount -> IO a
+sGetValue :: FromStruct 'Const a => Socket -> WordCount -> IO a
 sGetValue socket limit = do
     msg <- sGetMsg socket limit
     evalLimitT limit (getRoot msg)
 
 -- | Like 'hGetMsg', except that it takes a socket instead of a 'Handle'.
-sGetMsg :: Socket -> WordCount -> IO M.ConstMsg
+sGetMsg :: Socket -> WordCount -> IO (M.Message 'Const)
 sGetMsg socket limit =
     evalLimitT limit $ M.readMessage (lift read32) (lift . readSegment)
   where
@@ -76,9 +78,8 @@
             (fromIntegral (bytes `BS.index` 1) `shiftL`  8) .|.
             (fromIntegral (bytes `BS.index` 2) `shiftL` 16) .|.
             (fromIntegral (bytes `BS.index` 3) `shiftL` 24)
-    readSegment !words = do
-        bytes <- recvFull (fromIntegral $ wordsToBytes words)
-        M.fromByteString bytes
+    readSegment !words =
+        M.fromByteString <$> recvFull (fromIntegral $ wordsToBytes words)
 
     -- | Like recv, but (1) never returns less than `count` bytes, (2)
     -- uses `socket`, rather than taking the socket as an argument, and (3)
@@ -98,7 +99,7 @@
 -- | @'hPutValue' handle value@ writes @value@ to handle, as the root object of
 -- a message. If it throws an exception, it will be an 'IOError' raised by the
 -- underlying IO libraries.
-hPutValue :: (Cerialize RealWorld a, ToStruct (M.MutMsg RealWorld) (Cerial (M.MutMsg RealWorld) a))
+hPutValue :: (Cerialize RealWorld a, ToStruct ('Mut RealWorld) (Cerial ('Mut RealWorld) a))
     => Handle -> a -> IO ()
 hPutValue handle value = do
     msg <- M.newMessage Nothing
@@ -108,16 +109,16 @@
     M.hPutMsg handle constMsg
 
 -- | 'putValue' is equivalent to @'hPutValue' 'stdin'@
-putValue :: (Cerialize RealWorld a, ToStruct (M.MutMsg RealWorld) (Cerial (M.MutMsg RealWorld) a))
+putValue :: (Cerialize RealWorld a, ToStruct ('Mut RealWorld) (Cerial ('Mut RealWorld) a))
     => a -> IO ()
 putValue = hPutValue stdout
 
 -- | Like 'hPutMsg', except that it takes a 'Socket' instead of a 'Handle'.
-sPutMsg :: Socket -> M.ConstMsg -> IO ()
+sPutMsg :: Socket -> M.Message 'Const -> IO ()
 sPutMsg socket = sendLazy socket . msgToLBS
 
 -- | Like 'hPutValue', except that it takes a 'Socket' instead of a 'Handle'.
-sPutValue :: (Cerialize RealWorld a, ToStruct (M.MutMsg RealWorld) (Cerial (M.MutMsg RealWorld) a))
+sPutValue :: (Cerialize RealWorld a, ToStruct ('Mut RealWorld) (Cerial ('Mut RealWorld) a))
     => Socket -> a -> IO ()
 sPutValue socket value = do
     lbs <- evalLimitT maxBound $ valueToLBS value
diff --git a/lib/Capnp/Message.hs b/lib/Capnp/Message.hs
--- a/lib/Capnp/Message.hs
+++ b/lib/Capnp/Message.hs
@@ -1,6 +1,8 @@
 {-# LANGUAGE ConstraintKinds       #-}
+{-# LANGUAGE DataKinds             #-}
 {-# LANGUAGE FlexibleContexts      #-}
 {-# LANGUAGE FlexibleInstances     #-}
+{-# LANGUAGE GADTs                 #-}
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE NamedFieldPuns        #-}
 {-# LANGUAGE TypeFamilies          #-}
@@ -11,8 +13,12 @@
 This module provides support for working directly with Cap'N Proto messages.
 -}
 module Capnp.Message (
+      Message
+    , Segment
+    , Mutability(..)
+
     -- * Reading and writing messages
-      hPutMsg
+    , hPutMsg
     , hGetMsg
     , putMsg
     , getMsg
@@ -28,23 +34,21 @@
     -- * Converting between messages and 'ByteString's
     , encode
     , decode
-
-    -- * Message type class
-    , Message(..)
+    , toByteString
+    , fromByteString
 
     -- * Immutable messages
-    , ConstMsg
     , empty
     , singleSegment
 
     -- * Reading data from messages
+    , MonadReadMessage(..)
     , getSegment
     , getWord
     , getCap
     , getCapTable
 
     -- * Mutable Messages
-    , MutMsg
     , newMessage
 
     -- ** Allocating space in messages
@@ -81,6 +85,7 @@
 import Control.Monad.Writer      (execWriterT, tell)
 import Data.ByteString.Internal  (ByteString (..))
 import Data.Bytes.Get            (getWord32le, runGetS)
+import Data.Kind                 (Type)
 import Data.Maybe                (fromJust)
 import Data.Primitive            (MutVar, newMutVar, readMutVar, writeMutVar)
 import Data.Word                 (Word32, Word64)
@@ -117,71 +122,106 @@
 maxCaps :: Int
 maxCaps = 512
 
+
+data Mutability = Const | Mut Type
+
 -- | A pointer to a location in a message. This encodes the same
 -- information as a 'WordAddr', but also includes direct references
 -- to the segment and message, which can improve performance in very
 -- low-level code.
-data WordPtr msg = WordPtr
+data WordPtr mut = WordPtr
     -- invariants:
-    -- * pAddr's segment index refers to pSegment.
-    -- * pSegment is in pMessage.
-    { pMessage :: !msg
-    , pSegment :: !(Segment msg)
+    --
+    -- - pAddr's segment index refers to pSegment.
+    -- - pSegment is in pMessage.
+    { pMessage :: !(Message mut)
+    , pSegment :: !(Segment mut)
     , pAddr    :: !WordAddr
     }
 
+data Message (mut :: Mutability) where
+    MsgConst :: !ConstMsg -> Message 'Const
+    MsgMut :: !(MutMsg s) -> Message ('Mut s)
+
+instance Eq (Message mut) where
+    (MsgConst x) == (MsgConst y) = x == y
+    (MsgMut x) == (MsgMut y)     = x == y
+
+data Segment (mut :: Mutability) where
+    SegConst :: !ConstSegment -> Segment 'Const
+    SegMut :: !(MutSegment s) -> Segment ('Mut s)
+
+instance Eq (Segment mut)  where
+    (SegConst x) == (SegConst y) = x == y
+    (SegMut x) == (SegMut y)     = x == y
+
+data MutSegment s = MutSegment
+    { vec  :: SMV.MVector s Word64
+    , used :: MutVar s WordCount
+    }
+
+instance Eq (MutSegment s) where
+    MutSegment{used=x} == MutSegment{used=y} = x == y
+
+newtype ConstSegment = ConstSegment (SV.Vector Word64)
+    deriving(Eq)
+
 -- | A 'Message' is a (possibly read-only) capnproto message. It is
 -- parameterized over a monad in which operations are performed.
-class Monad m => Message m msg where
-    -- | The type of segments in the message.
-    data Segment msg
-
+class Monad m => MonadReadMessage mut m where
     -- | 'numSegs' gets the number of segments in a message.
-    numSegs :: msg -> m Int
+    numSegs :: Message mut -> m Int
     -- | 'numWords' gets the number of words in a segment.
-    numWords :: Segment msg -> m WordCount
+    numWords :: Segment mut -> m WordCount
     -- | 'numCaps' gets the number of capabilities in a message's capability
     -- table.
-    numCaps :: msg -> m Int
+    numCaps :: Message mut -> m Int
     -- | @'internalGetSeg' message index@ gets the segment at index 'index'
     -- in 'message'. Most callers should use the 'getSegment' wrapper, instead
     -- of calling this directly.
-    internalGetSeg :: msg -> Int -> m (Segment msg)
+    internalGetSeg :: Message mut -> Int -> m (Segment mut)
     -- | @'internalGetCap' cap index@ reads a capability from the message's
     -- capability table, returning the client. does not check bounds. Callers
     -- should use getCap instead.
-    internalGetCap :: msg -> Int -> m Client
+    internalGetCap :: Message mut -> Int -> m Client
     -- | @'slice' start length segment@ extracts a sub-section of the segment,
     -- starting at index @start@, of length @length@.
-    slice   :: WordCount -> WordCount -> Segment msg -> m (Segment msg)
+    slice   :: WordCount -> WordCount -> Segment mut -> m (Segment mut)
     -- | @'read' segment index@ reads a 64-bit word from the segement at the
     -- given index. Consider using 'getWord' on the message, instead of
     -- calling this directly.
-    read    :: Segment msg -> WordCount -> m Word64
-    -- | Convert a ByteString to a segment.
-    fromByteString :: ByteString -> m (Segment msg)
-    -- | Convert a segment to a byte string.
-    toByteString :: Segment msg -> m ByteString
+    read    :: Segment mut -> WordCount -> m Word64
 
+-- | Convert a ByteString to a segment. O(1)
+fromByteString :: ByteString -> Segment 'Const
+-- FIXME: Verify that the pointer is actually 64-bit aligned before casting.
+fromByteString (PS fptr offset len) =
+    SegConst $ ConstSegment (SV.unsafeCast $ SV.unsafeFromForeignPtr fptr offset len)
+
+-- | Convert a segment to a byte string. O(1)
+toByteString :: Segment 'Const -> ByteString
+toByteString (SegConst (ConstSegment vec)) = PS fptr offset len where
+    (fptr, offset, len) = SV.unsafeToForeignPtr (SV.unsafeCast vec)
+
 -- | @'getSegment' message index@ fetches the given segment in the message.
 -- It throws a 'E.BoundsError' if the address is out of bounds.
-getSegment :: (MonadThrow m, Message m msg) => msg -> Int -> m (Segment msg)
+getSegment :: (MonadThrow m, MonadReadMessage mut m) => Message mut -> Int -> m (Segment mut)
 getSegment msg i = do
     checkIndex i =<< numSegs msg
     internalGetSeg msg i
 
 -- | @'withCapTable'@ replaces the capability table in the message.
-withCapTable :: V.Vector Client -> ConstMsg -> ConstMsg
-withCapTable newCaps msg = msg { constCaps = newCaps }
+withCapTable :: V.Vector Client -> Message 'Const -> Message 'Const
+withCapTable newCaps (MsgConst msg) = MsgConst $ msg { constCaps = newCaps }
 
 -- | 'getCapTable' gets the capability table from a 'ConstMsg'.
-getCapTable :: ConstMsg -> V.Vector Client
-getCapTable = constCaps
+getCapTable :: Message 'Const -> V.Vector Client
+getCapTable (MsgConst ConstMsg{constCaps}) = constCaps
 
 -- | @'getCap' message index@ gets the capability with the given index from
 -- the message. throws 'E.BoundsError' if the index is out
 -- of bounds.
-getCap :: (MonadThrow m, Message m msg) => msg -> Int -> m Client
+getCap :: (MonadThrow m, MonadReadMessage mut m) => Message mut -> Int -> m Client
 getCap msg i = do
     ncaps <- numCaps msg
     if i >= ncaps || i < 0
@@ -190,7 +230,7 @@
 
 -- | @'getWord' msg addr@ returns the word at @addr@ within @msg@. It throws a
 -- 'E.BoundsError' if the address is out of bounds.
-getWord :: (MonadThrow m, Message m msg) => msg -> WordAddr -> m Word64
+getWord :: (MonadThrow m, MonadReadMessage mut m) => Message mut -> WordAddr -> m Word64
 getWord msg WordAt{wordIndex=i, segIndex} = do
     seg <- getSegment msg segIndex
     checkIndex i =<< numWords seg
@@ -198,7 +238,7 @@
 
 -- | @'setSegment' message index segment@ sets the segment at the given index
 -- in the message. It throws a 'E.BoundsError' if the address is out of bounds.
-setSegment :: WriteCtx m s => MutMsg s -> Int -> Segment (MutMsg s) -> m ()
+setSegment :: WriteCtx m s => Message ('Mut s) -> Int -> Segment ('Mut s) -> m ()
 setSegment msg i seg = do
     checkIndex i =<< numSegs msg
     internalSetSeg msg i seg
@@ -206,7 +246,7 @@
 -- | @'setWord' message address value@ sets the word at @address@ in the
 -- message to @value@. If the address is not valid in the message, a
 -- 'E.BoundsError' will be thrown.
-setWord :: WriteCtx m s => MutMsg s -> WordAddr -> Word64 -> m ()
+setWord :: WriteCtx m s => Message ('Mut s) -> WordAddr -> Word64 -> m ()
 setWord msg WordAt{wordIndex=i, segIndex} val = do
     seg <- getSegment msg segIndex
     checkIndex i =<< numWords seg
@@ -215,16 +255,16 @@
 -- | @'setCap' message index cap@ sets the sets the capability at @index@ in
 -- the message's capability table to @cap@. If the index is out of bounds, a
 -- 'E.BoundsError' will be thrown.
-setCap :: WriteCtx m s => MutMsg s -> Int -> Client -> m ()
-setCap msg@MutMsg{mutCaps} i cap = do
+setCap :: WriteCtx m s => Message ('Mut s) -> Int -> Client -> m ()
+setCap msg@(MsgMut MutMsg{mutCaps}) i cap = do
     checkIndex i =<< numCaps msg
     capTable <- AppendVec.getVector <$> readMutVar mutCaps
     MV.write capTable i cap
 
 -- | 'appendCap' appends a new capabilty to the end of a message's capability
 -- table, returning its index.
-appendCap :: WriteCtx m s => MutMsg s -> Client -> m Int
-appendCap msg@MutMsg{mutCaps} cap = do
+appendCap :: WriteCtx m s => Message ('Mut s) -> Client -> m Int
+appendCap msg@(MsgMut MutMsg{mutCaps}) cap = do
     i <- numCaps msg
     capTable <- readMutVar mutCaps
     capTable <- AppendVec.grow capTable 1 maxCaps
@@ -234,61 +274,48 @@
 
 -- | A read-only capnproto message.
 --
--- 'ConstMsg' is an instance of the generic 'Message' type class. its
--- implementations of 'toByteString' and 'fromByteString' are O(1);
--- the underlying bytes are not copied.
+-- 'ConstMsg' is an instance of the generic 'Message' type class.
 data ConstMsg = ConstMsg
-    { constSegs :: V.Vector (Segment ConstMsg)
+    { constSegs :: V.Vector (Segment 'Const)
     , constCaps :: V.Vector Client
     }
     deriving(Eq)
 
-instance Monad m => Message m ConstMsg where
-    newtype Segment ConstMsg = ConstSegment { constSegToVec :: SV.Vector Word64 }
-        deriving(Eq)
+instance Monad m => MonadReadMessage 'Const m where
+    numSegs (MsgConst ConstMsg{constSegs}) = pure $ V.length constSegs
+    numCaps (MsgConst ConstMsg{constCaps}) = pure $ V.length constCaps
+    internalGetSeg (MsgConst ConstMsg{constSegs}) i = constSegs `V.indexM` i
+    internalGetCap (MsgConst ConstMsg{constCaps}) i = constCaps `V.indexM` i
 
-    numSegs ConstMsg{constSegs} = pure $ V.length constSegs
-    numCaps ConstMsg{constCaps} = pure $ V.length constCaps
-    internalGetSeg ConstMsg{constSegs} i = constSegs `V.indexM` i
-    internalGetCap ConstMsg{constCaps} i = constCaps `V.indexM` i
+    numWords (SegConst (ConstSegment vec)) = pure $ WordCount $ SV.length vec
+    slice (WordCount start) (WordCount len) (SegConst (ConstSegment vec)) =
+        pure $ SegConst $ ConstSegment (SV.slice start len vec)
+    read (SegConst (ConstSegment vec)) i = pure $! fromLE64 $! vec SV.! fromIntegral i
 
-    numWords (ConstSegment vec) = pure $ WordCount $ SV.length vec
-    slice (WordCount start) (WordCount len) (ConstSegment vec) =
-        pure $ ConstSegment (SV.slice start len vec)
-    read (ConstSegment vec) i = pure $! fromLE64 $! vec SV.! fromIntegral i
 
-    -- FIXME: Verify that the pointer is actually 64-bit aligned before casting.
-    fromByteString (PS fptr offset len) =
-        pure $ ConstSegment (SV.unsafeCast $ SV.unsafeFromForeignPtr fptr offset len)
-    toByteString (ConstSegment vec) = pure $ PS fptr offset len where
-        (fptr, offset, len) = SV.unsafeToForeignPtr (SV.unsafeCast vec)
-
 -- | 'decode' decodes a message from a bytestring.
 --
 -- The segments will not be copied; the resulting message will be a view into
 -- the original bytestring. Runs in O(number of segments in the message).
-decode :: MonadThrow m => ByteString -> m ConstMsg
-decode bytes = fromByteString bytes >>= decodeSeg
+decode :: MonadThrow m => ByteString -> m (Message 'Const)
+decode bytes = decodeSeg (fromByteString bytes)
 
 -- | 'encode' encodes a message as a bytestring builder.
-encode :: Monad m => ConstMsg -> m BB.Builder
+encode :: Message 'Const -> BB.Builder
 encode msg =
     -- We use Maybe as the MonadThrow instance required by
     -- writeMessage/toByteString, but we know this can't actually fail,
-    -- so we ignore errors. TODO: we should get rid of the Monad constraint
-    -- on this function and just have the tyep be ConstMsg -> BB.Builder,
-    -- but that will have some cascading api effects, so we're deferring
-    -- that for a bit.
-    pure $ fromJust $ execWriterT $ writeMessage
+    -- so we ignore errors.
+    fromJust $ execWriterT $ writeMessage
         msg
         (tell . BB.word32LE)
-        (toByteString >=> tell . BB.byteString)
+        (tell . BB.byteString . toByteString)
 
 -- | 'decodeSeg' decodes a message from a segment, treating the segment as if
 -- it were raw bytes.
 --
 -- this is mostly here as a helper for 'decode'.
-decodeSeg :: MonadThrow m => Segment ConstMsg -> m ConstMsg
+decodeSeg :: MonadThrow m => Segment 'Const -> m (Message 'Const)
 decodeSeg seg = do
     len <- numWords seg
     flip evalStateT (Nothing, 0) $ evalLimitT len $
@@ -321,7 +348,7 @@
 -- and @readSegment n@ should read a blob of @n@ 64-bit words.
 -- The size of the message (in 64-bit words) is deducted from the traversal,
 -- limit which can be used to set the maximum message size.
-readMessage :: (MonadThrow m, MonadLimit m) => m Word32 -> (WordCount -> m (Segment ConstMsg)) -> m ConstMsg
+readMessage :: (MonadThrow m, MonadLimit m) => m Word32 -> (WordCount -> m (Segment 'Const)) -> m (Message 'Const)
 readMessage read32 readSegment = do
     invoice 1
     numSegs' <- read32
@@ -331,13 +358,13 @@
     when (even numSegs) $ void read32
     V.mapM_ (invoice . fromIntegral) segSizes
     constSegs <- V.mapM (readSegment . fromIntegral) segSizes
-    pure ConstMsg{constSegs, constCaps = V.empty}
+    pure $ MsgConst ConstMsg{constSegs, constCaps = V.empty}
 
 -- | @'writeMesage' write32 writeSegment@ writes out the message. @write32@
 -- should write a 32-bit word in little-endian format to the output stream.
 -- @writeSegment@ should write a blob.
-writeMessage :: MonadThrow m => ConstMsg -> (Word32 -> m ()) -> (Segment ConstMsg -> m ()) -> m ()
-writeMessage ConstMsg{constSegs} write32 writeSegment = do
+writeMessage :: MonadThrow m => Message 'Const -> (Word32 -> m ()) -> (Segment 'Const -> m ()) -> m ()
+writeMessage (MsgConst ConstMsg{constSegs}) write32 writeSegment = do
     let numSegs = V.length constSegs
     write32 (fromIntegral numSegs - 1)
     V.forM_ constSegs $ \seg -> write32 . fromIntegral =<< numWords seg
@@ -347,16 +374,16 @@
 
 -- | @'hPutMsg' handle msg@ writes @msg@ to @handle@. If there is an exception,
 -- it will be an 'IOError' raised by the underlying IO libraries.
-hPutMsg :: Handle -> ConstMsg -> IO ()
-hPutMsg handle msg = encode msg >>= BB.hPutBuilder handle
+hPutMsg :: Handle -> Message 'Const -> IO ()
+hPutMsg handle msg = BB.hPutBuilder handle (encode msg)
 
 -- | Equivalent to @'hPutMsg' 'stdout'@
-putMsg :: ConstMsg -> IO ()
+putMsg :: Message 'Const -> IO ()
 putMsg = hPutMsg stdout
 
 -- | @'hGetMsg' handle limit@ reads a message from @handle@ that is at most
 -- @limit@ 64-bit words in length.
-hGetMsg :: Handle -> WordCount -> IO ConstMsg
+hGetMsg :: Handle -> WordCount -> IO (Message 'Const)
 hGetMsg handle size =
     evalLimitT size $ readMessage read32 readSegment
   where
@@ -369,20 +396,18 @@
                 throwM $ E.InvalidDataError "Unexpected end of input"
             Right result ->
                 pure result
-    readSegment n = lift $ BS.hGet handle (fromIntegral n * 8) >>= fromByteString
+    readSegment n =
+        lift (fromByteString <$> BS.hGet handle (fromIntegral n * 8))
 
 -- | Equivalent to @'hGetMsg' 'stdin'@
-getMsg :: WordCount -> IO ConstMsg
+getMsg :: WordCount -> IO (Message 'Const)
 getMsg = hGetMsg stdin
 
 -- | A 'MutMsg' is a mutable capnproto message. The type parameter @s@ is the
 -- state token for the instance of 'PrimMonad' in which the message may be
 -- modified.
---
--- Due to mutabilty, the implementations of 'toByteString' and 'fromByteString'
--- must make full copies, and so are O(n) in the length of the segment.
 data MutMsg s = MutMsg
-    { mutSegs :: MutVar s (AppendVec MV.MVector s (Segment (MutMsg s)))
+    { mutSegs :: MutVar s (AppendVec MV.MVector s (Segment ('Mut s)))
     , mutCaps :: MutVar s (AppendVec MV.MVector s Client)
     }
     deriving(Eq)
@@ -390,41 +415,26 @@
 -- | 'WriteCtx' is the context needed for most write operations.
 type WriteCtx m s = (PrimMonad m, s ~ PrimState m, MonadThrow m)
 
-instance (PrimMonad m, s ~ PrimState m) => Message m (MutMsg s) where
-    data Segment (MutMsg s) = MutSegment
-        { vec :: SMV.MVector s Word64
-        , used :: MutVar s WordCount
-        }
-
-    numWords MutSegment{used} = stToPrim $ readMutVar used
-    slice (WordCount start) (WordCount len) MutSegment{vec, used} = stToPrim $ do
+instance (PrimMonad m, s ~ PrimState m) => MonadReadMessage ('Mut s) m where
+    numWords (SegMut MutSegment{used}) = stToPrim $ readMutVar used
+    slice (WordCount start) (WordCount len) (SegMut MutSegment{vec, used}) = stToPrim $ do
         WordCount end <- readMutVar used
         let len' = min (end - start) len
         used' <- newMutVar $ WordCount len'
-        pure MutSegment
+        pure $ SegMut MutSegment
             { vec = SMV.slice start len' vec
             , used = used'
             }
-    read MutSegment{vec} i = stToPrim $
+    read (SegMut MutSegment{vec}) i = stToPrim $
         fromLE64 <$> SMV.read vec (fromIntegral i)
-    fromByteString bytes = stToPrim $ do
-        vec <- constSegToVec <$> fromByteString bytes
-        mvec <- SV.thaw vec
-        used <- newMutVar (WordCount $ SV.length vec)
-        pure MutSegment
-            { vec = mvec
-            , used
-            }
-    toByteString mseg = do
-        seg <- freeze mseg
-        toByteString (seg :: Segment ConstMsg)
-
-    numSegs MutMsg{mutSegs} = stToPrim $ GMV.length . AppendVec.getVector <$> readMutVar mutSegs
-    numCaps MutMsg{mutCaps} = stToPrim $ GMV.length . AppendVec.getVector <$> readMutVar mutCaps
-    internalGetSeg MutMsg{mutSegs} i = stToPrim $ do
+    numSegs (MsgMut MutMsg{mutSegs}) =
+        stToPrim $ GMV.length . AppendVec.getVector <$> readMutVar mutSegs
+    numCaps (MsgMut MutMsg{mutCaps}) =
+        stToPrim $ GMV.length . AppendVec.getVector <$> readMutVar mutCaps
+    internalGetSeg (MsgMut MutMsg{mutSegs}) i = stToPrim $ do
         segs <- AppendVec.getVector <$> readMutVar mutSegs
         MV.read segs i
-    internalGetCap MutMsg{mutCaps} i = stToPrim $ do
+    internalGetCap (MsgMut MutMsg{mutCaps}) i = stToPrim $ do
         caps <- AppendVec.getVector <$> readMutVar mutCaps
         MV.read caps i
 
@@ -432,23 +442,23 @@
 -- | @'internalSetSeg' message index segment@ sets the segment at the given
 -- index in the message. Most callers should use the 'setSegment' wrapper,
 -- instead of calling this directly.
-internalSetSeg :: WriteCtx m s => MutMsg s -> Int -> Segment (MutMsg s) -> m ()
-internalSetSeg MutMsg{mutSegs} segIndex seg = do
+internalSetSeg :: WriteCtx m s => Message ('Mut s) -> Int -> Segment ('Mut s) -> m ()
+internalSetSeg (MsgMut MutMsg{mutSegs}) segIndex seg = do
     segs <- AppendVec.getVector <$> readMutVar mutSegs
     MV.write segs segIndex seg
 
 -- | @'write' segment index value@ writes a value to the 64-bit word
 -- at the provided index. Consider using 'setWord' on the message,
 -- instead of calling this directly.
-write :: WriteCtx m s => Segment (MutMsg s) -> WordCount -> Word64 -> m ()
-write MutSegment{vec} (WordCount i) val = do
+write :: WriteCtx m s => Segment ('Mut s) -> WordCount -> Word64 -> m ()
+write (SegMut MutSegment{vec}) (WordCount i) val = do
     SMV.write vec i (toLE64 val)
 
 -- | @'newSegment' msg sizeHint@ allocates a new, initially empty segment in
 -- @msg@ with a capacity of @sizeHint@. It returns the a pair of the segment
 -- number and the segment itself. Amortized O(1).
-newSegment :: WriteCtx m s => MutMsg s -> Int -> m (Int, Segment (MutMsg s))
-newSegment msg@MutMsg{mutSegs} sizeHint = do
+newSegment :: WriteCtx m s => Message ('Mut s) -> Int -> m (Int, Segment ('Mut s))
+newSegment msg@(MsgMut MutMsg{mutSegs}) sizeHint = do
     when (sizeHint > maxSegmentSize) $ throwM E.SizeError
     -- the next segment number will be equal to the *current* number of
     -- segments:
@@ -461,35 +471,40 @@
 
     vec <- SMV.new sizeHint
     used <- newMutVar 0
-    let newSeg = MutSegment{vec, used}
+    let newSeg = SegMut MutSegment{vec, used}
     setSegment msg segIndex newSeg
     pure (segIndex, newSeg)
 
 -- | Like 'alloc', but the second argument allows the caller to specify the
 -- index of the segment in which to allocate the data. Returns 'Nothing' if there is
 -- insufficient space in that segment..
-allocInSeg :: WriteCtx m s => MutMsg s -> Int -> WordCount -> m (Maybe (WordPtr (MutMsg s)))
+allocInSeg :: WriteCtx m s => Message ('Mut s) -> Int -> WordCount -> m (Maybe (WordPtr ('Mut s)))
 allocInSeg msg segIndex size = do
-    seg@MutSegment{vec, used} <- getSegment msg segIndex
-    nextAlloc <- readMutVar used
-    if WordCount (SMV.length vec) - nextAlloc < size
-        then pure Nothing
-        else (do
-            writeMutVar used $! nextAlloc + size
-            pure $ Just WordPtr
-                { pAddr = WordAt
-                    { segIndex
-                    , wordIndex = nextAlloc
-                    }
-                , pSegment = seg
-                , pMessage = msg
-                })
+    -- GHC's type inference aparently isn't smart enough to figure
+    -- out that the pattern irrefutable if we do seg@(SegMut ...) <- ...
+    -- but this works:
+    seg <- getSegment msg segIndex
+    case seg of
+        SegMut MutSegment{vec, used} -> do
+            nextAlloc <- readMutVar used
+            if WordCount (SMV.length vec) - nextAlloc < size
+                then pure Nothing
+                else (do
+                    writeMutVar used $! nextAlloc + size
+                    pure $ Just WordPtr
+                        { pAddr = WordAt
+                            { segIndex
+                            , wordIndex = nextAlloc
+                            }
+                        , pSegment = seg
+                        , pMessage = msg
+                        })
 
 -- | @'alloc' size@ allocates 'size' words within a message. it returns the
 -- starting address of the allocated memory, as well as a direct reference
 -- to the segment. The latter is redundant information, but this is used
 -- in low-level code where this can improve performance.
-alloc :: WriteCtx m s => MutMsg s -> WordCount -> m (WordPtr (MutMsg s))
+alloc :: WriteCtx m s => Message ('Mut s) -> WordCount -> m (WordPtr ('Mut s))
 alloc msg size@(WordCount sizeInt) = do
     when (sizeInt > maxSegmentSize) $
         throwM E.SizeError
@@ -509,38 +524,38 @@
 
 -- | 'empty' is an empty message, i.e. a minimal message with a null pointer as
 -- its root object.
-empty :: ConstMsg
-empty = ConstMsg
-    { constSegs = V.fromList [ ConstSegment $ SV.fromList [0] ]
+empty :: Message 'Const
+empty = MsgConst ConstMsg
+    { constSegs = V.fromList [ SegConst $ ConstSegment $ SV.fromList [0] ]
     , constCaps = V.empty
     }
 
 -- | @'newMessage' sizeHint@ allocates a new empty message, with a single segment
 -- having capacity @sizeHint@. If @sizeHint@ is 'Nothing', defaults to a sensible
 -- value.
-newMessage :: WriteCtx m s => Maybe WordCount -> m (MutMsg s)
+newMessage :: WriteCtx m s => Maybe WordCount -> m (Message ('Mut s))
 newMessage Nothing = newMessage (Just 32)
     -- The default value above is somewhat arbitrary, and just a guess -- we
     -- should do some profiling to figure out what a good value is here.
 newMessage (Just (WordCount sizeHint)) = do
     mutSegs <- MV.new 1 >>= newMutVar . AppendVec.makeEmpty
     mutCaps <- MV.new 0 >>= newMutVar . AppendVec.makeEmpty
-    let msg = MutMsg{mutSegs,mutCaps}
+    let msg = MsgMut MutMsg{mutSegs,mutCaps}
     -- allocte the first segment, and make space for the root pointer:
     _ <- newSegment msg sizeHint
     _ <- alloc msg 1
     pure msg
 
 -- | Create a message from a single segment.
-singleSegment :: Segment ConstMsg -> ConstMsg
-singleSegment seg = ConstMsg
+singleSegment :: Segment 'Const -> Message 'Const
+singleSegment seg = MsgConst ConstMsg
     { constSegs = V.singleton seg
     , constCaps = V.empty
     }
 
 
-instance Thaw (Segment ConstMsg) where
-    type Mutable s (Segment ConstMsg) = Segment (MutMsg s)
+instance Thaw (Segment 'Const) where
+    type Mutable s (Segment 'Const) = Segment ('Mut s)
 
     thaw         = thawSeg   SV.thaw
     unsafeThaw   = thawSeg   SV.unsafeThaw
@@ -551,24 +566,24 @@
 thawSeg
     :: (PrimMonad m, s ~ PrimState m)
     => (SV.Vector Word64 -> m (SMV.MVector s Word64))
-    -> Segment ConstMsg
-    -> m (Segment (MutMsg s))
-thawSeg thaw (ConstSegment vec) = do
+    -> Segment 'Const
+    -> m (Segment ('Mut s))
+thawSeg thaw (SegConst (ConstSegment vec)) = do
     mvec <- thaw vec
     used <- newMutVar $ WordCount $ SV.length vec
-    pure MutSegment { vec = mvec, used }
+    pure $ SegMut MutSegment { vec = mvec, used }
 
 freezeSeg
     :: (PrimMonad m, s ~ PrimState m)
     => (SMV.MVector s Word64 -> m (SV.Vector Word64))
-    -> Segment (MutMsg s)
-    -> m (Segment ConstMsg)
-freezeSeg freeze MutSegment{vec, used} = do
+    -> Segment ('Mut s)
+    -> m (Segment 'Const)
+freezeSeg freeze (SegMut MutSegment{vec, used}) = do
     WordCount len <- readMutVar used
-    ConstSegment <$> freeze (SMV.take len vec)
+    SegConst .ConstSegment <$> freeze (SMV.take len vec)
 
-instance Thaw ConstMsg where
-    type Mutable s ConstMsg = MutMsg s
+instance Thaw (Message 'Const) where
+    type Mutable s (Message 'Const) = Message ('Mut s)
 
     thaw         = thawMsg   thaw         V.thaw
     unsafeThaw   = thawMsg   unsafeThaw   V.unsafeThaw
@@ -577,24 +592,24 @@
 
 -- Helpers for ConstMsg's Thaw instance.
 thawMsg :: (PrimMonad m, s ~ PrimState m)
-    => (Segment ConstMsg -> m (Segment (MutMsg s)))
+    => (Segment 'Const -> m (Segment ('Mut s)))
     -> (V.Vector Client -> m (MV.MVector s Client))
-    -> ConstMsg
-    -> m (MutMsg s)
-thawMsg thawSeg thawCaps ConstMsg{constSegs, constCaps}= do
+    -> Message 'Const
+    -> m (Message ('Mut s))
+thawMsg thawSeg thawCaps (MsgConst ConstMsg{constSegs, constCaps}) = do
     mutSegs <- newMutVar . AppendVec.fromVector =<< (V.mapM thawSeg constSegs >>= V.unsafeThaw)
     mutCaps <- newMutVar . AppendVec.fromVector =<< thawCaps constCaps
-    pure MutMsg{mutSegs, mutCaps}
+    pure $ MsgMut MutMsg{mutSegs, mutCaps}
 freezeMsg :: (PrimMonad m, s ~ PrimState m)
-    => (Segment (MutMsg s) -> m (Segment ConstMsg))
+    => (Segment ('Mut s) -> m (Segment 'Const))
     -> (MV.MVector s Client -> m (V.Vector Client))
-    -> MutMsg s
-    -> m ConstMsg
-freezeMsg freezeSeg freezeCaps msg@MutMsg{mutCaps} = do
+    -> Message ('Mut s)
+    -> m (Message 'Const)
+freezeMsg freezeSeg freezeCaps msg@(MsgMut MutMsg{mutCaps}) = do
     len <- numSegs msg
     constSegs <- V.generateM len (internalGetSeg msg >=> freezeSeg)
     constCaps <- freezeCaps . AppendVec.getVector =<< readMutVar mutCaps
-    pure ConstMsg{constSegs, constCaps}
+    pure $ MsgConst ConstMsg{constSegs, constCaps}
 
 -- | @'checkIndex' index length@ checkes that 'index' is in the range
 -- [0, length), throwing a 'BoundsError' if not.
diff --git a/lib/Capnp/Rpc/Invoke.hs b/lib/Capnp/Rpc/Invoke.hs
--- a/lib/Capnp/Rpc/Invoke.hs
+++ b/lib/Capnp/Rpc/Invoke.hs
@@ -1,4 +1,5 @@
 {-# LANGUAGE ConstraintKinds  #-}
+{-# LANGUAGE DataKinds        #-}
 {-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE LambdaCase       #-}
 {-# LANGUAGE TypeFamilies     #-}
@@ -30,6 +31,7 @@
     , FromPtr(fromPtr)
     , ToStruct(toStruct)
     )
+import Capnp.Message        (Mutability (..))
 import Capnp.TraversalLimit (defaultLimit, evalLimitT)
 import Data.Mutable         (freeze)
 
@@ -47,12 +49,12 @@
     , PrimMonad m
     , Decerialize r
     , Decerialize p
-    , ToStruct M.ConstMsg (Cerial M.ConstMsg p)
-    , FromPtr M.ConstMsg (Cerial M.ConstMsg r)
+    , ToStruct 'Const (Cerial 'Const p)
+    , FromPtr 'Const (Cerial 'Const r)
     ) =>
     Server.MethodHandler m p r
-    -> Cerial M.ConstMsg p
-    -> Promise.Fulfiller (Cerial M.ConstMsg r)
+    -> Cerial 'Const p
+    -> Promise.Fulfiller (Cerial 'Const r)
     -> m ()
 invokeRaw method params typedFulfiller = do
     (_, untypedFulfiller) <- liftSTM $ Promise.newPromiseWithCallback $ \case
@@ -70,10 +72,10 @@
     , MonadSTM m
     , PrimMonad m
     , Decerialize r
-    , ToStruct M.ConstMsg (Cerial M.ConstMsg p)
-    , ToStruct (M.MutMsg (PrimState m)) (Cerial (M.MutMsg (PrimState m)) p)
+    , ToStruct 'Const (Cerial 'Const p)
+    , ToStruct ('Mut (PrimState m)) (Cerial ('Mut (PrimState m)) p)
     , Cerialize (PrimState m) p
-    , FromPtr M.ConstMsg (Cerial M.ConstMsg r)
+    , FromPtr 'Const (Cerial 'Const r)
     )
 
 -- | Like 'invokeRaw', but uses the high-level representations of the data
diff --git a/lib/Capnp/Rpc/Server.hs b/lib/Capnp/Rpc/Server.hs
--- a/lib/Capnp/Rpc/Server.hs
+++ b/lib/Capnp/Rpc/Server.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds              #-}
 {-# LANGUAGE FlexibleContexts       #-}
 {-# LANGUAGE FunctionalDependencies #-}
 {-# LANGUAGE LambdaCase             #-}
@@ -55,7 +56,7 @@
     , ToStruct(toStruct)
     )
 import Capnp.Convert        (valueToMsg)
-import Capnp.Message        (ConstMsg, MutMsg)
+import Capnp.Message        (Mutability (..))
 import Capnp.Rpc.Errors     (eMethodUnimplemented, wrapException)
 import Capnp.Rpc.Promise    (Fulfiller, breakPromise, fulfill, newCallback)
 import Capnp.TraversalLimit (defaultLimit, evalLimitT)
@@ -83,16 +84,16 @@
 --   calls to be serviced before the current one is finished.
 newtype MethodHandler m p r = MethodHandler
     { handleMethod
-        :: Maybe (Ptr ConstMsg)
-        -> Fulfiller (Maybe (Ptr ConstMsg))
+        :: Maybe (Ptr 'Const)
+        -> Fulfiller (Maybe (Ptr 'Const))
         -> m ()
     }
 
 invoke
     :: MonadSTM m
-    => MethodHandler m (Maybe (Ptr ConstMsg)) (Maybe (Ptr ConstMsg))
-    -> Maybe (Ptr ConstMsg)
-    -> Fulfiller (Maybe (Ptr ConstMsg))
+    => MethodHandler m (Maybe (Ptr 'Const)) (Maybe (Ptr 'Const))
+    -> Maybe (Ptr 'Const)
+    -> Fulfiller (Maybe (Ptr 'Const))
     -> m ()
 invoke = handleMethod
 
@@ -106,9 +107,9 @@
     , PrimMonad m
     , s ~ PrimState m
     , Decerialize p
-    , FromPtr ConstMsg (Cerial ConstMsg p)
+    , FromPtr 'Const (Cerial 'Const p)
     , Cerialize s r
-    , ToStruct (MutMsg s) (Cerial (MutMsg s) r)
+    , ToStruct ('Mut s) (Cerial ('Mut s) r)
     ) =>
     (cap -> p -> m r)
     -> cap
@@ -137,11 +138,11 @@
     , PrimMonad m
     , s ~ PrimState m
     , Decerialize p
-    , FromPtr ConstMsg (Cerial ConstMsg p)
+    , FromPtr 'Const (Cerial 'Const p)
     , Decerialize r
-    , ToStruct ConstMsg (Cerial ConstMsg r)
+    , ToStruct 'Const (Cerial 'Const r)
     ) =>
-    (cap -> Cerial ConstMsg p -> m (Cerial ConstMsg r))
+    (cap -> Cerial 'Const p -> m (Cerial 'Const r))
     -> cap
     -> MethodHandler m p r
 rawHandler f cap = MethodHandler
@@ -163,11 +164,11 @@
     , PrimMonad m
     , s ~ PrimState m
     , Decerialize p
-    , FromPtr ConstMsg (Cerial ConstMsg p)
+    , FromPtr 'Const (Cerial 'Const p)
     , Decerialize r
-    , ToStruct ConstMsg (Cerial ConstMsg r)
+    , ToStruct 'Const (Cerial 'Const r)
     ) =>
-    (cap -> Cerial ConstMsg p -> Fulfiller (Cerial ConstMsg r) -> m ())
+    (cap -> Cerial 'Const p -> Fulfiller (Cerial 'Const r) -> m ())
     -> cap
     -> MethodHandler m p r
 rawAsyncHandler f cap = MethodHandler
@@ -183,12 +184,12 @@
 -- one that deals with untyped pointers.
 toUntypedHandler
     :: MethodHandler m p r
-    -> MethodHandler m (Maybe (Ptr ConstMsg)) (Maybe (Ptr ConstMsg))
+    -> MethodHandler m (Maybe (Ptr 'Const)) (Maybe (Ptr 'Const))
 toUntypedHandler MethodHandler{..} = MethodHandler{..}
 
 -- | Inverse of 'toUntypedHandler'
 fromUntypedHandler
-    :: MethodHandler m (Maybe (Ptr ConstMsg)) (Maybe (Ptr ConstMsg))
+    :: MethodHandler m (Maybe (Ptr 'Const)) (Maybe (Ptr 'Const))
     -> MethodHandler m p r
 fromUntypedHandler MethodHandler{..} = MethodHandler{..}
 
@@ -196,8 +197,8 @@
 -- pointer for the method's parameter, and a 'Fulfiller' which accepts
 -- an untyped pointer for the method's return value.
 untypedHandler
-    :: (Maybe (Ptr ConstMsg) -> Fulfiller (Maybe (Ptr ConstMsg)) -> m ())
-    -> MethodHandler m (Maybe (Ptr ConstMsg)) (Maybe (Ptr ConstMsg))
+    :: (Maybe (Ptr 'Const) -> Fulfiller (Maybe (Ptr 'Const)) -> m ())
+    -> MethodHandler m (Maybe (Ptr 'Const)) (Maybe (Ptr 'Const))
 untypedHandler = MethodHandler
 
 -- | @'methodThrow' exn@ is a 'MethodHandler' which always throws @exn@.
@@ -234,7 +235,7 @@
     { handleCall
         :: Word64
         -> Word16
-        -> MethodHandler m (Maybe (Ptr ConstMsg)) (Maybe (Ptr ConstMsg))
+        -> MethodHandler m (Maybe (Ptr 'Const)) (Maybe (Ptr 'Const))
     -- ^ Handle a method call; takes the interface and method id and returns
     -- a handler for the specific method.
     , handleStop :: m ()
@@ -250,9 +251,9 @@
     -- ^ The id of the interface whose method is being called.
     , methodId    :: !Word16
     -- ^ The method id of the method being called.
-    , arguments   :: Maybe (Ptr ConstMsg)
+    , arguments   :: Maybe (Ptr 'Const)
     -- ^ The arguments to the method call.
-    , response    :: Fulfiller (Maybe (Ptr ConstMsg))
+    , response    :: Fulfiller (Maybe (Ptr 'Const))
     -- ^ A 'Fulfiller' which accepts the method's return value.
     }
 
diff --git a/lib/Capnp/Rpc/Transport.hs b/lib/Capnp/Rpc/Transport.hs
--- a/lib/Capnp/Rpc/Transport.hs
+++ b/lib/Capnp/Rpc/Transport.hs
@@ -5,6 +5,7 @@
 This module provides a 'Transport' type, which provides operations
 used to transmit messages between vats in the RPC protocol.
 -}
+{-# LANGUAGE DataKinds #-}
 module Capnp.Rpc.Transport
     ( Transport(..)
     , handleTransport
@@ -18,16 +19,16 @@
 import Capnp.Bits       (WordCount)
 import Capnp.Convert    (msgToValue)
 import Capnp.IO         (hGetMsg, hPutMsg, sGetMsg, sPutMsg)
-import Capnp.Message    (ConstMsg)
+import Capnp.Message    (Message, Mutability(Const))
 import Text.Show.Pretty (ppShow)
 
 import qualified Capnp.Gen.Capnp.Rpc.Pure as R
 
 -- | A @'Transport'@ handles transmitting RPC messages.
 data Transport = Transport
-    { sendMsg :: ConstMsg -> IO ()
+    { sendMsg :: Message 'Const -> IO ()
     -- ^ Send a message
-    , recvMsg :: IO ConstMsg
+    , recvMsg :: IO (Message 'Const)
     -- ^ Receive a message
     }
 
diff --git a/lib/Capnp/Rpc/Untyped.hs b/lib/Capnp/Rpc/Untyped.hs
--- a/lib/Capnp/Rpc/Untyped.hs
+++ b/lib/Capnp/Rpc/Untyped.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds                  #-}
 {-# LANGUAGE DeriveGeneric              #-}
 {-# LANGUAGE DuplicateRecordFields      #-}
 {-# LANGUAGE FlexibleContexts           #-}
@@ -92,7 +93,7 @@
 
 import Capnp.Classes        (cerialize, decerialize, fromStruct, new, toStruct)
 import Capnp.Convert        (valueToMsg)
-import Capnp.Message        (ConstMsg)
+import Capnp.Message        (Message, Mutability (..))
 import Capnp.Rpc.Errors
     ( eDisconnected
     , eFailed
@@ -151,7 +152,7 @@
 --   implementation. See the protocol documentation for more info.
 
 -- | We use this type often enough that the types get noisy without a shorthand:
-type RawMPtr = Maybe (UntypedRaw.Ptr ConstMsg)
+type RawMPtr = Maybe (UntypedRaw.Ptr 'Const)
 
 
 -- | Errors which can be thrown by the rpc system.
@@ -201,8 +202,8 @@
     | Dead
 
 data Conn' = Conn'
-    { sendQ            :: TBQueue ConstMsg
-    , recvQ            :: TBQueue ConstMsg
+    { sendQ            :: TBQueue (Message 'Const)
+    , recvQ            :: TBQueue (Message 'Const)
     -- queues of messages to send and receive; each of these has a dedicated
     -- thread doing the IO (see 'sendLoop' and 'recvLoop'):
 
@@ -1244,7 +1245,7 @@
     insertBootstrap conn' _ (Just _) =
         abortConn conn' $ eFailed "Duplicate question ID"
 
-handleCallMsg :: Conn -> RawRpc.Call ConstMsg -> LimitT STM ()
+handleCallMsg :: Conn -> RawRpc.Call 'Const -> LimitT STM ()
 handleCallMsg conn callMsg = do
     conn'@Conn'{exports, answers} <- lift $ getLive conn
     questionId <- RawRpc.get_Call'questionId callMsg
@@ -1342,7 +1343,7 @@
     (unmarshalOps (V.toList transform) >>= flip ptrPathClient ptr)
         `catchSTM` abortConn conn
 
-ptrClient :: UntypedRaw.ReadCtx m ConstMsg => RawMPtr -> m Client
+ptrClient :: UntypedRaw.ReadCtx m 'Const => RawMPtr -> m Client
 ptrClient Nothing = pure nullClient
 ptrClient (Just (UntypedRaw.PtrCap cap)) = UntypedRaw.getClient cap
 ptrClient (Just _) = throwM $ eFailed "Tried to call method on non-capability."
@@ -1350,7 +1351,7 @@
 -- | Follow a series of pointer indicies, returning the final value, or 'Left'
 -- with an error if any of the pointers in the chain (except the last one) is
 -- a non-null non struct.
-followPtrs :: UntypedRaw.ReadCtx m ConstMsg => [Word16] -> RawMPtr -> m RawMPtr
+followPtrs :: UntypedRaw.ReadCtx m 'Const => [Word16] -> RawMPtr -> m RawMPtr
 followPtrs [] ptr =
     pure ptr
 followPtrs (_:_) Nothing =
@@ -1360,7 +1361,7 @@
 followPtrs (_:_) (Just _) =
     throwM $ eFailed "Tried to access pointer field of non-struct."
 
-sendRawMsg :: Conn' -> ConstMsg -> STM ()
+sendRawMsg :: Conn' -> Message 'Const -> STM ()
 sendRawMsg conn' = writeTBQueue (sendQ conn')
 
 sendCall :: Conn' -> Call -> STM ()
@@ -1448,7 +1449,7 @@
             pure msg
         )
 
-acceptReturn :: Conn -> RawRpc.Return ConstMsg -> LimitT STM Return
+acceptReturn :: Conn -> RawRpc.Return 'Const -> LimitT STM Return
 acceptReturn conn ret = do
     answerId <- QAId <$> RawRpc.get_Return'answerId ret
     releaseParamCaps <- RawRpc.get_Return'releaseParamCaps ret
@@ -1660,7 +1661,7 @@
 -- the capabilities are within the subtree under the pointer.
 genSendableCapTableRaw
     :: Conn
-    -> Maybe (UntypedRaw.Ptr ConstMsg)
+    -> Maybe (UntypedRaw.Ptr 'Const)
     -> STM (V.Vector R.CapDescriptor)
 genSendableCapTableRaw _ Nothing = pure V.empty
 genSendableCapTableRaw conn (Just ptr) =
@@ -2107,7 +2108,7 @@
   where
     newSenderPromise = R.CapDescriptor'senderPromise . ieWord <$> getConnExport targetConn client'
 
-acceptPayload :: Conn -> RawRpc.Payload ConstMsg -> LimitT STM Payload
+acceptPayload :: Conn -> RawRpc.Payload 'Const -> LimitT STM Payload
 acceptPayload conn payload = do
     capTable <- RawRpc.get_Payload'capTable payload >>= decerialize
     clients <- lift $ traverse (\R.CapDescriptor{union'} -> acceptCap conn union') capTable
diff --git a/lib/Capnp/Untyped.hs b/lib/Capnp/Untyped.hs
--- a/lib/Capnp/Untyped.hs
+++ b/lib/Capnp/Untyped.hs
@@ -1,11 +1,12 @@
 {-# LANGUAGE ApplicativeDo              #-}
 {-# LANGUAGE ConstraintKinds            #-}
+{-# LANGUAGE DataKinds                  #-}
 {-# LANGUAGE FlexibleContexts           #-}
 {-# LANGUAGE FlexibleInstances          #-}
+{-# LANGUAGE FunctionalDependencies     #-}
 {-# LANGUAGE GADTs                      #-}
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE LambdaCase                 #-}
-{-# LANGUAGE MultiParamTypeClasses      #-}
 {-# LANGUAGE NamedFieldPuns             #-}
 {-# LANGUAGE RankNTypes                 #-}
 {-# LANGUAGE RecordWildCards            #-}
@@ -83,6 +84,7 @@
     , replaceBits
     , wordsToBytes
     )
+import Capnp.Message        (Mutability (..))
 import Capnp.Pointer        (ElementSize (..))
 import Capnp.TraversalLimit (MonadLimit(invoice))
 import Data.Mutable         (Thaw (..))
@@ -93,58 +95,58 @@
 
 -- | Type (constraint) synonym for the constraints needed for most read
 -- operations.
-type ReadCtx m msg = (M.Message m msg, MonadThrow m, MonadLimit m)
+type ReadCtx m mut = (M.MonadReadMessage mut m, MonadThrow m, MonadLimit m)
 
 -- | Synonym for ReadCtx + WriteCtx
-type RWCtx m s = (ReadCtx m (M.MutMsg s), M.WriteCtx m s)
+type RWCtx m s = (ReadCtx m ('Mut s), M.WriteCtx m s)
 
 -- | A an absolute pointer to a value (of arbitrary type) in a message.
 -- Note that there is no variant for far pointers, which don't make sense
 -- with absolute addressing.
-data Ptr msg
-    = PtrCap (Cap msg)
-    | PtrList (List msg)
-    | PtrStruct (Struct msg)
+data Ptr mut
+    = PtrCap (Cap mut)
+    | PtrList (List mut)
+    | PtrStruct (Struct mut)
 
 -- | A list of values (of arbitrary type) in a message.
-data List msg
-    = List0 (ListOf msg ())
-    | List1 (ListOf msg Bool)
-    | List8 (ListOf msg Word8)
-    | List16 (ListOf msg Word16)
-    | List32 (ListOf msg Word32)
-    | List64 (ListOf msg Word64)
-    | ListPtr (ListOf msg (Maybe (Ptr msg)))
-    | ListStruct (ListOf msg (Struct msg))
+data List mut
+    = List0 (ListOf mut ())
+    | List1 (ListOf mut Bool)
+    | List8 (ListOf mut Word8)
+    | List16 (ListOf mut Word16)
+    | List32 (ListOf mut Word32)
+    | List64 (ListOf mut Word64)
+    | ListPtr (ListOf mut (Maybe (Ptr mut)))
+    | ListStruct (ListOf mut (Struct mut))
 
 -- | A "normal" (non-composite) list.
-data NormalList msg = NormalList
-    { nPtr :: !(M.WordPtr msg)
+data NormalList mut = NormalList
+    { nPtr :: !(M.WordPtr mut)
     , nLen :: !Int
     }
 
 -- | A list of values of type 'a' in a message.
-data ListOf msg a where
+data ListOf mut a where
     ListOfStruct
-        :: Struct msg -- First element. data/ptr sizes are the same for
+        :: Struct mut -- First element. data/ptr sizes are the same for
                       -- all elements.
         -> !Int       -- Number of elements
-        -> ListOf msg (Struct msg)
-    ListOfVoid   :: !(NormalList msg) -> ListOf msg ()
-    ListOfBool   :: !(NormalList msg) -> ListOf msg Bool
-    ListOfWord8  :: !(NormalList msg) -> ListOf msg Word8
-    ListOfWord16 :: !(NormalList msg) -> ListOf msg Word16
-    ListOfWord32 :: !(NormalList msg) -> ListOf msg Word32
-    ListOfWord64 :: !(NormalList msg) -> ListOf msg Word64
-    ListOfPtr    :: !(NormalList msg) -> ListOf msg (Maybe (Ptr msg))
+        -> ListOf mut (Struct mut)
+    ListOfVoid   :: !(NormalList mut) -> ListOf mut ()
+    ListOfBool   :: !(NormalList mut) -> ListOf mut Bool
+    ListOfWord8  :: !(NormalList mut) -> ListOf mut Word8
+    ListOfWord16 :: !(NormalList mut) -> ListOf mut Word16
+    ListOfWord32 :: !(NormalList mut) -> ListOf mut Word32
+    ListOfWord64 :: !(NormalList mut) -> ListOf mut Word64
+    ListOfPtr    :: !(NormalList mut) -> ListOf mut (Maybe (Ptr mut))
 
 -- | A Capability in a message.
-data Cap msg = Cap msg !Word32
+data Cap mut = Cap (M.Message mut) !Word32
 
 -- | A struct value in a message.
-data Struct msg
+data Struct mut
     = Struct
-        !(M.WordPtr msg) -- Start of struct
+        !(M.WordPtr mut) -- Start of struct
         !Word16 -- Data section size.
         !Word16 -- Pointer section size.
 
@@ -168,9 +170,13 @@
 --    performance considerations eventually forced us to open up the hood a
 --    bit.
 class TraverseMsg f where
-    tMsg :: TraverseMsgCtx m msgA msgB => (msgA -> m msgB) -> f msgA -> m (f msgB)
+    tMsg :: TraverseMsgCtx m mutA mutB => (M.Message mutA -> m (M.Message mutB)) -> f mutA -> m (f mutB)
 
-type TraverseMsgCtx m msgA msgB = (MonadThrow m, M.Message m msgA, M.Message m msgB)
+type TraverseMsgCtx m mutA mutB =
+    ( MonadThrow m
+    , M.MonadReadMessage mutA m
+    , M.MonadReadMessage mutB m
+    )
 
 instance TraverseMsg M.WordPtr where
     tMsg f M.WordPtr{pMessage, pAddr=pAddr@WordAt{segIndex}} = do
@@ -268,10 +274,10 @@
         FlipListS <$> (ListOfStruct <$> tMsg f tag <*> pure size)
 
 -- helpers for applying tMsg to a @ListOf@.
-tFlip  :: (TraverseMsg (FlipList a), TraverseMsgCtx m msgA msg)
-    => (msgA -> m msg) -> ListOf msgA a -> m (ListOf msg a)
-tFlipS :: TraverseMsgCtx m msgA msg => (msgA -> m msg) -> ListOf msgA (Struct msgA) -> m (ListOf msg (Struct msg))
-tFlipP :: TraverseMsgCtx m msgA msg => (msgA -> m msg) -> ListOf msgA (Maybe (Ptr msgA)) -> m (ListOf msg (Maybe (Ptr msg)))
+tFlip  :: (TraverseMsg (FlipList a), TraverseMsgCtx m mutA mutB)
+    => (M.Message mutA -> m (M.Message mutB)) -> ListOf mutA a -> m (ListOf mutB a)
+tFlipS :: TraverseMsgCtx m mutA mutB => (M.Message mutA -> m (M.Message mutB)) -> ListOf mutA (Struct mutA) -> m (ListOf mutB (Struct mutB ))
+tFlipP :: TraverseMsgCtx m mutA mutB => (M.Message mutA -> m (M.Message mutB)) -> ListOf mutA (Maybe (Ptr mutA)) -> m (ListOf mutB (Maybe (Ptr mutB)))
 tFlip  f list  = unflip  <$> tMsg f (FlipList  list)
 tFlipS f list  = unflipS <$> tMsg f (FlipListS list)
 tFlipP f list  = unflipP <$> tMsg f (FlipListP list)
@@ -293,8 +299,8 @@
 do
     let mkWrappedInstance name =
             let f = pure $ TH.ConT name in
-            [d|instance Thaw ($f M.ConstMsg) where
-                type Mutable s ($f M.ConstMsg) = $f (Mutable s M.ConstMsg)
+            [d|instance Thaw ($f 'Const) where
+                type Mutable s ($f 'Const) = $f ('Mut s)
 
                 thaw         = runCatchImpure . tMsg thaw
                 freeze       = runCatchImpure . tMsg freeze
@@ -302,8 +308,8 @@
                 unsafeFreeze = runCatchImpure . tMsg unsafeFreeze
             |]
         mkListOfInstance t =
-            [d|instance Thaw (ListOf M.ConstMsg $t) where
-                type Mutable s (ListOf M.ConstMsg $t) = ListOf (Mutable s M.ConstMsg) $t
+            [d|instance Thaw (ListOf 'Const $t) where
+                type Mutable s (ListOf 'Const $t) = ListOf ('Mut s) $t
 
                 thaw         = runCatchImpure . tFlip thaw
                 freeze       = runCatchImpure . tFlip freeze
@@ -326,18 +332,18 @@
         ]
     pure $ concat $ xs ++ ys
 
-instance Thaw (ListOf M.ConstMsg (Struct M.ConstMsg)) where
-    type Mutable s (ListOf M.ConstMsg (Struct M.ConstMsg)) =
-        ListOf (Mutable s M.ConstMsg) (Struct (Mutable s M.ConstMsg))
+instance Thaw (ListOf 'Const (Struct 'Const)) where
+    type Mutable s (ListOf 'Const (Struct 'Const)) =
+        ListOf ('Mut s) (Struct ('Mut s))
 
     thaw         = runCatchImpure . tFlipS thaw
     freeze       = runCatchImpure . tFlipS freeze
     unsafeThaw   = runCatchImpure . tFlipS unsafeThaw
     unsafeFreeze = runCatchImpure . tFlipS unsafeFreeze
 
-instance Thaw (ListOf M.ConstMsg (Maybe (Ptr M.ConstMsg))) where
-    type Mutable s (ListOf M.ConstMsg (Maybe (Ptr M.ConstMsg))) =
-        ListOf (Mutable s M.ConstMsg) (Maybe (Ptr (Mutable s M.ConstMsg)))
+instance Thaw (ListOf 'Const (Maybe (Ptr 'Const))) where
+    type Mutable s (ListOf 'Const (Maybe (Ptr 'Const))) =
+        ListOf ('Mut s) (Maybe (Ptr ('Mut s)))
 
     thaw         = runCatchImpure . tFlipP thaw
     freeze       = runCatchImpure . tFlipP freeze
@@ -368,12 +374,9 @@
 -------------------------------------------------------------------------------
 
 -- | Types @a@ whose storage is owned by a message..
-class HasMessage a where
-    -- | The type of the messages containing @a@s.
-    type InMessage a
-
+class HasMessage a mut | a -> mut where
     -- | Get the message in which the @a@ is stored.
-    message :: a -> InMessage a
+    message :: a -> M.Message mut
 
 -- | Types which have a "default" value, but require a message
 -- to construct it.
@@ -381,38 +384,29 @@
 -- The default is usually conceptually zero-size. This is mostly useful
 -- for generated code, so that it can use standard decoding techniques
 -- on default values.
-class HasMessage a => MessageDefault a where
-    messageDefault :: ReadCtx m (InMessage a) => InMessage a -> m a
+class HasMessage a mut => MessageDefault a mut where
+    messageDefault :: ReadCtx m mut => M.Message mut -> m a
 
-instance HasMessage (M.WordPtr msg) where
-    type InMessage (M.WordPtr msg) = msg
+instance HasMessage (M.WordPtr mut) mut where
     message M.WordPtr{pMessage} = pMessage
 
-instance HasMessage (Ptr msg) where
-    type InMessage (Ptr msg) = msg
-
+instance HasMessage (Ptr mut) mut where
     message (PtrCap cap)       = message cap
     message (PtrList list)     = message list
     message (PtrStruct struct) = message struct
 
-instance HasMessage (Cap msg) where
-    type InMessage (Cap msg) = msg
-
+instance HasMessage (Cap mut) mut where
     message (Cap msg _) = msg
 
-instance HasMessage (Struct msg) where
-    type InMessage (Struct msg) = msg
-
+instance HasMessage (Struct mut) mut where
     message (Struct ptr _ _) = message ptr
 
-instance MessageDefault (Struct msg) where
+instance MessageDefault (Struct mut) mut where
     messageDefault msg = do
         pSegment <- M.getSegment msg 0
         pure $ Struct M.WordPtr{pMessage = msg, pSegment, pAddr = WordAt 0 0} 0 0
 
-instance HasMessage (List msg) where
-    type InMessage (List msg) = msg
-
+instance HasMessage (List mut) mut where
     message (List0 list)      = message list
     message (List1 list)      = message list
     message (List8 list)      = message list
@@ -422,9 +416,7 @@
     message (ListPtr list)    = message list
     message (ListStruct list) = message list
 
-instance HasMessage (ListOf msg a) where
-    type InMessage (ListOf msg a) = msg
-
+instance HasMessage (ListOf mut a) mut where
     message (ListOfStruct tag _) = message tag
     message (ListOfVoid list)    = message list
     message (ListOfBool list)    = message list
@@ -434,29 +426,27 @@
     message (ListOfWord64 list)  = message list
     message (ListOfPtr list)     = message list
 
-instance MessageDefault (ListOf msg ()) where
+instance MessageDefault (ListOf mut ()) mut where
     messageDefault msg = ListOfVoid <$> messageDefault msg
-instance MessageDefault (ListOf msg (Struct msg)) where
+instance MessageDefault (ListOf mut (Struct mut)) mut where
     messageDefault msg = flip ListOfStruct 0 <$> messageDefault msg
-instance MessageDefault (ListOf msg Bool) where
+instance MessageDefault (ListOf mut Bool) mut where
     messageDefault msg = ListOfBool <$> messageDefault msg
-instance MessageDefault (ListOf msg Word8) where
+instance MessageDefault (ListOf mut Word8) mut where
     messageDefault msg = ListOfWord8 <$> messageDefault msg
-instance MessageDefault (ListOf msg Word16) where
+instance MessageDefault (ListOf mut Word16) mut where
     messageDefault msg = ListOfWord16 <$> messageDefault msg
-instance MessageDefault (ListOf msg Word32) where
+instance MessageDefault (ListOf mut Word32) mut where
     messageDefault msg = ListOfWord32 <$> messageDefault msg
-instance MessageDefault (ListOf msg Word64) where
+instance MessageDefault (ListOf mut Word64) mut where
     messageDefault msg = ListOfWord64 <$> messageDefault msg
-instance MessageDefault (ListOf msg (Maybe (Ptr msg))) where
+instance MessageDefault (ListOf mut (Maybe (Ptr mut))) mut where
     messageDefault msg = ListOfPtr <$> messageDefault msg
 
-instance HasMessage (NormalList msg) where
-    type InMessage (NormalList msg) = msg
-
+instance HasMessage (NormalList mut) mut where
     message = M.pMessage . nPtr
 
-instance MessageDefault (NormalList msg) where
+instance MessageDefault (NormalList mut) mut where
     messageDefault msg = do
         pSegment <- M.getSegment msg 0
         pure NormalList
@@ -464,13 +454,13 @@
             , nLen = 0
             }
 
-getClient :: ReadCtx m msg => Cap msg -> m M.Client
+getClient :: ReadCtx m mut => Cap mut -> m M.Client
 getClient (Cap msg idx) = M.getCap msg (fromIntegral idx)
 
 -- | @get ptr@ returns the Ptr stored at @ptr@.
 -- Deducts 1 from the quota for each word read (which may be multiple in the
 -- case of far pointers).
-get :: ReadCtx m msg => M.WordPtr msg -> m (Maybe (Ptr msg))
+get :: ReadCtx m mut => M.WordPtr mut -> m (Maybe (Ptr mut))
 get ptr@M.WordPtr{pMessage, pAddr} = do
     word <- getWord ptr
     case P.parsePtr word of
@@ -600,7 +590,7 @@
 ptrAddr (PtrList list) = listAddr list
 
 -- | @'setIndex value i list@ Set the @i@th element of @list@ to @value@.
-setIndex :: RWCtx m s => a -> Int -> ListOf (M.MutMsg s) a -> m ()
+setIndex :: RWCtx m s => a -> Int -> ListOf ('Mut s) a -> m ()
 setIndex _ i list | length list <= i =
     throwM E.BoundsError { E.index = i, E.maxIndex = length list }
 setIndex value i list = case list of
@@ -624,13 +614,13 @@
         dest <- index i list
         copyStruct dest value
   where
-    setNIndex :: (ReadCtx m (M.MutMsg s), M.WriteCtx m s, Bounded a, Integral a) => NormalList (M.MutMsg s) -> Int -> a -> m ()
+    setNIndex :: (ReadCtx m ('Mut s), M.WriteCtx m s, Bounded a, Integral a) => NormalList ('Mut s) -> Int -> a -> m ()
     setNIndex NormalList{nPtr=M.WordPtr{pSegment, pAddr=WordAt{wordIndex}}} eltsPerWord value = do
         let eltWordIndex = wordIndex + WordCount (i `div` eltsPerWord)
         word <- M.read pSegment eltWordIndex
         let shift = (i `mod` eltsPerWord) * (64 `div` eltsPerWord)
         M.write pSegment eltWordIndex $ replaceBits value word shift
-    setPtrIndex :: (ReadCtx m (M.MutMsg s), M.WriteCtx m s) => NormalList (M.MutMsg s) -> Ptr (M.MutMsg s) -> P.Ptr -> m ()
+    setPtrIndex :: (ReadCtx m ('Mut s), M.WriteCtx m s) => NormalList ('Mut s) -> Ptr ('Mut s) -> P.Ptr -> m ()
     setPtrIndex NormalList{nPtr=nPtr@M.WordPtr{pAddr=addr@WordAt{wordIndex}}} absPtr relPtr =
         let srcPtr = nPtr { M.pAddr = addr { wordIndex = wordIndex + WordCount i } }
         in setPointerTo srcPtr (ptrAddr absPtr) relPtr
@@ -639,7 +629,7 @@
 -- pointer like @relPtr@, but pointing to @dstAddr@. @relPtr@ should not be a far pointer.
 -- If the two addresses are in different segments, a landing pad will be allocated and
 -- @srcLoc@ will contain a far pointer.
-setPointerTo :: M.WriteCtx m s => M.WordPtr (M.MutMsg s) -> WordAddr -> P.Ptr -> m ()
+setPointerTo :: M.WriteCtx m s => M.WordPtr ('Mut s) -> WordAddr -> P.Ptr -> m ()
 setPointerTo
         M.WordPtr
             { pMessage = msg
@@ -711,10 +701,10 @@
                             P.ListPtr _ eltSpec -> P.ListPtr 0 eltSpec
                             _ -> relPtr
 
-copyCap :: RWCtx m s => M.MutMsg s -> Cap (M.MutMsg s) -> m (Cap (M.MutMsg s))
+copyCap :: RWCtx m s => M.Message ('Mut s) -> Cap ('Mut s) -> m (Cap ('Mut s))
 copyCap dest cap = getClient cap >>= appendCap dest
 
-copyPtr :: RWCtx m s => M.MutMsg s -> Maybe (Ptr (M.MutMsg s)) -> m (Maybe (Ptr (M.MutMsg s)))
+copyPtr :: RWCtx m s => M.Message ('Mut s) -> Maybe (Ptr ('Mut s)) -> m (Maybe (Ptr ('Mut s)))
 copyPtr _ Nothing                = pure Nothing
 copyPtr dest (Just (PtrCap cap))    = Just . PtrCap <$> copyCap dest cap
 copyPtr dest (Just (PtrList src))   = Just . PtrList <$> copyList dest src
@@ -726,7 +716,7 @@
     copyStruct destStruct src
     pure destStruct
 
-copyList :: RWCtx m s => M.MutMsg s -> List (M.MutMsg s) -> m (List (M.MutMsg s))
+copyList :: RWCtx m s => M.Message ('Mut s) -> List ('Mut s) -> m (List ('Mut s))
 copyList dest src = case src of
     List0 src      -> List0 <$> allocList0 dest (length src)
     List1 src      -> List1 <$> copyNewListOf dest src allocList1
@@ -739,31 +729,31 @@
         destList <- allocCompositeList
             dest
             (fromIntegral $ structListWordCount src)
-            (structListPtrCount  src)
+            (structListPtrCount src)
             (length src)
         copyListOf destList src
         pure destList
 
 copyNewListOf
     :: RWCtx m s
-    => M.MutMsg s
-    -> ListOf (M.MutMsg s) a
-    -> (M.MutMsg s -> Int -> m (ListOf (M.MutMsg s) a))
-    -> m (ListOf (M.MutMsg s) a)
+    => M.Message ('Mut s)
+    -> ListOf ('Mut s) a
+    -> (M.Message ('Mut s) -> Int -> m (ListOf ('Mut s) a))
+    -> m (ListOf ('Mut s) a)
 copyNewListOf destMsg src new = do
     dest <- new destMsg (length src)
     copyListOf dest src
     pure dest
 
 
-copyListOf :: RWCtx m s => ListOf (M.MutMsg s) a -> ListOf (M.MutMsg s) a -> m ()
+copyListOf :: RWCtx m s => ListOf ('Mut s) a -> ListOf ('Mut s) a -> m ()
 copyListOf dest src =
     forM_ [0..length src - 1] $ \i -> do
         value <- index i src
         setIndex value i dest
 
 -- | @'copyStruct' dest src@ copies the source struct to the destination struct.
-copyStruct :: RWCtx m s => Struct (M.MutMsg s) -> Struct (M.MutMsg s) -> m ()
+copyStruct :: RWCtx m s => Struct ('Mut s) -> Struct ('Mut s) -> m ()
 copyStruct dest src = do
     -- We copy both the data and pointer sections from src to dest,
     -- padding the tail of the destination section with zeros/null
@@ -785,10 +775,10 @@
 
 
 -- | @index i list@ returns the ith element in @list@. Deducts 1 from the quota
-index :: ReadCtx m msg => Int -> ListOf msg a -> m a
+index :: ReadCtx m mut => Int -> ListOf mut a -> m a
 index i list = invoice 1 >> index' list
   where
-    index' :: ReadCtx m msg => ListOf msg a -> m a
+    index' :: ReadCtx m mut => ListOf mut a -> m a
     index' (ListOfVoid nlist)
         | i < nLen nlist = pure ()
         | otherwise = throwM E.BoundsError { E.index = i, E.maxIndex = nLen nlist - 1 }
@@ -810,7 +800,7 @@
     index' (ListOfPtr (NormalList ptr@M.WordPtr{pAddr=addr@WordAt{..}} len))
         | i < len = get ptr { M.pAddr = addr { wordIndex = wordIndex + WordCount i } }
         | otherwise = throwM E.BoundsError { E.index = i, E.maxIndex = len - 1}
-    indexNList :: (ReadCtx m msg, Integral a) => NormalList msg -> Int -> m a
+    indexNList :: (ReadCtx m mut, Integral a) => NormalList mut -> Int -> m a
     indexNList (NormalList M.WordPtr{pSegment, pAddr=WordAt{..}} len) eltsPerWord
         | i < len = do
             let wordIndex' = wordIndex + WordCount (i `div` eltsPerWord)
@@ -902,26 +892,28 @@
 
 -- | @'setData' value i struct@ sets the @i@th word in the struct's data section
 -- to @value@.
-setData :: (ReadCtx m (M.MutMsg s), M.WriteCtx m s)
-    => Word64 -> Int -> Struct (M.MutMsg s) -> m ()
+setData :: (ReadCtx m ('Mut s), M.WriteCtx m s)
+    => Word64 -> Int -> Struct ('Mut s) -> m ()
 setData value i = setIndex value i . dataSection
 
 -- | @'setData' value i struct@ sets the @i@th pointer in the struct's pointer
 -- section to @value@.
-setPtr :: (ReadCtx m (M.MutMsg s), M.WriteCtx m s) => Maybe (Ptr (M.MutMsg s)) -> Int -> Struct (M.MutMsg s) -> m ()
+setPtr :: (ReadCtx m ('Mut s), M.WriteCtx m s) => Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
 setPtr value i = setIndex value i . ptrSection
 
 -- | 'rawBytes' returns the raw bytes corresponding to the list.
-rawBytes :: ReadCtx m msg => ListOf msg Word8 -> m BS.ByteString
+rawBytes :: ReadCtx m 'Const => ListOf 'Const Word8 -> m BS.ByteString
+-- TODO: we can get away with a more lax context than ReadCtx, maybe even make
+-- this non-monadic.
 rawBytes (ListOfWord8 (NormalList M.WordPtr{pSegment, pAddr=WordAt{wordIndex}} len)) = do
     invoice $ fromIntegral $ bytesToWordsCeil (ByteCount len)
-    bytes <- M.toByteString pSegment
+    let bytes = M.toByteString pSegment
     let ByteCount byteOffset = wordsToBytes wordIndex
     pure $ BS.take len $ BS.drop byteOffset bytes
 
 
 -- | Returns the root pointer of a message.
-rootPtr :: ReadCtx m msg => msg -> m (Struct msg)
+rootPtr :: ReadCtx m mut => M.Message mut -> m (Struct mut)
 rootPtr msg = do
     seg <- M.getSegment msg 0
     root <- get M.WordPtr
@@ -937,14 +929,14 @@
 
 
 -- | Make the given struct the root object of its message.
-setRoot :: M.WriteCtx m s => Struct (M.MutMsg s) -> m ()
+setRoot :: M.WriteCtx m s => Struct ('Mut s) -> m ()
 setRoot (Struct M.WordPtr{pMessage, pAddr=addr} dataSz ptrSz) = do
     pSegment <- M.getSegment pMessage 0
     let rootPtr = M.WordPtr{pMessage, pSegment, pAddr = WordAt 0 0}
     setPointerTo rootPtr addr (P.StructPtr 0 dataSz ptrSz)
 
 -- | Allocate a struct in the message.
-allocStruct :: M.WriteCtx m s => M.MutMsg s -> Word16 -> Word16 -> m (Struct (M.MutMsg s))
+allocStruct :: M.WriteCtx m s => M.Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
 allocStruct msg dataSz ptrSz = do
     let totalSz = fromIntegral dataSz + fromIntegral ptrSz
     ptr <- M.alloc msg totalSz
@@ -953,11 +945,11 @@
 -- | Allocate a composite list.
 allocCompositeList
     :: M.WriteCtx m s
-    => M.MutMsg s -- ^ The message to allocate in.
+    => M.Message ('Mut s) -- ^ The message to allocate in.
     -> Word16     -- ^ The size of the data section
     -> Word16     -- ^ The size of the pointer section
     -> Int        -- ^ The length of the list in elements.
-    -> m (ListOf (M.MutMsg s) (Struct (M.MutMsg s)))
+    -> m (ListOf ('Mut s) (Struct ('Mut s)))
 allocCompositeList msg dataSz ptrSz len = do
     let eltSize = fromIntegral dataSz + fromIntegral ptrSz
     ptr@M.WordPtr{pSegment, pAddr=addr@WordAt{wordIndex}}
@@ -970,25 +962,25 @@
     pure $ ListOfStruct firstStruct len
 
 -- | Allocate a list of capnproto @Void@ values.
-allocList0   :: M.WriteCtx m s => M.MutMsg s -> Int -> m (ListOf (M.MutMsg s) ())
+allocList0   :: M.WriteCtx m s => M.Message ('Mut s) -> Int -> m (ListOf ('Mut s) ())
 
 -- | Allocate a list of booleans
-allocList1   :: M.WriteCtx m s => M.MutMsg s -> Int -> m (ListOf (M.MutMsg s) Bool)
+allocList1   :: M.WriteCtx m s => M.Message ('Mut s) -> Int -> m (ListOf ('Mut s) Bool)
 
 -- | Allocate a list of 8-bit values.
-allocList8   :: M.WriteCtx m s => M.MutMsg s -> Int -> m (ListOf (M.MutMsg s) Word8)
+allocList8   :: M.WriteCtx m s => M.Message ('Mut s) -> Int -> m (ListOf ('Mut s) Word8)
 
 -- | Allocate a list of 16-bit values.
-allocList16  :: M.WriteCtx m s => M.MutMsg s -> Int -> m (ListOf (M.MutMsg s) Word16)
+allocList16  :: M.WriteCtx m s => M.Message ('Mut s) -> Int -> m (ListOf ('Mut s) Word16)
 
 -- | Allocate a list of 32-bit values.
-allocList32  :: M.WriteCtx m s => M.MutMsg s -> Int -> m (ListOf (M.MutMsg s) Word32)
+allocList32  :: M.WriteCtx m s => M.Message ('Mut s) -> Int -> m (ListOf ('Mut s) Word32)
 
 -- | Allocate a list of 64-bit words.
-allocList64  :: M.WriteCtx m s => M.MutMsg s -> Int -> m (ListOf (M.MutMsg s) Word64)
+allocList64  :: M.WriteCtx m s => M.Message ('Mut s) -> Int -> m (ListOf ('Mut s) Word64)
 
 -- | Allocate a list of pointers.
-allocListPtr :: M.WriteCtx m s => M.MutMsg s -> Int -> m (ListOf (M.MutMsg s) (Maybe (Ptr (M.MutMsg s))))
+allocListPtr :: M.WriteCtx m s => M.Message ('Mut s) -> Int -> m (ListOf ('Mut s) (Maybe (Ptr ('Mut s))))
 
 allocList0   msg len = ListOfVoid   <$> allocNormalList 0  msg len
 allocList1   msg len = ListOfBool   <$> allocNormalList 1  msg len
@@ -1001,10 +993,10 @@
 -- | Allocate a NormalList
 allocNormalList
     :: M.WriteCtx m s
-    => Int        -- ^ The number bits per element
-    -> M.MutMsg s -- ^ The message to allocate in
-    -> Int        -- ^ The number of elements in the list.
-    -> m (NormalList (M.MutMsg s))
+    => Int                  -- ^ The number bits per element
+    -> M.Message ('Mut s) -- ^ The message to allocate in
+    -> Int                  -- ^ The number of elements in the list.
+    -> m (NormalList ('Mut s))
 allocNormalList bitsPerElt msg len = do
     -- round 'len' up to the nearest word boundary.
     let totalBits = BitCount (len * bitsPerElt)
@@ -1012,7 +1004,7 @@
     ptr <- M.alloc msg totalWords
     pure NormalList { nPtr = ptr, nLen = len }
 
-appendCap :: M.WriteCtx m s => M.MutMsg s -> M.Client -> m (Cap (M.MutMsg s))
+appendCap :: M.WriteCtx m s => M.Message ('Mut s) -> M.Client -> m (Cap ('Mut s))
 appendCap msg client = do
     i <- M.appendCap msg client
     pure $ Cap msg (fromIntegral i)
diff --git a/lib/Capnp/Untyped/Pure.hs b/lib/Capnp/Untyped/Pure.hs
--- a/lib/Capnp/Untyped/Pure.hs
+++ b/lib/Capnp/Untyped/Pure.hs
@@ -1,4 +1,5 @@
 {-# LANGUAGE BangPatterns               #-}
+{-# LANGUAGE DataKinds                  #-}
 {-# LANGUAGE DeriveGeneric              #-}
 {-# LANGUAGE FlexibleContexts           #-}
 {-# LANGUAGE FlexibleInstances          #-}
@@ -47,6 +48,7 @@
     , Marshal (..)
     , ToPtr (..)
     )
+import Capnp.Message          (Mutability (..))
 import Internal.Gen.Instances ()
 
 import qualified Capnp.Message as M
@@ -132,7 +134,7 @@
             let nptrs = fromIntegral $ U.structPtrCount struct in
             V.generateM nptrs (\i -> U.getPtr i struct >>= decerialize)
 
-instance FromStruct M.ConstMsg Struct where
+instance FromStruct 'Const Struct where
     fromStruct = decerialize
 
 instance Marshal s Struct where
@@ -170,14 +172,14 @@
 -- | Decerialize an untyped list, whose elements are instances of Decerialize. This isn't
 -- an instance, since it would have to be an instance of (List a), which conflicts with
 -- the above.
-decerializeListOf :: (U.ReadCtx m M.ConstMsg, Decerialize a)
-    => U.ListOf M.ConstMsg (Cerial M.ConstMsg a) -> m (ListOf a)
+decerializeListOf :: (U.ReadCtx m 'Const, Decerialize a)
+    => U.ListOf 'Const (Cerial 'Const a) -> m (ListOf a)
 decerializeListOf raw = V.generateM (U.length raw) (\i -> U.index i raw >>= decerialize)
 
 -- | Decerialize an untyped list, leaving the elements of the list as-is. The is most
 -- interesting for types that go in the data section of a struct, hence the name.
-decerializeListOfWord :: (U.ReadCtx m M.ConstMsg)
-    => U.ListOf M.ConstMsg a -> m (ListOf a)
+decerializeListOfWord :: (U.ReadCtx m 'Const)
+    => U.ListOf 'Const a -> m (ListOf a)
 decerializeListOfWord raw = V.generateM (U.length raw) (`U.index` raw)
 
 instance Decerialize List where
@@ -225,13 +227,15 @@
             (0, 0)
 
 
-cerializeListOfWord :: U.RWCtx m s => (Int -> m (U.ListOf (M.MutMsg s) a)) -> ListOf a -> m (U.ListOf (M.MutMsg s) a)
+cerializeListOfWord
+    :: U.RWCtx m s
+    => (Int -> m (U.ListOf ('Mut s) a)) -> ListOf a -> m (U.ListOf ('Mut s) a)
 cerializeListOfWord alloc list = do
     ret <- alloc (length list)
     marshalListOfWord ret list
     pure ret
 
-marshalListOfWord :: U.RWCtx m s => U.ListOf (M.MutMsg s) a -> ListOf a -> m ()
+marshalListOfWord :: U.RWCtx m s => U.ListOf ('Mut s) a -> ListOf a -> m ()
 marshalListOfWord raw l =
     forM_ [0..length l - 1] $ \i ->
         U.setIndex (l V.! i) i raw
diff --git a/lib/Codec/Capnp.hs b/lib/Codec/Capnp.hs
--- a/lib/Codec/Capnp.hs
+++ b/lib/Codec/Capnp.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds             #-}
 {-# LANGUAGE FlexibleContexts      #-}
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE TypeFamilies          #-}
@@ -9,22 +10,24 @@
 
 import Capnp.Classes
 
+import Capnp.Message (Mutability (..))
+
 import qualified Capnp.Message as M
 import qualified Capnp.Untyped as U
 
 -- | 'newRoot' allocates and returns a new value inside the message, setting
 -- it as the root object of the message.
-newRoot :: (ToStruct (M.MutMsg s) a, Allocate s a, M.WriteCtx m s)
-    => M.MutMsg s -> m a
+newRoot :: (ToStruct ('Mut s) a, Allocate s a, M.WriteCtx m s)
+    => M.Message ('Mut s) -> m a
 newRoot msg = do
     ret <- new msg
     setRoot ret
     pure ret
 
 -- | 'setRoot' sets its argument to be the root object in its message.
-setRoot :: (ToStruct (M.MutMsg s) a, M.WriteCtx m s) => a -> m ()
+setRoot :: (ToStruct ('Mut s) a, M.WriteCtx m s) => a -> m ()
 setRoot = U.setRoot . toStruct
 
 -- | 'getRoot' returns the root object of a message.
-getRoot :: (FromStruct msg a, U.ReadCtx m msg) => msg -> m a
+getRoot :: (FromStruct mut a, U.ReadCtx m mut) => M.Message mut -> m a
 getRoot msg = U.rootPtr msg >>= fromStruct
diff --git a/tests/Module/Capnp/Basics.hs b/tests/Module/Capnp/Basics.hs
--- a/tests/Module/Capnp/Basics.hs
+++ b/tests/Module/Capnp/Basics.hs
@@ -13,7 +13,8 @@
 
 import Capnp.Basics
 
-import Capnp (cerialize, evalLimitT, newMessage)
+import Capnp        (cerialize, evalLimitT, newMessage)
+import Data.Mutable (Thaw(freeze))
 
 import qualified Capnp.Untyped as U
 
@@ -25,5 +26,5 @@
                 msg <- newMessage Nothing
                 cerial <- cerialize msg text
                 buf <- textBuffer cerial
-                bytes <- textBytes cerial
+                bytes <- freeze cerial >>= textBytes
                 liftIO $ BS.length bytes `shouldBe` U.length buf
diff --git a/tests/Module/Capnp/Canonicalize.hs b/tests/Module/Capnp/Canonicalize.hs
--- a/tests/Module/Capnp/Canonicalize.hs
+++ b/tests/Module/Capnp/Canonicalize.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds    #-}
 {-# LANGUAGE LambdaCase   #-}
 {-# LANGUAGE ViewPatterns #-}
 module Module.Capnp.Canonicalize
@@ -53,14 +54,14 @@
             , show $ LBS.unpack $ msgToLBS refMsg
             ]
 
-ourImplCanonicalize :: PU.Struct -> Maybe M.ConstMsg
+ourImplCanonicalize :: PU.Struct -> Maybe (M.Message 'M.Const)
 ourImplCanonicalize struct = createPure maxBound $ do
     msg <- M.newMessage Nothing
     rawStruct <- cerialize msg struct
     (msg, _) <- canonicalize rawStruct
     pure msg
 
-refImplCanonicalize :: PU.Struct -> IO M.ConstMsg
+refImplCanonicalize :: PU.Struct -> IO (M.Message 'M.Const)
 refImplCanonicalize struct = do
     msg <- createPure maxBound $ do
         msg <- M.newMessage Nothing
@@ -68,5 +69,5 @@
         U.setRoot rawStruct
         pure msg
     lbs <- capnpCanonicalize (msgToLBS msg)
-    segment <- M.fromByteString $ LBS.toStrict lbs
+    let segment = M.fromByteString $ LBS.toStrict lbs
     pure $ M.singleSegment segment
diff --git a/tests/Module/Capnp/Gen/Capnp/Schema.hs b/tests/Module/Capnp/Gen/Capnp/Schema.hs
--- a/tests/Module/Capnp/Gen/Capnp/Schema.hs
+++ b/tests/Module/Capnp/Gen/Capnp/Schema.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds       #-}
 {-# LANGUAGE RecordWildCards #-}
 module Module.Capnp.Gen.Capnp.Schema (schemaTests) where
 
@@ -18,7 +19,7 @@
 data BuildTest = BuildTest
     { typeName :: String
     , expected :: String
-    , builder  :: M.MutMsg RealWorld -> LimitT IO ()
+    , builder  :: M.Message ('M.Mut RealWorld) -> LimitT IO ()
     }
 
 schemaTests :: Spec
diff --git a/tests/Module/Capnp/Gen/Capnp/Schema/Pure.hs b/tests/Module/Capnp/Gen/Capnp/Schema/Pure.hs
--- a/tests/Module/Capnp/Gen/Capnp/Schema/Pure.hs
+++ b/tests/Module/Capnp/Gen/Capnp/Schema/Pure.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds             #-}
 {-# LANGUAGE DuplicateRecordFields #-}
 {-# LANGUAGE FlexibleContexts      #-}
 {-# LANGUAGE NegativeLiterals      #-}
@@ -10,12 +11,12 @@
 import Data.Proxy
 import Test.Hspec
 
-import Control.Exception.Safe  (bracket)
-import Control.Monad           (when)
-import Control.Monad.Primitive (RealWorld)
-import Data.Default            (Default (..))
-import Data.Foldable           (traverse_)
-import System.Directory        (removeFile)
+import Control.Exception.Safe    (bracket)
+import Control.Monad             (when)
+import Control.Monad.Primitive   (RealWorld)
+import Data.Default              (Default (..))
+import Data.Foldable             (traverse_)
+import System.Directory          (removeFile)
 import System.IO
     (IOMode(ReadMode, WriteMode), hClose, openBinaryTempFile, withBinaryFile)
 import Test.QuickCheck           (Property, property)
@@ -32,7 +33,8 @@
 
 import Instances ()
 
-import Capnp         (getRoot, hGetValue, hPutValue, setRoot)
+import Capnp
+    (Mutability (..), getRoot, hGetValue, hPutValue, setRoot)
 import Capnp.Classes
     ( Allocate (..)
     , Cerialize (..)
@@ -66,9 +68,9 @@
         ( Show a
         , Eq a
         , Cerialize RealWorld a
-        , FromStruct M.ConstMsg (Cerial M.ConstMsg a)
-        , ToStruct (M.MutMsg RealWorld) (Cerial (M.MutMsg RealWorld) a)
-        , Allocate RealWorld (Cerial (M.MutMsg RealWorld) a)
+        , FromStruct 'Const (Cerial 'Const a)
+        , ToStruct ('Mut RealWorld) (Cerial ('Mut RealWorld) a)
+        , Allocate RealWorld (Cerial ('Mut RealWorld) a)
         ) => (String, a, String) -> Spec
     testCase (name, expectedValue, expectedText) = describe "cerialize" $
         it ("Should agree with capnp decode (with name = " ++ name ++ ")") $ do
@@ -78,7 +80,7 @@
                 cerialOut <- cerialize msg expectedValue
                 setRoot cerialOut
                 freeze msg
-            builder <- M.encode msg
+            let builder = M.encode msg
             actualText <- capnpDecode
                 (LBS.toStrict $ BB.toLazyByteString builder)
                 (MsgMetaData schemaSchemaSrc name)
@@ -402,7 +404,7 @@
         ( Eq a
         , Show a
         , Decerialize a
-        , FromStruct M.ConstMsg a
+        , FromStruct 'Const a
         ) => String -> [(String, a)] -> Spec
     decodeTests typename cases =
         describe ("Decode " ++ typename) $ traverse_ (testCase typename) cases
@@ -423,9 +425,9 @@
     ( Show a
     , Eq a
     , Default a
-    , FromStruct M.ConstMsg a
+    , FromStruct 'Const a
     , Cerialize RealWorld a
-    , ToStruct (M.MutMsg RealWorld) (Cerial (M.MutMsg RealWorld) a)
+    , ToStruct ('Mut RealWorld) (Cerial ('Mut RealWorld) a)
     ) => String -> Proxy a -> Spec
 decodeDefault typename proxy =
     specify ("The empty struct decodes to the default value for " ++ typename) $ do
@@ -468,9 +470,9 @@
 prop_hGetPutInverses ::
     ( Show a
     , Eq a
-    , FromStruct M.ConstMsg a
+    , FromStruct 'Const a
     , Cerialize RealWorld a
-    , ToStruct (M.MutMsg RealWorld) (Cerial (M.MutMsg RealWorld) a)
+    , ToStruct ('Mut RealWorld) (Cerial ('Mut RealWorld) a)
     ) => Proxy a -> a -> Property
 prop_hGetPutInverses _proxy expected = propertyIO $ do
     -- This is a little more complicated than I'd like due to resource
@@ -495,9 +497,9 @@
     ( Show a
     , Eq a
     , Cerialize RealWorld a
-    , FromStruct M.ConstMsg (Cerial M.ConstMsg a)
-    , ToStruct (M.MutMsg RealWorld) (Cerial (M.MutMsg RealWorld) a)
-    , Allocate RealWorld (Cerial (M.MutMsg RealWorld) a)
+    , FromStruct 'Const (Cerial 'Const a)
+    , ToStruct ('Mut RealWorld) (Cerial ('Mut RealWorld) a)
+    , Allocate RealWorld (Cerial ('M.Mut RealWorld) a)
     ) => Proxy a -> a -> Property
 prop_cerializeDecerializeInverses _proxy expected = propertyIO $ do
     actual <- evalLimitT maxBound $ do
@@ -505,7 +507,7 @@
         msg <- M.newMessage Nothing
         cerialOut <- cerialize msg expected
         setRoot cerialOut
-        constMsg :: M.ConstMsg <- freeze msg
+        constMsg :: M.Message 'Const <- freeze msg
         root <- U.rootPtr constMsg
         cerialIn <- fromStruct root
         decerialize cerialIn
diff --git a/tests/Module/Capnp/Untyped.hs b/tests/Module/Capnp/Untyped.hs
--- a/tests/Module/Capnp/Untyped.hs
+++ b/tests/Module/Capnp/Untyped.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds             #-}
 {-# LANGUAGE DuplicateRecordFields #-}
 {-# LANGUAGE FlexibleContexts      #-}
 {-# LANGUAGE OverloadedStrings     #-}
@@ -110,7 +111,7 @@
 
 data ModTest s = ModTest
     { testIn   :: String
-    , testMod  :: Struct (M.MutMsg RealWorld) -> LimitT IO ()
+    , testMod  :: Struct ('M.Mut RealWorld) -> LimitT IO ()
     , testOut  :: String
     , testType :: String
     }
@@ -323,7 +324,7 @@
                         , implicitParameters = params
                         , paramBrand = brand
                         }
-                msg :: M.ConstMsg <- createPure maxBound $ do
+                msg :: M.Message 'M.Const <- createPure maxBound $ do
                         methodMsg <- M.newMessage Nothing
                         nameMsg <- M.newMessage Nothing
                         paramsMsg <- M.newMessage Nothing
diff --git a/tests/Module/Capnp/Untyped/Pure.hs b/tests/Module/Capnp/Untyped/Pure.hs
--- a/tests/Module/Capnp/Untyped/Pure.hs
+++ b/tests/Module/Capnp/Untyped/Pure.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds         #-}
 {-# LANGUAGE OverloadedLists   #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# LANGUAGE QuasiQuotes       #-}
@@ -53,5 +54,5 @@
                     ]
                 ]
   where
-    readStruct :: U.Struct M.ConstMsg -> LimitT IO Struct
+    readStruct :: U.Struct 'M.Const -> LimitT IO Struct
     readStruct = decerialize
diff --git a/tests/SchemaQuickCheck.hs b/tests/SchemaQuickCheck.hs
--- a/tests/SchemaQuickCheck.hs
+++ b/tests/SchemaQuickCheck.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds           #-}
 {-# LANGUAGE ScopedTypeVariables #-}
 module SchemaQuickCheck
     (schemaCGRQuickCheck)
@@ -35,9 +36,9 @@
 
 decodeCGR :: BS.ByteString -> IO (WordCount, Int)
 decodeCGR bytes = do
-    let reader :: Untyped.Struct M.ConstMsg -> LimitT IO Int
+    let reader :: Untyped.Struct 'M.Const -> LimitT IO Int
         reader struct = do
-            req :: Schema.CodeGeneratorRequest M.ConstMsg <- fromStruct struct
+            req :: Schema.CodeGeneratorRequest 'M.Const <- fromStruct struct
             nodes <- Schema.get_CodeGeneratorRequest'nodes req
             _ <- Schema.get_CodeGeneratorRequest'requestedFiles req
             return (Basics.length nodes)
diff --git a/tests/Util.hs b/tests/Util.hs
--- a/tests/Util.hs
+++ b/tests/Util.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds         #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# LANGUAGE QuasiQuotes       #-}
 {-# LANGUAGE TypeFamilies      #-}
@@ -105,16 +106,16 @@
 -- | @'decodeValue' schema typename message@ decodes the value at the root of
 -- the message and converts it to text. This is a thin wrapper around
 -- 'capnpDecode'.
-decodeValue :: String -> String -> M.ConstMsg -> IO String
-decodeValue schema typename msg = do
-    bytes <- M.encode msg
+decodeValue :: String -> String -> M.Message 'M.Const -> IO String
+decodeValue schema typename msg =
+    let bytes = M.encode msg in
     capnpDecode
         (LBS.toStrict $ BB.toLazyByteString bytes)
         (MsgMetaData schema typename)
 
 -- | @'encodeValue' schema typename value@ encodes the textual value @value@
 -- as a capnp message. This is a thin wrapper around 'capnpEncode'.
-encodeValue :: String -> String -> String -> IO M.ConstMsg
+encodeValue :: String -> String -> String -> IO (M.Message 'M.Const)
 encodeValue schema typename value =
     let meta = MsgMetaData schema typename
     in capnpEncode value meta >>= M.decode
diff --git a/tests/WalkSchemaCodeGenRequest.hs b/tests/WalkSchemaCodeGenRequest.hs
--- a/tests/WalkSchemaCodeGenRequest.hs
+++ b/tests/WalkSchemaCodeGenRequest.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds           #-}
 {-# LANGUAGE FlexibleContexts    #-}
 {-# LANGUAGE OverloadedStrings   #-}
 {-# LANGUAGE ScopedTypeVariables #-}
@@ -59,9 +60,9 @@
             endQuota <- execLimitT 4096 (rootPtr msg >>= reader)
             endQuota `shouldBe` 3452
   where
-    reader :: Struct M.ConstMsg -> LimitT IO ()
+    reader :: Struct 'M.Const -> LimitT IO ()
     reader root = do
-        req :: Schema.CodeGeneratorRequest M.ConstMsg <- fromStruct root
+        req :: Schema.CodeGeneratorRequest 'M.Const <- fromStruct root
         nodes <- Schema.get_CodeGeneratorRequest'nodes req
         requestedFiles <- Schema.get_CodeGeneratorRequest'requestedFiles req
         lift $ length nodes `shouldBe` 37
