Thanks. I'm not sure I understand the difference between the two though. Is there an example showing when they produce different results? On Sun, Mar 27, 2016 at 6:12 PM, Jacques Garrigue < garrigue@math.nagoya-u.ac.jp> wrote: > On 2016/03/28 03:52, Gregory Malecha wrote: > > > > Thanks, Leo -- > > > > This is exactly what I needed to know. I thought that the (type a) > annotation was forcing the function to be polymorphic. For future > reference, is there any way to write the annotation (that forces the > function to be polymorphic) without having to write explicit ‘fun's? > > You should either write > > let generic_search_stream : ‘b. int option -> (internal_result, ‘b) > result_stream = … > > or > > let generic_search_stream : type b. int option -> (internal_result, b) > result_stream = … > > where the latter one both requires polymorphism and defines a locally > abstract type, > i.e. probably the behavior you expect with (type b). > > Jacques > > -- gregory malecha