caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] deriving
@ 2012-01-27 16:51 Matej Košík
  2012-01-27 23:29 ` [Caml-list] deriving Richard Stoerzer
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Matej Košík @ 2012-01-27 16:51 UTC (permalink / raw)
  To: caml-list

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-01-29 19:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-27 16:51 [Caml-list] deriving Matej Košík
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

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