writeNonDispatchableHandleType :: HandleType -> CType -> Write Doc
writeNonDispatchableHandleType ht t = do
  doesDeriveStorable
  hsType <- cTypeToHsTypeString t
  boot <- isBoot
  let derivingString :: Doc
      derivingString = if boot
                         then [qc|
instance Eq {htName ht}
instance Storable {htName ht}|]
                         else fromString "deriving (Eq, Storable)"
  pure [qc|newtype {htName ht} = {htName ht} {hsType}
  {derivingString}
|]
writeNonDispatchableHandleType :: HandleType -> CType -> Write Doc
writeNonDispatchableHandleType ht t = do
  doesDeriveStorable
  hsType <- cTypeToHsTypeString t
  boot <- isBoot
  let derivingString :: Doc
      derivingString = if boot
                         then [qc|
instance Eq {htName ht}
instance Storable {htName ht}|]
                         else fromString "deriving (Eq, Storable)"
  pure [qc|newtype {htName ht} = {htName ht} {hsType}
  {derivingString}
|]
writeNonDispatchableHandleType ht t = do
  doesDeriveStorable
  hsType <- cTypeToHsTypeString t
  boot <- isBoot
  let derivingString :: Doc
      derivingString = if boot
                         then [qc|
instance Eq {htName ht}
instance Storable {htName ht}|]
                         else fromString "deriving (Eq, Storable)"
  pure [qc|newtype {htName ht} = {htName ht} {hsType}
  {derivingString}
|]