- poly :: Type -> PolyType
-- poly (Fix (Ground t)) = ground t
-- poly (Fix (Vector t n)) = vector (poly t) n
-- poly (Fix (Bundle fs)) = bundle ((\f -> f { _fieldType = poly $ _fieldType f }) <$> fs)

poly :: Type -> PolyType
poly = cata alg
  where alg (Ground t) = ground t
        alg (Vector t n) = vector t n
        alg (Bundle fs) = bundle fs

poly :: Type -> PolyType
poly = cata alg
  where alg (Ground t) = ground t
        alg (Vector t n) = vector t n
        alg (Bundle fs) = bundle fs
poly = cata alg
  where alg (Ground t) = ground t
        alg (Vector t n) = vector t n
        alg (Bundle fs) = bundle fs