fastTypeOf doesn't perform any simplification when substituting types.

This makes it more useful for the saw-core translation, because we
can notice when type coercions need to be applied.
This commit is contained in:
Brian Huffman 2018-05-10 15:23:53 -07:00
parent ec5e84dd37
commit 13363c4c9b

View File

@ -66,7 +66,7 @@ fastSchemaOf tyenv expr =
Forall tparams props ty -> Forall (tparam : tparams) props ty
ETApp e t -> case fastSchemaOf tyenv e of
Forall (tparam : tparams) props ty
-> Forall tparams (map (plainSubst s) props) (apSubst s ty)
-> Forall tparams (map (plainSubst s) props) (plainSubst s ty)
where s = singleSubst (tpVar tparam) t
_ -> panic "Cryptol.TypeCheck.TypeOf.fastSchemaOf"
[ "ETApp body with no type parameters" ]