Skip to content

Commit

Permalink
Add a comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
yav committed Sep 3, 2024
1 parent 2103ce3 commit ffe79ce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Cryptol/TypeCheck/SimpType.hs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,13 @@ tSub :: Type -> Type -> Type
tSub x y
| Just t <- tOp TCSub (op2 nSub) [x,y] = t
| tIsInf y = tError (tf2 TCSub x y)

| tIsInf x = x
{- This assumes that `y` is finite and not error. The first should
follow from the typing on `tSub`, which asserts that the second argumet
is finite and less than the first; the second should have been handleed
by the first equation above `tOp`. -}

| Just 0 <- yNum = x
| Just k <- yNum
, TCon (TF TCAdd) [a,b] <- tNoUser x
Expand Down

0 comments on commit ffe79ce

Please sign in to comment.