<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/10/f070014a1ae9dad3251d6334d87f1555"
  from="Dustin Sallings &lt;dustin@s...&gt;"
  author="Dustin Sallings"
  date="2003-10-29T08:03:55"
  subject="Re: [Caml-list] newbie type problem"
  prev="2003/10/d2f1b208c9d36f5626b05e92dc16d26e"
  next="2003/10/ed044d47f888bfffb6ffeacf6d6db1b0"
  prev-in-thread="2003/10/1271d8cb3491b0027667093a335ee94e"
  next-in-thread="2003/10/669fd0c0dff2b0a039406b7cb928916d"
  prev-thread="2003/10/e7f6c0d5605db8954852475f246f1109"
  next-thread="2003/10/ef7ea5a38d2bceb896eb567f1eff1764"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] newbie type problem">
<msg 
  url="2003/10/2e8a6962baf66f1c24c5f132e0e4d98a"
  from="Dustin Sallings &lt;dustin@s...&gt;"
  author="Dustin Sallings"
  date="2003-10-24T06:11:43"
  subject="[Caml-list] newbie type problem">
<msg 
  url="2003/10/1ec46ca647143db0b89bf64b3fe444da"
  from="David Brown &lt;caml-list@d...&gt;"
  author="David Brown"
  date="2003-10-24T06:32:48"
  subject="Re: [Caml-list] newbie type problem">
<msg 
  url="2003/10/9e4d0c48d7066d16614195d454ef1c0d"
  from="Dustin Sallings &lt;dustin@s...&gt;"
  author="Dustin Sallings"
  date="2003-10-24T06:54:14"
  subject="Re: [Caml-list] newbie type problem">
<msg 
  url="2003/10/082653152d78e76edce7de62398f8c1f"
  from="David Brown &lt;caml-list@d...&gt;"
  author="David Brown"
  date="2003-10-24T07:53:03"
  subject="Re: [Caml-list] newbie type problem">
<msg 
  url="2003/10/a7c47b1fe652cbc379e868c63cd6fa6f"
  from="Dustin Sallings &lt;dustin@s...&gt;"
  author="Dustin Sallings"
  date="2003-10-24T08:21:36"
  subject="Re: [Caml-list] newbie type problem">
<msg 
  url="2003/10/f70a630abcb73995f40868e5b4aedd5d"
  from="Andrew Lenharth &lt;andrewl@d...&gt;"
  author="Andrew Lenharth"
  date="2003-10-24T12:50:08"
  subject="Re: [Caml-list] newbie type problem">
<msg 
  url="2003/10/4046091fba633875058f2de17f0ff1e7"
  from="Remi Vanicat &lt;vanicat@l...&gt;"
  author="Remi Vanicat"
  date="2003-10-24T13:21:26"
  subject="Re: [Caml-list] newbie type problem">
</msg>
</msg>
<msg 
  url="2003/10/1271d8cb3491b0027667093a335ee94e"
  from="Florian Hars &lt;hars@b...&gt;"
  author="Florian Hars"
  date="2003-10-29T07:23:31"
  subject="Re: [Caml-list] newbie type problem">
<msg 
  url="2003/10/f070014a1ae9dad3251d6334d87f1555"
  from="Dustin Sallings &lt;dustin@s...&gt;"
  author="Dustin Sallings"
  date="2003-10-29T08:03:55"
  subject="Re: [Caml-list] newbie type problem">
<msg 
  url="2003/10/669fd0c0dff2b0a039406b7cb928916d"
  from="Florian Hars &lt;hars@b...&gt;"
  author="Florian Hars"
  date="2003-10-29T16:27:29"
  subject="Re: [Caml-list] newbie type problem">
</msg>
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2003/10/bc22b36f43b4dd5f6d7af456fd0801fc"
  from="Hendrik Tews &lt;tews@t...&gt;"
  author="Hendrik Tews"
  date="2003-10-24T09:25:16"
  subject="Re: [Caml-list] newbie type problem">
<msg 
  url="2003/10/196dea4817e90f7281ee0ccc73dd15a7"
  from="Dustin Sallings &lt;dustin@s...&gt;"
  author="Dustin Sallings"
  date="2003-10-24T16:23:13"
  subject="Re: [Caml-list] newbie type problem">
</msg>
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>

On Oct 28, 2003, at 11:23 PM, Florian Hars wrote:

&gt; let parse_logfile filename =
&gt;   let ic = open_in filename in
&gt;   let start_events, transactions =
&gt;     Textfile.fold operate_on_line (M.empty, M.empty) ic in
&gt;   close_in ic;
&gt;   cleanup_dangling_events start_events transactions
&gt;
&gt; let _ = print_transaction_info (parse_logfile "my_logfile")

	What is Textfile?  I wrote something very similar to what I think this 
is in scheme (from which this thing is being ported somewhat slowly):

; Loop on input, pass each line to function f.
; Optional argument should be either a port, or a filename.  If not
; provided, (current-input-port) will be used.
(input-loop f . other)

; A conditional input loop (only loop on a line if (c line) is true)
(conditional-input-loop c f . other)

	I'll probably do the same thing in caml when I get this a little more 
out of the toy phase.

	Thanks for the input.

-- 
Dustin Sallings

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

