__DL__ changed the topic of #ocaml to: OCaml 3.09.0 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
Mooninite1 has joined #ocaml
Mooninite1 is now known as Ringo48
pundai has joined #ocaml
<pundai> ok, type foo = Nothing | Int of int;; type bar = Nothing | String of string;; let a = Nothing <-- what are the rules for the type inferencehere?
<pundai> i get val a : bar, but what decides bar over foo?
<pundai> yello
MisterC has joined #ocaml
<malc_> pundai: shadow
<pundai> doh
<pundai> malc_, i wonder if that was the best idea..
<malc_> pundai: ofcourse, you can not create values of foo initialized with Nothing, so there is no conflict
Skal has quit [Read error: 110 (Connection timed out)]
<pundai> malc_, because of type bar?
<malc_> pundai: because anything Nothing will be of type bar, yes
<malc_> that was a funny sentence
<pundai> malc_, then if you have two modules that define these types, the type you end up using would depend on the import order correct?
<malc_> pundai: yes, but you will have the ability to disamiguate via Module_name.type_name scheme
<pundai> malc_, ok
* pundai continues ocaml investigations
<malc_> pundai: actually.. i don't know what you mean by import
<pundai> "open"
Smerdyakov has joined #ocaml
<malc_> pundai: then everything above stands.. i would suggest using applicable terminology
<pundai> whats applicable terminology here then...
<pundai> open?
<malc_> yep
<pundai> weird
<pundai> you "open" a module in ocaml
<pundai> ?
<malc_> yep
<malc_> you can also include it
<malc_> different matter altogether, though on the surface feels the same
MisterC has quit [Remote closed the connection]
<pundai> so whats the difference malc_
<pundai> also, is the compilation model pretty much the same as C++?
<malc_> open just puts the visible stuff from the module into the current scope, include, well, includes stuff
<malc_> what do you mean by that?
<pundai> malc_, the notion of a translation unit
<pundai> which are compiled separately and then linked
<Smerdyakov> pundai, don't you think it might be helpful to read the manual?
<pundai> Smerdyakov, thanks for your concern, but i am doing it. the conversation just led here
<pundai> of course, you weren't here for it so its not your fault :)
<malc_> more or less (if we imagine that all C++ compilers/linkers support export)
<pundai> interesting
<malc_> someone should probably change the topic w.r.t. to latest developments
<malc_> -to
Ringo48 has left #ocaml []
<pundai> i'm sean connery
<pundai> does that qualify
<Smerdyakov> malc_, why don't you change it?
<malc_> Smerdyakov: yeah why?
<Smerdyakov> malc_, you're the one who complained!
<malc_> wtf i did that i wonder.. sorry if that caused you any inconvenience
<pundai> i still think its important when sean connery enters the channel
<malc_> sorry but your rubbish accent makes almost everything you say unintelligible
<pundai> whatch that you shay?
<malc_> what you just called me?
<malc_> oh heck.. bed time
malc_ has quit ["leaving"]
fab_ has joined #ocaml
fab__ has quit [Read error: 110 (Connection timed out)]
<pundai> where is the pi symbol defined?
<Smerdyakov> I don't know if it is.
<pundai> oh ok
<pundai> the manual uses pi, but its nonexistent
<pundai> \o/
pango_ has joined #ocaml
pango has quit [Read error: 110 (Connection timed out)]
Smerdyakov has quit ["Leaving"]
Revision17 has quit [Remote closed the connection]
<lispy> how is the Lazy module (or is a functor) implemented?
<lispy> coming from a Haskell background i don't really understand how a Lazy module was created in a strict language
<flux__> it wasn't, it is partially a compiler feature
<flux__> it involves a non-module mechanism 'lazy'
<flux__> but I don't view it as much different from fun () ->
<flux__> and writing a Lazy-module in terms of that shouldn't be difficult, after all, we have mutability
<lispy> what is fun () -> ?
<lispy> () is unit right?
<flux__> it's analoguous to \() -> ..
<flux__> s/uo/o/
<flux__> so it would create a function that is not yet evaluated, but is evaluated when it is applied with with argument ()
<flux__> (so yes)
booyaa has joined #ocaml
booyaa has left #ocaml []
Skal has joined #ocaml
MisterC has joined #ocaml
Skal has quit [Read error: 110 (Connection timed out)]
ski has quit ["Leaving"]
<pundai> ok so whats the deal with type expr = Plus of expr * expr;; <-- what does this "of" mean
<pango_> it's part of sum types syntax
<pango_> bbl
pango_ has quit [Remote closed the connection]
<pundai> sum types syntax? is that bad spelling or what
descender has quit [Read error: 104 (Connection reset by peer)]
<flux__> no.
<pundai> flux__, can you explain please, whats "sum types"
<flux__> subtitle 'Variants'
pango has joined #ocaml
<pundai> duh
<pundai> thanks
descender has joined #ocaml
pundai has quit [Remote closed the connection]
knobo has quit [Read error: 113 (No route to host)]
Herrchen has joined #ocaml
knobo has joined #ocaml
m3ga has joined #ocaml
vodka-goo has joined #ocaml
kryptt has joined #ocaml
Schmurtz has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
Snark has joined #ocaml
knobo_ has joined #ocaml
knobo has quit [Read error: 110 (Connection timed out)]
gim has joined #ocaml
malc_ has joined #ocaml
Revision17 has joined #ocaml
_JusSx_ has joined #ocaml
Smerdyakov has joined #ocaml
Smerdyakov has quit ["Leaving"]
fab_ has quit [Read error: 113 (No route to host)]
Snark has quit ["Leaving"]
Smerdyakov has joined #ocaml
vodka-goo has quit ["Leaving"]
Smerdy has joined #ocaml
Smerdy has quit [Read error: 104 (Connection reset by peer)]
_fab has joined #ocaml
batdog|gone is now known as batdog
_fab has quit []
_fab has joined #ocaml
__DL__ has joined #ocaml
vodka-goo has joined #ocaml
Smerdyakov has quit ["Leaving"]
Smerdyakov has joined #ocaml
_fab has quit []
clog_ has joined #ocaml
Snark has quit ["Leaving"]
clog_ has joined #ocaml
_JusSx_ has quit ["leaving"]
clog has joined #ocaml
Smerdyakov has quit ["Leaving"]
ski has quit ["NMI"]
MisterC has quit [Remote closed the connection]
Nutssh has joined #ocaml
Nutssh has quit ["Client exiting"]
ski has joined #ocaml
tcrimi_ has quit []
ski_ has joined #ocaml
Smerdyakov has joined #ocaml
Smerdy has joined #ocaml
Smerdy has quit [Read error: 104 (Connection reset by peer)]
ski has quit [Nick collision from services.]
ski_ is now known as ski