caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Holger Schulz" <qdl@gmx.net>
To: caml-list@pauillac.inria.fr
Subject: [Caml-list] OCaml error message
Date: Mon, 3 May 2004 20:19:19 +0200 (MEST)	[thread overview]
Message-ID: <14600.1083608359@www62.gmx.net> (raw)

I've following declarations

---cut---
type rat = int * int;;

exception Denominator_Zero;;

let rec ggT : (int * int) -> int = fun (x,y) -> if y = 0 then x else ggT 
(y, x mod y)

let kgV : int * int -> int = fun (x,y) -> (x / ggT (x,y)) * y 

let kuerze : rat -> rat = function (m,n)  -> if n = 0 then raise 
Denominator_Zero
				else let g=ggT (m,n) in (m div g,n div g)
---cut---

Loading it with #use give the following error message, which I do not 
understand. Could anyone help me?

---cut--
# #use "B2A3.ml";;
type rat = int * int
exception Denominator_Zero
val ggT : int * int -> int = <fun>
val kgV : int * int -> int = <fun>
File "B2A3.ml", line 10, characters 29-30:
This expression is not a function, it cannot be applied
---cut---

Thanks

hs

-- 
"Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
Jetzt aktivieren unter http://www.gmx.net/info

-------------------
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


             reply	other threads:[~2004-05-03 18:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-03 18:19 Holger Schulz [this message]
2004-05-03 18:38 ` Jean-Baptiste Rouquier
2004-05-03 18:42 ` Matt Gushee
2004-05-03 18:19 Holger Schulz

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=14600.1083608359@www62.gmx.net \
    --to=qdl@gmx.net \
    --cc=caml-list@pauillac.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).