X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=CoreTools.hs;h=3c26793c8c804ce7f9dd7262851565398638195d;hb=019e55a763768d778d0e62b4dc5e49f3c7e06a0f;hp=85c398ab7c2777bb920c749033f28caa2594d6c4;hpb=ef589dec9b04aa3d0a30a2b0787c50d07c320563;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git a/CoreTools.hs b/CoreTools.hs index 85c398a..3c26793 100644 --- a/CoreTools.hs +++ b/CoreTools.hs @@ -95,6 +95,13 @@ tfvec_len ty = where (tycon, args) = Type.splitTyConApp ty [len, el_ty] = args + +-- | Get the element type of a TFVec type +tfvec_elem :: Type.Type -> Type.Type +tfvec_elem ty = el_ty + where + (tycon, args) = Type.splitTyConApp ty + [len, el_ty] = args -- Is this a wild binder? is_wild :: CoreSyn.CoreBndr -> Bool