gl changed the topic of #ocaml to: OCaml 3.07 ! -- Archive of Caml Weekly News: http://pauillac.inria.fr/~aschmitt/cwn , A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/ , A free book: http://cristal.inria.fr/~remy/cours/appsem, Mailing List (best ml ever for any computer language): http://caml.inria.fr/bin/wilma/caml-list | http://icfpcontest.org/ !!
Iter has quit [Read error: 110 (Connection timed out)]
maihem has joined #ocaml
GreyLensman has joined #ocaml
Nutssh has quit [Read error: 104 (Connection reset by peer)]
Smerdyakov has joined #ocaml
cjohnson has joined #ocaml
cmeme has quit [Remote closed the connection]
cmeme has joined #ocaml
cjohnson has quit [Read error: 104 (Connection reset by peer)]
GreyLensman has quit ["Leaving"]
maihem has quit ["Read error: 54 (Connection reset by chocolate)"]
monotonom has joined #ocaml
Smerdyakov has quit ["sleep"]
kinners has joined #ocaml
fab_ has joined #ocaml
_fab has quit [Read error: 60 (Operation timed out)]
slashvar1ejcp] has quit [Read error: 104 (Connection reset by peer)]
Manonthespoon has joined #ocaml
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
Manonthespoon has left #ocaml []
monotonom has quit ["Don't talk to those who talk to themselves."]
kinners has quit [Connection timed out]
mrsolo_ has quit ["Leaving"]
karryall has quit ["go"]
_shawn has quit [Read error: 104 (Connection reset by peer)]
shawn has joined #ocaml
kinners has joined #ocaml
_shawn has joined #ocaml
bk_ has joined #ocaml
_shawn has quit [Read error: 104 (Connection reset by peer)]
_shawn has joined #ocaml
shawn has quit [No route to host]
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
kinners has quit ["leaving"]
bk_ has joined #ocaml
urz has joined #ocaml
urz has quit []
karryall has joined #ocaml
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
buggs^z has joined #ocaml
buggs has quit [Read error: 110 (Connection timed out)]
Iter has joined #ocaml
cedricshock has quit ["Leaving"]
noss has joined #ocaml
maihem has joined #ocaml
buggs^z is now known as buggs
Axioplase has joined #ocaml
<Axioplase> Chat Lu!
<Banana> hello.
vincenz has joined #ocaml
mattam_ has joined #ocaml
mattam has quit [Read error: 60 (Operation timed out)]
Smerdyakov has joined #ocaml
noss has quit [Remote closed the connection]
noss has joined #ocaml
Godeke has joined #ocaml
Iter has quit [Read error: 110 (Connection timed out)]
maihem has quit [calvino.freenode.net irc.freenode.net]
cmeme has quit [calvino.freenode.net irc.freenode.net]
mattam_ is now known as mattam
maihem has joined #ocaml
cmeme has joined #ocaml
karryall has quit ["tcho"]
<fab_> why does "let f a b = () let test1 = f 3 let test2 = f 2.0" work and "let rec f a b = () and test1 = f 3 and test2 = f 2.0" gives a type error?
<gim> because "let rec test2 = (non lambda term)" is not allowed
<gim> same problem with test1 of course
<gim> there must be an argument
<fab_> but "let rec f a b = () and test1 = f 3" is ok
<gim> erf
<gim> as
<gim> sorry
<fab_> but after the definition of test1, f isnt polymorphic
<fab_> so test2 fails
<gim> yes
<fab_> but if the definitions aren't connected by and, f stays polymorphic
<gim> the polymorphic abstraction is prbably done after the full declaration
<fab_> what do you mean by "polymorphic abstraction"?
<gim> when f : 'a -> 'a is considered as forall 'a, 'a -> 'a
<gim> don't know if "polymorphic abstraction" is meaningful
<gim> :)
<fab_> i dont think i get it :)
<fab_> i thought the only difference of definitions with "and" is to allow mutual recursion
<gim> in the 2nd case 'a used in term2 is the same 'a as in term2
<gim> in the first case f is known to be forall 'a, 'a -> 'a
<gim> and different type names can be used by the type inference
<fab_> ok, i think i got that... but do you know why it was implemented this way?
<gim> because you cant do the "abstraction" until you know exactly the type of f that can be linked to the test1 or test2 one
<gim> probably
<gim> (not in that case though)
<fab_> maybe it was to simple ;)
<fab_> thank you
<gim> btw
<gim> # let rec f a b = () and test1 = f 3 in f;;
<gim> This kind of expression is not allowed as right-hand side of `let rec'
<gim> works for you ?
<gim> (that justifies my first remark)
<Demitar> fab_, that *only* works in the toplevel.
<fab_> well, i got the type error while writing a program, and checked it in toplevel only
<Demitar> Or if you specifically tell it that you want a and b to be polymorphic.
<Demitar> I meant the first case "let f a b = () let test1 = f 3 let test2 = f 2.0"
<Demitar> By the way. Don't listen too much to me right now. I'm a bit tired. ;-)
<fab_> me too
kosmikus is now known as kosmikus|away
noss has quit ["Leaving"]
Axioplase has quit [Read error: 60 (Operation timed out)]
wolfman8k has joined #ocaml
Axioplase has joined #ocaml
vincenz has left #ocaml []
Submarine has joined #ocaml
mkorman has joined #ocaml
<mkorman> does anyone know if there's a way to inspect an object within ocamldebug?
crnfl has joined #ocaml
<crnfl> is it okay to ask language questions?
<Submarine> yeah
<crnfl> :)
<crnfl> I have a type error, but I think it's just my lack of knowledge about syntax
<crnfl> I've defined two types
<crnfl> one
<crnfl> type 'a condition = .. | Eq of 'a ..
<crnfl> and
<crnfl> type stree = .. | Constraint of int * (stree condition) ..
<crnfl> | IfElse of (stree condition) * stree * stree * stree
<crnfl> (just to cut to the meat of it)
<crnfl> anyway, I have something which is
<crnfl> IfElse(
<crnfl> Constraint(1,Eq(Constant(1,0))),
<crnfl> Get(1,reg),
<crnfl> set_flag f_z,
<crnfl> clear_flag f_z
<crnfl> )
<crnfl> and I get a type error when I try to compile that with ocamlc
<crnfl> This expression has type SemTypes.stree but is here used with type SemTypes.stree SemTypes.condition
<crnfl> maybe I've specced the type wrong? I got a bit confused with how it's meant to work
<Submarine> try parentheses outside of Eq(Constant(1,0))
<crnfl> Constraint(1,(Eq(Constant(1,0)))),
<crnfl> like that?
<crnfl> because that generates the same error
<crnfl> also, I can't figure out quite how to load random files into the interpreter, but I might just have missed something
<Riastradh> #load "file";;
<crnfl> ahhh, cool, thank you :)
<crnfl> that'll come in handy for debugging :)
<crnfl> does anybody know any good examples where they have a type that contains a specialisation of another generic type?
<crnfl> because it's confusing me a bit the syntax and why it doesn't like it :|
wolfman8k is now known as wolf|away
* Submarine does not see what's wrong.
<crnfl> okay, this is weirding me out
<Submarine> What doe the compiler say?
<crnfl> it says
<crnfl> This expression has type SemTypes.stree but is here used with type SemTypes.stree SemTypes.condition
<crnfl> when I use the interactive front end
<crnfl> I can do
<crnfl> # Constant(1,0);;
<crnfl> - : SemTypes.stree = Constant (1, 0)
<crnfl> # Eq 1;;
<crnfl> - : int SemTypes.condition = Eq 1
<crnfl> but when I tree and do something with the Constant it doesn't want to know
<crnfl> # Eq (Constant(1,0));;
<crnfl> - : SemTypes.stree SemTypes.condition = Eq (Constant (1, 0))
<crnfl> okay, that works...
<crnfl> do I need a ;;
<crnfl> ?
<Submarine> which expression?
<Submarine> consider dccing me code
<crnfl> yeah, I think I might
<crnfl> OH
<crnfl> D'OH
<crnfl> I see it now :)
<crnfl> it was telling me exactly what I needed to know
<crnfl> I specified it as being a constraint, but I was giving the wrong type
<crnfl> :$
CosmicRay has joined #ocaml
<crnfl> basically, I had an stree which represents a constraint, which I thought I needed to use there, but it actually wanted a constraint instead
<crnfl> so I was overly wrapping it
<crnfl> it just confused me :)
dobrek has joined #ocaml
<dobrek> hi is there some readline binding for ocaml, readline probably not because I would have found it probably. But is there smth with the similar functionality ?
<Submarine> ledit
<dobrek> thanks I will have a look
<dobrek> cool ocaml hump asked for ledit said that it is : 1 line editor written in OCaml. It provides line editing for the Caml toplevels, as well as other interactive Unix commands.
<dobrek> Daniel de Rauglaudre
<dobrek> and send me to the french webpage which contains no link to ledit :((
<Submarine> ddr has changed affectations at INRIA.
<truls> Dance Dance Revolution?
<Submarine> Daniel de Rauglaudre
<Submarine> ftp://ftp.inria.fr/INRIA/cristal/Daniel.de_Rauglaudre/Tools/
Submarine has left #ocaml []
cedricshock has joined #ocaml
bk_ has joined #ocaml
crnfl has quit ["Leaving"]
urz has joined #ocaml
<urz> hi
<Lemmih> Yo
<urz> is it impossible to create a record object whose type is defined in anohter module?
<urz> without importing the module i mean
<Smerdyakov> No.
<Smerdyakov> You have to qualify the field names with the module name.
<urz> oh
<urz> thanks
<Smerdyakov> {Module.f1 = 1}
urz has quit [Remote closed the connection]
Smerdyakov has quit ["eat"]
karryall has joined #ocaml
Submarine has joined #ocaml
<Submarine> re
wolf|away is now known as wolfman8k
gl has left #ocaml []
gl has joined #ocaml
CosmicRay has quit ["Client exiting"]
<Axioplase> ++
Axioplase has quit [Read error: 54 (Connection reset by peer)]
monotonom has joined #ocaml
mkorman has quit [Read error: 110 (Connection timed out)]
wolfman8k has quit [Remote closed the connection]
wolfman8k has joined #ocaml
Smerdyakov has joined #ocaml
monotonom has quit ["Don't talk to those who talk to themselves."]
dobrek has quit ["leaving"]
Smerdy has joined #ocaml
cjohnson has joined #ocaml
Smerdyakov has quit [Nick collision from services.]
Smerdy is now known as Smerdyakov
wolfman8k is now known as wolf|z
Submarine has left #ocaml []
mfurr has joined #ocaml