[erlang-questions] iolist type not found by PropEr

Kostis Sagonas kostis@REDACTED
Wed Apr 13 21:59:45 CEST 2011

James Aimonetti wrote:
> I'm starting to add PropEr testing into my source code and ran into a 
> small issue. When testing with the iolist() type, proper:quickcheck/1 
> complains:
> 1> proper:quickcheck(iolist_t:prop_iolist_t()).
> Error: The typeserver encountered an error: 
> {missing_type,iolist_t,{type,iolist,0}}.
> {error,{typeserver,{missing_type,iolist_t,{type,iolist,0}}}}
> 2>
> The code:
> -module(iolist_t).
> -export([]).
> -include_lib("proper/include/proper.hrl").
> prop_iolist_t() ->
>     ?FORALL(IO, iolist(), is_binary(iolist_to_binary(IO))).
> This is on R14B01 and the latest PropEr from Github. If I copy/paste the 
> typespec from the docs for iolist(), the compiler rightfully complains 
> that iolist is already defined.

We are aware of the issue; it's on our TODO list. We are trying to find 
the proper way of also generating improper lists --- for some reason we 
find it... well, probably not the PropEr thing to do ;-)

> Aside from this, I'm really enjoying adding PropEr testing. Thanks to 
> Kostis & team for all the tools making my Erlang better.

Thanks a lot for your comments and for liking even the tools we have not 
properly released yet!


More information about the erlang-questions mailing list