English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2001-12-10 (18:44)
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: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr