Skip to content

Commit

Permalink
Add an extra rule for Arith when the lenght of the sequence is inf
Browse files Browse the repository at this point in the history
Fixes #596
  • Loading branch information
yav committed May 28, 2019
1 parent 56cb58a commit 4ce64e9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Cryptol/TypeCheck/Solver/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,12 @@ solveArithSeq n ty = case tNoUser ty of
TCon (TC TCBit) [] -> SolvedIf [ pFin n ]

-- variables are not solvable.
TVar {} -> Unsolved
TVar {} -> case tNoUser n of
{- We are sure that the lenght is not `fin`, so the
special case for `Bit` does not apply.
Arith ty => Arith [n]ty -}
TCon (TC TCInf) [] -> SolvedIf [ pArith ty ]
_ -> Unsolved

-- Arith ty => Arith [n]ty
_ -> SolvedIf [ pArith ty ]
Expand Down

0 comments on commit 4ce64e9

Please sign in to comment.