msassak/lye — pull request #1 by blt (2013-04-05 06:06:00+00:00)
Title: Update specs to reflect non-empty list intentions.

In the commit for #7 Mike disabled -Wunderspecs because of

lye.erl:26: Type specification lye:check(structure(),Specs::[spec()]) -> 'ok' | [error()] is a supertype of the success typing: lye:check(_,[atom() | fun((_) -> 'ok' | {'error',binary()}) | tuple()]) -> 'ok' | [{'error',binary()},...]

That's sort of hard to read. Dialzyer is saying that the spec we gave check/2
was too permisive: the domain is expressible as a smaller set; that's the
'supertype of the success typing'. While it was our intention never to return an
empty list from check/2 our types asserted that we _might_.

A liberal sprinkling of nonempty_list() solves the issue and more correctly
expresses our intention.

Signed-off-by: Brian L. Troutwine