From: "Matej Košík" <5764c029b688c1c0d24a2e97cd764f@gmail.com>
To: caml-list@inria.fr
Subject: [Caml-list] deriving
Date: Fri, 27 Jan 2012 16:51:35 +0000 [thread overview]
Message-ID: <4F22D617.1080802@gmail.com> (raw)
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.
next reply other threads:[~2012-01-27 16:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-27 16:51 Matej Košík [this message]
2012-01-27 23:29 ` [Caml-list] deriving Richard Stoerzer
2012-01-29 13:10 ` [Caml-list] deriving Lin
2012-01-29 18:11 ` 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=4F22D617.1080802@gmail.com \
--to=5764c029b688c1c0d24a2e97cd764f@gmail.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