@@ -39,10 +39,13 @@ parseCols {n=S k} row l cs = helper last l
3939 where
4040 step : {b : Board (S k)} -> LegalBoard b -> Fin (S k) -> Parser (S k)
4141 step {b=b} l x = do
42− tok <- parseToken (index x cs)
43− case legalVal b (x, row) tok of
44− Yes prf => return (_ ** Step prf l)
45− No _ => Left ("Illegal cell " ++ index x cs)
42+ tok <- parseToken {n=S k} (index x cs)
43+ case tok of
44+ Nothing => return (_ ** l)
45+ Just val =>
46+ case legalVal b (x, row) val of
47+ Yes prf => return (_ ** Step prf l)
48+ No _ => Left ("Illegal cell " ++ index x cs)
4649
4750 helper : {b : Board (S k)} -> Fin (S k) -> LegalBoard b -> Parser (S k)
4851 helper fO l = step l fO