Add well-formedness constraints for uses of /^ and %^. Fixes #582.

This commit is contained in:
Brian Huffman 2019-03-18 14:05:34 -07:00
parent 3af02e9599
commit 6265cb3b0e

View File

@ -58,6 +58,8 @@ wfTypeFunction :: TFun -> [Type] -> [Prop]
wfTypeFunction TCSub [a,b] = [ a >== b, pFin b]
wfTypeFunction TCDiv [a,b] = [ b >== tOne, pFin a ]
wfTypeFunction TCMod [a,b] = [ b >== tOne, pFin a ]
wfTypeFunction TCCeilDiv [a,b] = [ pFin a, pFin b, b >== tOne ]
wfTypeFunction TCCeilMod [a,b] = [ pFin a, pFin b, b >== tOne ]
wfTypeFunction TCLenFromThenTo [a,b,c] = [ pFin a, pFin b, pFin c, a =/= b ]
wfTypeFunction _ _ = []