Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] ocaml stream question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Garry Hodgson <garry@s...>
Subject: [Caml-list] ocaml stream question
i'm playing with ocaml streams to build a lexer, using ocaml 3.02.  
trying the sample code:

     let next = function [< 'x >] -> x ;;

gets me:

     Characters 20-22:
     Syntax error

do i need to do something special to enable streams?
if i just do:

     let foo = [<>];;

it works ok, giving me:

     val foo : 'a Stream.t = <abstr> 

it appears to be the pattern match it doesn't like.

any clues for the clueless?

Garry Hodgson                   Let my inspiration flow
Senior Hacker                      in token rhyme suggesting rhythm
Software Innovation Services    that will not forsake me
AT&T Labs                          'til my tale is told and done.
Bug reports:  FAQ:
To unsubscribe, mail  Archives: