Commit Graph

3 Commits

Author SHA1 Message Date
Edwin Brady
43127b17a7 Move Fin, Vect and So from prelude to base
They can be imported from the modules Data.Fin, Data.Vect, and Data.So
respectively.

The general thinking here is that not every program is going to need
these, and they are often used especially by newcomers in place of
something more appropriate. Also, all of them are useful for teaching,
which means it is instructive for tutorials to introduce them and have
people implement them themselves.
2014-12-31 20:18:02 +00:00
Ahmad Salim Al-Sibahi
f0ed9e992f First renaming attempt 2014-09-26 07:34:28 +02:00
Edwin Brady
e363c092a2 Better treatment of unbound implicits
Now uses the elaborator to generate any necessary extra bindings, using
the same machinery as pattern match elaboration. The end result is that
you no longer need 'using' in a lot of cases (it is still useful if you
want to give explicit types, of course). e.g. this now works as it
stands:

  data Elem : a -> Vect n a -> Type where
       Here : Elem x (x :: xs)
       There : Elem x xs -> Elem x (y :: xs)

  isElem : DecEq a => (x : a) -> (xs : _) -> Maybe (Elem x xs)

This should also reduce the number of weird "no such variable" errors
signfificantly. In particular, it fixes #1354
2014-07-08 02:40:37 +01:00