From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id E32267ED25 for ; Sun, 21 Jul 2013 13:34:05 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jean-marc.alliot@irit.fr) identity=pra; client-ip=147.127.176.11; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jean-marc.alliot@irit.fr"; x-sender="jean-marc.alliot@irit.fr"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jean-marc.alliot@irit.fr) identity=mailfrom; client-ip=147.127.176.11; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jean-marc.alliot@irit.fr"; x-sender="jean-marc.alliot@irit.fr"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of postmaster@n7smtp.enseeiht.fr designates 147.127.176.11 as permitted sender) identity=helo; client-ip=147.127.176.11; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jean-marc.alliot@irit.fr"; x-sender="postmaster@n7smtp.enseeiht.fr"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArMBAM/F61GTf7ALnGdsb2JhbABagzvAf4EXFg4BAQEBAQYWCTyCJQEFJwsBBVELISUPAhA2EwYCAQGHegMPBKkkg2oNiF6NKoJzFoNoA5V0gWmGI4N/ggWIOg X-IPAS-Result: ArMBAM/F61GTf7ALnGdsb2JhbABagzvAf4EXFg4BAQEBAQYWCTyCJQEFJwsBBVELISUPAhA2EwYCAQGHegMPBKkkg2oNiF6NKoJzFoNoA5V0gWmGI4N/ggWIOg X-IronPort-AV: E=Sophos;i="4.89,713,1367964000"; d="scan'208";a="21817780" Received: from n7smtp.enseeiht.fr ([147.127.176.11]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 21 Jul 2013 13:34:05 +0200 Received: from imap.enseeiht.fr (imap.enseeiht.fr [147.127.176.21]) by n7smtp.enseeiht.fr (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id r6LBY2K8030599 for ; Sun, 21 Jul 2013 13:34:04 +0200 Received: from [10.31.1.2] (AToulouse-159-1-64-114.w92-134.abo.wanadoo.fr [92.134.215.114]) (authenticated bits=0) by imap.enseeiht.fr (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id r6LBXxdA001858 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sun, 21 Jul 2013 13:34:02 +0200 Message-ID: <51EBC722.90609@irit.fr> Date: Sun, 21 Jul 2013 13:33:54 +0200 From: Jean-Marc Alliot User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: caml-list@inria.fr References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (n7smtp.enseeiht.fr [147.127.176.11]); Sun, 21 Jul 2013 13:34:04 +0200 (CEST) X-Scanned-By: MIMEDefang 2.64 on 147.127.176.11 Subject: Re: [Caml-list] Error: Unbound value abs_num Basic mistake :-) Loading is not the same as opening. You can either do (after #load): # open Num;; # abs_num;; - : Num.num -> Num.num = Or qualify the function with th module name: # Num.abs_num;; - : Num.num -> Num.num = And then don't forget abs_num needs a Num as an argument (and returns a Num) # abs_num (Num.Int 4);; - : Num.num = Int 4 And it's Num.Int and not Num.int (it is a constructor, not a function). Le 21/07/2013 12:47, zech.ph@gmail.com a écrit : > Hi, > > I'm new to OCaml and already struggling around with the seemingly easiest > things. > Following some introductory texts I wanted to play around a little with the > toplevel and its various features, among others, using provided modules. For > this, I thought about loading nums.cma and try some of its defined functions, > but it just does not work. See below for what I do in the toplevel and the > respective output. > >> ocaml > OCaml version 4.00.1 > # #load "nums.cma";; > # abs_num 4;; > Error: Unbound value abs_num > # abs 4;; > - : int = 4 > > >From my point it looks like I do not miss anything, yet, I just can't call > abs_num. And I don't know why. I'm working on a Fedora 19 x64. I checked > Bugzilla, but couldn't find any Fedora related issues (at least for this > behavior). > > Thanks for any help, > > Phil > > PS: I know about the beginner's list at yahoo, however, I chose this one as I > don't like their style of forced social integration using different > services...I hope this is ok... >