core <- toCore modules expr
execCore core
--- | Get the length of a SizedWord type
+-- | Get the width of a SizedWord type
sized_word_len :: Type.Type -> Int
sized_word_len ty =
eval_tfp_int len
core <- toCore [] app
execCore core
+
+-- | Get the length of a FSVec type
+fsvec_len :: Type.Type -> Int
+fsvec_len ty =
+ eval_type_level_int len
+ where
+ (tycon, args) = Type.splitTyConApp ty
+ [len, el_ty] = args