caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Lin <mysnowls@163.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] deriving
Date: Sun, 29 Jan 2012 21:10:57 +0800	[thread overview]
Message-ID: <4F254561.8030004@163.com> (raw)
In-Reply-To: <4F22D617.1080802@gmail.com>

I have no Fedora machine at hand, but from the error message it seems to 
have something to do with camlp4. Do you have it installed correctly? 
Check if you have the camlp4 command by `which camlp4`.

On 01/28/2012 12:51 AM, Matej Košík wrote:
> Hi,
>
> I would like to play with / evaluate the "deriving" library:
> http://code.google.com/p/deriving/wiki/Introduction
>
> How can I:
> - create a Ocaml top-level where I can play with it?
> - compile programs which take advantage of this library?
>
> I am on Fedora 16.
>
> What I have tried is this:
>
>    $ sudo yum install ocaml-deriving-devel
>    $ rlwrap ocaml
>    # #use "topfind";;
>    # #require "deriving";;
>    No such package: %{camlp4} - Required by `deriving'
>
> I am not sure how to proceed.
>
> ------------------------------------------------
>
> Concerning linking against this library, I have tried this:
>
>    $ cat Main.ml
>
>        let s = Show.show<int>  3
>
>    $ ocamlc -I +deriving -pp "camlp4of -I `ocamlc -where`/deriving
> nums.cma deriving.cma" deriving.cma Main.ml -o main
>
>        File "ghost-location", line 7, characters 8--144:
>        Error: Unbound value Show.show
>        make: *** [main] Error 2
>
> where "Main.ml" is supposed to be a program that uses syntactic sugar
> provided by "deriving" library.
>
> What is the proper way to get things compiled? I have failed to find any
> examples.
>
> Thanks in advance for the help.
>



  parent reply	other threads:[~2012-01-29 13:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-27 16:51 Matej Košík
2012-01-27 23:29 ` [Caml-list] deriving Richard Stoerzer
2012-01-29 13:10 ` Lin [this message]
2012-01-29 18:11   ` [Caml-list] deriving Matej Košík
2012-01-29 18:15     ` Adrien
2012-01-29 18:25       ` Matej Košík
2012-01-29 19:34 ` Richard W.M. Jones

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=4F254561.8030004@163.com \
    --to=mysnowls@163.com \
    --cc=caml-list@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).