writeDispatchableHandleType :: HandleType -> CType -> Write Doc
writeDispatchableHandleType ht t = do
  tellRequiredName (ExternalName (ModuleName "Foreign.Ptr") "Ptr")
  hsType <- cTypeToHsTypeString t
  pure [qc|data {hsType}
type {htName ht} = Ptr {hsType}
|]
writeDispatchableHandleType :: HandleType -> CType -> Write Doc
writeDispatchableHandleType ht t = do
  tellRequiredName (ExternalName (ModuleName "Foreign.Ptr") "Ptr")
  hsType <- cTypeToHsTypeString t
  pure [qc|data {hsType}
type {htName ht} = Ptr {hsType}
|]
writeDispatchableHandleType ht t = do
  tellRequiredName (ExternalName (ModuleName "Foreign.Ptr") "Ptr")
  hsType <- cTypeToHsTypeString t
  pure [qc|data {hsType}
type {htName ht} = Ptr {hsType}
|]