caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Tom <tom.primozic@gmail.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Haskell parser combinators in OCaml?
Date: Fri, 20 Oct 2006 17:19:35 +0200	[thread overview]
Message-ID: <c1490a380610200819s4952202cx86fc4381f23e7cd1@mail.gmail.com> (raw)
In-Reply-To: <20061019220131.GA18656@hex.no>

[-- Attachment #1: Type: text/plain, Size: 658 bytes --]

OCaml is able to infer types by itself, so what I suggest is that you don't
declare any local types, but only the global types (no (a:int) type
expressions, but only toplevel type 'a t = 'a -> 'a * 'a). Also, try
declaring only some of your types and define only some of your functions at
a time (using the toploop, interactive compiler) to see what are the
appropriate types the compiler infers.

Besides, you seem to have some errors in the code... for example:

  let succeed f =
>       let parse cont stack errors input = cont (stack f) errors input in
>       mkparser (End {parse=parse})
>   ;;



there is no End constructor declared.

Have fun, Tom

[-- Attachment #2: Type: text/html, Size: 938 bytes --]

      parent reply	other threads:[~2006-10-20 15:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-19 22:01 Jorgen Hermanrud Fjeld
2006-10-20  2:43 ` [Caml-list] " Jacques Garrigue
2006-10-20 15:19 ` Tom [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c1490a380610200819s4952202cx86fc4381f23e7cd1@mail.gmail.com \
    --to=tom.primozic@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).