nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest38 has joined #ocaml
obadz- has joined #ocaml
obadz has quit [Ping timeout: 246 seconds]
keen__________16 has quit [Read error: Connection reset by peer]
browncodes has quit [Ping timeout: 260 seconds]
keen__________16 has joined #ocaml
bendiken has quit []
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tumdum has quit [Ping timeout: 244 seconds]
tumdum has joined #ocaml
johnf_ has joined #ocaml
thomasga has quit [Quit: Leaving.]
MrScout has joined #ocaml
Guest38 has joined #ocaml
BitPuffin|osx has joined #ocaml
igoroliveira has quit [Quit: Connection closed for inactivity]
<bernardofpc>
I have a strange behaviour on my toplevel
tennix has joined #ocaml
<bernardofpc>
I managed to #install_printer a function of type (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a binary_tree -> unit = <fun>
<bernardofpc>
now, I am trying to do the same for another polymorphic type, and it fails me
<bernardofpc>
More explicitly, I'm trying to #install f;; for f satisfying
<bernardofpc>
val f : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a Sequence.t -> unit = <fun>
<bernardofpc>
These two look like exactly the same "type", but somehow the first one got accepted (and definitely works), and the second fails with " f has a wrong type for a printing function. "
<Drup>
Sequence.t is an alias, maybe it doesn't like it
<bernardofpc>
Drup> (I advise 10 3 2 6) -> in this order ? And is it 10 or 11 ? (if you said 10, 03, 02, 06, it would probably be unambiguous, but anywya...)
<Drup>
probably in this order, and I indeed meant 10, 03, 02, 06
<bernardofpc>
;-)
<bernardofpc>
hum, maybe it's the variance annotation ?
<bernardofpc>
type +'a t = ('a -> unit) -> unit (from Sequence.mli)
BitPuffin|osx has quit [Ping timeout: 244 seconds]
<Drup>
Report a bug.
<bernardofpc>
(btw, it's completely magical that utop manages to use a (F -> 'a -> unit) -> F -> 'a thing -> unit as a pretty-printer
<Drup>
not really
<Drup>
(it's not utop, it's the top level)
sgnb has quit [Ping timeout: 244 seconds]
<bernardofpc>
Drup: should this be a bug to Sequence or to the toplevel ?
johnf_ has quit [Read error: Connection reset by peer]
<Drup>
toplevel
systmkor has quit [Quit: Leaving]
browncodes has joined #ocaml
sgnb has joined #ocaml
darkf has joined #ocaml
BhavyaM has joined #ocaml
jao has quit [Ping timeout: 250 seconds]
johnf_ has joined #ocaml
browncodes has quit [Remote host closed the connection]
mac10688 has quit [Ping timeout: 250 seconds]
browncodes has joined #ocaml
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
johnf_ has quit [Read error: Connection reset by peer]
BhavyaM has quit [Quit: Quit the channel]
psy_ has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 264 seconds]
mort___ has joined #ocaml
mort___ has quit [Quit: Leaving.]
browncodes has quit [Remote host closed the connection]
browncodes has joined #ocaml
browncodes has quit [Ping timeout: 252 seconds]
kalzz has quit [Ping timeout: 256 seconds]
rgrinberg has joined #ocaml
kalzz has joined #ocaml
MrScout has quit [Ping timeout: 244 seconds]
psy_ has quit [Ping timeout: 260 seconds]
rand__ has joined #ocaml
damason has quit [Ping timeout: 240 seconds]
damason_ has quit [Ping timeout: 268 seconds]
Haudegen has quit [Ping timeout: 240 seconds]
rgrinberg has quit [Ping timeout: 264 seconds]
ygrek has joined #ocaml
Haudegen has joined #ocaml
browncodes has joined #ocaml
johnf_ has joined #ocaml
ygrek_ has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
AlexRussia has quit [Quit: WeeChat 1.3-dev]
tnguyen has quit [Read error: Connection reset by peer]
NingaLeaf has quit [Quit: Leaving.]
tnguyen has joined #ocaml
sh0t has joined #ocaml
freehck has joined #ocaml
<freehck>
good UGT morning, people! :)
moei has quit [Read error: Connection reset by peer]
moei has joined #ocaml
xaimus has quit [Ping timeout: 250 seconds]
toomuchtvrotsurb has joined #ocaml
sh0t has quit [Ping timeout: 244 seconds]
xaimus has joined #ocaml
apache2_ has quit [Remote host closed the connection]
apache2 has joined #ocaml
apache2 has quit [Remote host closed the connection]
apache2 has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
kushal has joined #ocaml
johnf_ has quit [Read error: Connection reset by peer]
_whitelogger has joined #ocaml
xaimus has quit [Ping timeout: 244 seconds]
xaimus has joined #ocaml
Kakadu has joined #ocaml
thomasga has joined #ocaml
obadz- has quit [Ping timeout: 264 seconds]
obadz has joined #ocaml
whirm has joined #ocaml
Haudegen has quit [Ping timeout: 240 seconds]
browncodes has quit [Read error: Connection reset by peer]
browncodes has joined #ocaml
Haudegen has joined #ocaml
ggole has joined #ocaml
thomasga has quit [Quit: Leaving.]
ygrek_ has quit [Ping timeout: 256 seconds]
obadz has quit [Ping timeout: 265 seconds]
thomasga has joined #ocaml
zpe has joined #ocaml
cdidd has quit [Ping timeout: 255 seconds]
obadz has joined #ocaml
snyp has joined #ocaml
cdidd has joined #ocaml
NingaLeaf has joined #ocaml
cdidd has quit [Ping timeout: 246 seconds]
cdidd has joined #ocaml
rand__ has quit [Quit: leaving]
mac10688 has joined #ocaml
sepp2k has joined #ocaml
_andre has joined #ocaml
ollehar has joined #ocaml
mac10688 has quit [Ping timeout: 272 seconds]
cdidd has quit [Ping timeout: 255 seconds]
tennix has quit [Ping timeout: 264 seconds]
igoroliveira has joined #ocaml
BitPuffin has joined #ocaml
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
cdidd has joined #ocaml
browncodes has quit [Remote host closed the connection]
browncodes has joined #ocaml
browncodes has quit [Ping timeout: 264 seconds]
cdidd has quit [Ping timeout: 246 seconds]
NingaLeaf has quit [Quit: Leaving.]
ollehar has quit [Remote host closed the connection]
ollehar has joined #ocaml
mfp_ has quit [Read error: Connection reset by peer]
cdidd has joined #ocaml
tennix has joined #ocaml
cdidd has quit [Ping timeout: 256 seconds]
mfp_ has joined #ocaml
tennix has quit [Ping timeout: 255 seconds]
alpen has quit [Ping timeout: 244 seconds]
cdidd has joined #ocaml
alpen has joined #ocaml
nullcatxxx_ has joined #ocaml
tennix has joined #ocaml
tennix has quit [Ping timeout: 244 seconds]
ollehar has quit [Remote host closed the connection]
nullcatx_ has joined #ocaml
nullcatxxx_ has quit [Read error: Connection reset by peer]
NingaLeaf has joined #ocaml
tennix has joined #ocaml
huza has joined #ocaml
zpe_ has joined #ocaml
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
jeffmo has quit [Quit: jeffmo]
nullcatxxx_ has joined #ocaml
nullcatx_ has quit [Read error: Connection reset by peer]
huza has quit [Quit: WeeChat 0.3.8]
MercurialAlchemi has joined #ocaml
<haesbaert>
say I have library X, X calls Y.foo ()
<haesbaert>
is there a way to build library X, without an implementation of Y ? and when program P link against X, he needs to provide Y
thomasga has quit [Quit: Leaving.]
obadz has quit [Ping timeout: 268 seconds]
obadz has joined #ocaml
Guest38 has joined #ocaml
<freehck>
haesbaert: compile it to object file and then link program P to it.
jeffmo has joined #ocaml
<freehck>
if i got it correctly you should run 'ocamlc x.ml' and you'll get x.cmo
<haesbaert>
but I need to give X an object file first, right ?
<freehck>
correct me if I'm mistaken
<freehck>
no
<haesbaert>
it just needs the cmi ?
<freehck>
you need object file only while linking to the complete program.
<freehck>
i dunno about .cmi, sorry.
<freehck>
i think you should not
<freehck>
provede cmi
<freehck>
*i think you should not provide y.cmi for x.ml
<haesbaert>
hmm I need to provide something, otherwise the library doesn't know the types and so on
<freehck>
hm... yes, it sounds sane.
<freehck>
okay, i'm newbie here. why do I think I can advice people? )
<haesbaert>
ah nvm, I'll figure it out :P
<ggole>
ocamlc -c y.mli x.ml
<ggole>
Should do it
thomasga has joined #ocaml
<haesbaert>
I'll try, something came up, will have to delay that
<freehck>
ggole: but if type for a function from Y could be found specifically with only X.ml, could we omit y.mli?
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ggole>
Separate compilation of this sort is one of the reasons for having .mlis at all
<ggole>
freehck: not really sure what you mean
<ggole>
haesbaert has indicated that Y comes from another file
<haesbaert>
correct
nullcatx_ has joined #ocaml
nullcatxxx_ has quit [Read error: Connection reset by peer]
<freehck>
ggole: i mean this:
<freehck>
let (something:string) = fun_from_y "str"
<freehck>
it's obvious that fun_from_y has type string -> string
<freehck>
and it seems we don't need y.mli to understand it.
NingaLeaf has quit [Quit: Leaving.]
<ggole>
You need y.mli to understand what the type of fun_from_y *actually* is, so that this application can be rejected if it is wrong
NingaLeaf has joined #ocaml
<freehck>
ggole: I've just tested it with ocamlc. It seems that we specifically need .mli files. In other case ocamlc blames on "Unbound module Y".
<freehck>
I'd described that function in Y.mli and have successfully compiled the code.
<ggole>
Yep: you need either an interface or an implementation to compile against.
johnf__ has joined #ocaml
nullcatxxx_ has joined #ocaml
nullcatx_ has quit [Read error: Connection reset by peer]
grouzen has quit [Ping timeout: 246 seconds]
zpe_ has quit [Remote host closed the connection]
freehck has quit [Ping timeout: 246 seconds]
ysangkok has left #ocaml [#ocaml]
johnf__ has quit [Read error: Connection reset by peer]
tennix has quit [Ping timeout: 244 seconds]
NingaLeaf has quit [Quit: Leaving.]
mort___ has joined #ocaml
NingaLeaf has joined #ocaml
Guest38 has joined #ocaml
nullcatx_ has joined #ocaml
nullcatxxx_ has quit [Read error: Connection reset by peer]