* [Caml-list] Re: findlib-0.8.1 and ocaml-3.07+beta1
[not found] <1059053910.4721.22.camel@athene>
@ 2003-07-25 0:27 ` james woodyatt
2003-07-25 1:28 ` Karl Zilles
2003-07-25 16:27 ` pjd
0 siblings, 2 replies; 4+ messages in thread
From: james woodyatt @ 2003-07-25 0:27 UTC (permalink / raw)
To: Gerd Stolpmann; +Cc: The Trade
On Thursday, Jul 24, 2003, at 06:38 US/Pacific, Gerd Stolpmann wrote:
> Am Don, 2003-07-24 um 08.29 schrieb james woodyatt:
>>
>> I think there might be something bolluxed in findlib-0.8.1 with
>> ocaml-3.07+beta1. I compiled and installed ocaml-3.07+beta1 on Mac OS
>> X 10.2.6 with December 2002 developer tools (gcc version 3.1
>> 20020420),
>> and it seems to work fine.
>>
>> But findlib-0.8.1 seems not to behave properly.
>
> Both problems are caused by an interface change in the module Arg.
> [...]
> Here is a patch so the beta testers can continue. Apply it with
> patch -p0 <patch
Applying this patch works for me.
I ran into only two problems making my current project compile and work
against the new beta1 version of ocaml-3.07:
+ The word 'parser' is a keyword again. So I had to change the names
of a class and some values to not conflict.
+ The ocamlmklib now makes dynamic libraries on Mac OS X, and that
means I had to fix my build-and-install recipe to handle that fact.
Figuring it out was a little tricky. The error message "Error on
dynamically loaded library: cannot access this bundle" is a little
cryptic. I had to change the source code to tell me which library
before I could understand why its image wasn't being mapped. I wasn't
copying dllfoo.so into its location next to libfoo.a, and fixing that
made everything better.
By the way, HUGE PHAT PROPS to the Caml Team for some of the new
language features, not to mention the dynamic linking love for Mac OS
X. I'm excited. I'm specifically excited about the polymorphic
generalization of covariant parts of expansive expressions. Believe it
or not. I think it might simplify some of my code dramatically.
--
j h woodyatt <jhw@wetware.com>
that's my village calling... no doubt, they want their idiot back.
-------------------
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Re: findlib-0.8.1 and ocaml-3.07+beta1
2003-07-25 0:27 ` [Caml-list] Re: findlib-0.8.1 and ocaml-3.07+beta1 james woodyatt
@ 2003-07-25 1:28 ` Karl Zilles
2003-07-25 1:52 ` james woodyatt
2003-07-25 16:27 ` pjd
1 sibling, 1 reply; 4+ messages in thread
From: Karl Zilles @ 2003-07-25 1:28 UTC (permalink / raw)
To: james woodyatt; +Cc: Gerd Stolpmann, The Trade
james woodyatt wrote:
> I'm specifically excited about the polymorphic
> generalization of covariant parts of expansive expressions.
I read about this in the changes document, but I'm unable to wrap my
head around it.
> For instance, if f: unit -> 'a list, "let x = f ()"
> gives "x" the generalized type forall 'a. 'a list, instead of '_a list
> as before.
Can someone simplify this for me? Under what circumstances would this
be useful?
Karl
-------------------
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Re: findlib-0.8.1 and ocaml-3.07+beta1
2003-07-25 1:28 ` Karl Zilles
@ 2003-07-25 1:52 ` james woodyatt
0 siblings, 0 replies; 4+ messages in thread
From: james woodyatt @ 2003-07-25 1:52 UTC (permalink / raw)
To: The Trade
On Thursday, Jul 24, 2003, at 18:28 US/Pacific, Karl Zilles wrote:
> james woodyatt wrote:
>> I'm specifically excited about the polymorphic generalization of
>> covariant parts of expansive expressions.
>
> I read about this in the changes document, but I'm unable to wrap my
> head around it.
>
> > For instance, if f: unit -> 'a list, "let x = f ()"
> > gives "x" the generalized type forall 'a. 'a list, instead of '_a
> list
> > as before.
>
> Can someone simplify this for me? Under what circumstances would this
> be useful?
Sure. I see it with functors. Consider the following example:
# module type X = sig
type +'a t
val f: unit -> 'a t
end;;
This is a module type I plan to use as the input to a functor. The top
responds with this following:
module type X = sig type +'a t val f : unit -> 'a t end
So, imagine you want to write a functor like so:
# module Y(X: X) = struct
let x = X.f ()
end;;
Here's what the 3.06 top-level says is the type of that module:
module Y : functor (X : X) -> sig val x : '_a X.t end
Here's what the 3.07+beta1 version says:
module Y : functor (X : X) -> sig val x : 'a X.t end
This is so much better. In the 3.06 case, I get a module whose type
isn't complete yet. In the 3.07+beta1 case, I get a module whose type
is complete. With 3.06, I have to write 'x' as a function that returns
a constructed object every time I call it. With 3.07+beta1, I can
write 'x' as a value that gets constructed once when the functor is
called.
--
j h woodyatt <jhw@wetware.com>
that's my village calling... no doubt, they want their idiot back.
-------------------
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Re: findlib-0.8.1 and ocaml-3.07+beta1
2003-07-25 0:27 ` [Caml-list] Re: findlib-0.8.1 and ocaml-3.07+beta1 james woodyatt
2003-07-25 1:28 ` Karl Zilles
@ 2003-07-25 16:27 ` pjd
1 sibling, 0 replies; 4+ messages in thread
From: pjd @ 2003-07-25 16:27 UTC (permalink / raw)
To: The Trade
> X. I'm excited. I'm specifically excited about the polymorphic
> generalization of covariant parts of expansive expressions.
That might explain my apparent lack of progress with ocaml.
Perhaps one needs to be a maths graduate and a mensa member to appreciate
the language ?
:-)
pj
-------------------
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-07-25 16:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1059053910.4721.22.camel@athene>
2003-07-25 0:27 ` [Caml-list] Re: findlib-0.8.1 and ocaml-3.07+beta1 james woodyatt
2003-07-25 1:28 ` Karl Zilles
2003-07-25 1:52 ` james woodyatt
2003-07-25 16:27 ` pjd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox