@@ -2,6 +2,7 @@ module Solver
3import Decidable.Equality
3import Decidable.Equality
4import Control.Monad.State
4import Control.Monad.State
5import Data.Vect.Quantifiers
6import Data.Vect.Quantifiers
7%default total
8%default total
@@ -95,7 +96,7 @@ legalVal b (x, y) v =
95 case colSafe b x v of
96 case colSafe b x v of
96 No prf' => No (\(_, cf, _) => prf' cf)
97 No prf' => No (\(_, cf, _) => prf' cf)
97 Yes prf' =>
98 Yes prf' =>
98− case empty (getCell b (x, y)) of
99+ case Solver.empty (getCell b (x, y)) of
99 No prf'' => No (\(ef, _, _) => prf'' ef)
100 No prf'' => No (\(ef, _, _) => prf'' ef)
100 Yes prf'' => Yes (prf'', prf', prf)
101 Yes prf'' => Yes (prf'', prf', prf)
@@ -194,7 +195,7 @@ fillBoard {n=(S n)} b l with (emptyCell b)
195 %assert_total
196 %assert_total
196 recurse : Fin (S n) -> Maybe (b' : Board (S n) ** CompleteBoard b')
197 recurse : Fin (S n) -> Maybe (b' : Board (S n) ** CompleteBoard b')
197− recurse start =
198+ recurse start =
198 case tryAll start of
199 case tryAll start of
199 (_, Nothing) => Nothing
200 (_, Nothing) => Nothing
200 (FZ, Just (b' ** l')) => fillBoard b' l'
201 (FZ, Just (b' ** l')) => fillBoard b' l'