@@ -36,10 +36,10 @@ constrain env (A region expr) tipe =
3636 | otherwise -> return (name <? tipe)
3737
3838 Range lo hi ->
39− exists $ \x -> do
40− clo <- constrain env lo x
41− chi <- constrain env hi x
42− return $ and [clo, chi, list x === tipe]
39+ existsNumber $ \n -> do
40+ clo <- constrain env lo n
41+ chi <- constrain env hi n
42+ return $ and [clo, chi, list n === tipe]
4343
4444 ExplicitList exprs ->
4545 exists $ \x -> do