Kakadu has quit [Remote host closed the connection]
oxcsh has joined #ocaml
oxcsh has quit [Ping timeout: 240 seconds]
sh0t has quit [Ping timeout: 240 seconds]
dhil has quit [Ping timeout: 246 seconds]
cat5e has quit [Ping timeout: 276 seconds]
cat5e has joined #ocaml
tennix has quit [Ping timeout: 244 seconds]
tennix has joined #ocaml
ygrek has joined #ocaml
keep_learning has quit [Quit: This computer has gone to sleep]
Anarchos_ has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
arjunguha has joined #ocaml
arjunguha has quit [Client Quit]
nuuit2 has quit [Ping timeout: 248 seconds]
struk|desk|away is now known as struk|desk
hxegon has quit [Ping timeout: 244 seconds]
FreeBirdLjj has joined #ocaml
Reshi has joined #ocaml
silver_ has joined #ocaml
silver_ has quit [Max SendQ exceeded]
silver_ has joined #ocaml
silver has quit [Ping timeout: 246 seconds]
silver_ has quit [Client Quit]
struk|desk is now known as struk|desk|away
ygrek has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 252 seconds]
yunxing has quit [Remote host closed the connection]
Vintila has joined #ocaml
struk|desk|away is now known as struk|desk
<Vintila>
Any reason why #load "obj.cmo" works in top but not utop?
jayphelps has joined #ocaml
tennix has quit [Ping timeout: 252 seconds]
tennix has joined #ocaml
<jayphelps>
noob question to FP langs: I really like the self-documenting nature of explicitly providing parameter type annotations and while langs like ocaml let do you so, I rarely see it in the wild. I presume FP people don't feel that same self-documenting advantage in practice or am I missing something?
<pierpa`>
sometimes the code has a more general type then what you are thinking of. This is good. Constraining it to what is your current need is bad.
oxcsh has joined #ocaml
<pierpa`>
and also, sometimes type expressions can get very complicated and writing them down is a hassle
<pierpa`>
better to let the compiler figure them out
pierpa` is now known as pierpa
<jayphelps>
pierpa: I def see that, just obv see a different pros vs cons result. like most things I assume I'll just get used to it and eventually even prefer it hah
oxcsh has quit [Ping timeout: 240 seconds]
<pierpa>
Just try writing them by hand. You'll tire soon :)
<jayphelps>
pierpa: I have been, actually. I'm used to it from my day-langs.
<Drup>
jayphelps: people do it in ocaml too, in .mli files
<jayphelps>
just trying to adopt community preferences now that I'm getting the swing of ocaml
<pierpa>
I see. But types in Ocaml can get much more complicated than one typically gets in other languages
<jayphelps>
pierpa: I prolly haven't written any sufficiently complex ocaml to see that yet.
<jayphelps>
or we vary on our definitions of complex :)
<pierpa>
:)
<jayphelps>
Drup: :thumbsup
<jayphelps>
'ppreciate the chime-ins from all. I don't want to fight the community preferences, just understand how they landed on them so I can accept it
<pierpa>
nobody will frown on code with type annotations, I think :)
<pierpa>
just nobody does it because it's tedious
<jayphelps>
that's good to hear.
<pierpa>
and it adds another possible source of mistakes :)
yegods_ has quit [Remote host closed the connection]
yegods has joined #ocaml
<Enjolras>
jayphelps: you can rely on tool. Like Merlin will give you the type of any function at any point
FreeBirdLjj has quit [Remote host closed the connection]
<Enjolras>
and you can extract doc with ocamldoc
<Enjolras>
i don't see the point of writting the type manually unless you want to constrain the type
<jayphelps>
Enjolras: merlins is tits. Thanks!
oxcsh has joined #ocaml
struktured has joined #ocaml
Ruff has joined #ocaml
struk|desk is now known as struk|desk|away
Ruff has quit [Quit: Leaving]
yegods has quit [Remote host closed the connection]
aantron has quit [Remote host closed the connection]
lostman_ has joined #ocaml
yegods has joined #ocaml
myst|fon has quit [Quit: Connection closed for inactivity]
yunxing has joined #ocaml
keep_learning has joined #ocaml
keep_learning has quit [Client Quit]
yegods has quit [Remote host closed the connection]
yegods has joined #ocaml
pierpa has quit [Ping timeout: 244 seconds]
yegods has quit [Ping timeout: 248 seconds]
mysiticity has joined #ocaml
Reshi has quit [Ping timeout: 264 seconds]
pierpa has joined #ocaml
jayphelps has quit [Quit: Connection closed for inactivity]
pierpa has quit [Ping timeout: 244 seconds]
pierpa has joined #ocaml
GeorgeHahn has quit [Read error: Connection reset by peer]
pierpa has quit [Ping timeout: 276 seconds]
pierpa has joined #ocaml
ggole has joined #ocaml
therac25 has joined #ocaml
hxegon has joined #ocaml
pierpa has quit [Ping timeout: 246 seconds]
slash^ has joined #ocaml
huza has joined #ocaml
pierpa has joined #ocaml
ggole_ has joined #ocaml
ggole__ has joined #ocaml
seangrove has joined #ocaml
ggole has quit [Ping timeout: 244 seconds]
pierpa has quit [Ping timeout: 260 seconds]
ggole_ has quit [Ping timeout: 250 seconds]
pierpa has joined #ocaml
huza has quit [Quit: WeeChat 1.0.1]
keep_learning has joined #ocaml
pierpa has quit [Ping timeout: 260 seconds]
kolko has quit [Ping timeout: 260 seconds]
pierpa has joined #ocaml
kolko has joined #ocaml
ggole_ has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
ggole__ has quit [Ping timeout: 276 seconds]
hxegon has quit [Quit: BRB]
pierpa has quit [Read error: Connection reset by peer]
pierpa has joined #ocaml
AlexRussia has quit [Ping timeout: 276 seconds]
ggole__ has joined #ocaml
mysiticity has quit [Ping timeout: 276 seconds]
ggole_ has quit [Ping timeout: 264 seconds]
yegods has joined #ocaml
<flux>
funny how adding a Unix.select [] [] [] 0.2 into my lablgtk app makes widget resizing and other stuff work
<flux>
whereas 0.1 makes it not work
<flux>
or removing the select altogether will make it not work
yegods has quit [Ping timeout: 260 seconds]
<flux>
seems like it forgets events when there is high cpu load
<flux>
with Thread.delay 0.107 it mostly works but not at times. I'll put in the 0.15 value, that's the rock solid option! [for my computer]
<ggole__>
Sounds super reliable and not sketchy at all!
oxcsh has quit [Remote host closed the connection]
<flux>
hey, even if there issues, I could simply just inrease the value!
<flux>
what could be easier than that?!
<flux>
maybe it's the Cairo bindings that are to blame
<flux>
I've had this same issue with another program as well (using Cairo)
<flux>
for example: right-clicking to open a popup menu does open the frame of the popup menu, but not the contents
<flux>
and then I can click elsewhere and eventually the menu closes ok, or I can click within the menu and eventually it chooses the option
* ggole__
is blissfully ignorant of the pleasures of GUI programming
<flux>
you should try it's, fuuunnnn...
malc_ has joined #ocaml
lostman_ has quit [Quit: Connection closed for inactivity]
pierpa has quit [Ping timeout: 244 seconds]
pierpa has joined #ocaml
oxcsh has joined #ocaml
myst|fon has joined #ocaml
oxcsh has quit [Ping timeout: 240 seconds]
Simn has joined #ocaml
ggole_ has joined #ocaml
kolko has quit [Read error: Connection reset by peer]
ggole__ has quit [Ping timeout: 276 seconds]
kolko has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
Vintila has quit [Ping timeout: 240 seconds]
pierpa has quit [Ping timeout: 260 seconds]
<mrvn>
flux: Maybe you should help me with Qt5 bindings. :)
yunxing has quit [Remote host closed the connection]
yunxing has joined #ocaml
yunxing has quit [Ping timeout: 240 seconds]
ygrek has joined #ocaml
freehck has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 250 seconds]
<Leonidas>
great, one would think that string_of_sexp would convert a Type.t into a string/bytes but no, it fails with an obscure error :-/
<mrvn>
which would be?
ggole__ has joined #ocaml
<companion_cube>
what's a Type.t?
<mrvn>
companion_cube: presumably the value representing the sexp of a type that the ppx addon builds
ggole_ has quit [Ping timeout: 276 seconds]
<Leonidas>
companion_cube: yes, exactly as mrvn says.
<flux>
valgrind tells you where the allocations happen
<mrvn>
a lot of it is ==19562== by 0x6F6FFB0: g_type_register_fundamental (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4600.2)
<flux>
backtrace of said locations?
thomasga has joined #ocaml
<mrvn>
call_init.part.0 (dl-init.c:78)
<mrvn>
seems to be the initializer function for libgobject itself.
<mrvn>
A bunch of QT functions leak too. Nothing from my side.
TheLemonMan has quit [Ping timeout: 244 seconds]
TheLemonMan has joined #ocaml
tane has quit [Quit: Verlassend]
rossberg has quit [Ping timeout: 264 seconds]
aantron has joined #ocaml
cross has quit [Quit: leaving]
cross has joined #ocaml
rossberg has joined #ocaml
aantron has quit [Remote host closed the connection]
oxcsh has joined #ocaml
Anarchos_ has joined #ocaml
oxcsh has quit [Ping timeout: 240 seconds]
xavierm02 has joined #ocaml
dhil has joined #ocaml
lobo has quit [Quit: leaving]
<xavierm02>
Hi. I was wondering if there are good reasons to use "type t = A of int * int" over "type t = B of (int * int)". Thanks in advance for your answers.
<mrvn>
no extra indirection
AlexRussia has joined #ocaml
<mrvn>
companion_cube: it sees that it is not.
<mrvn>
ups, ewin
lobo has joined #ocaml
ggole__ has joined #ocaml
aantron has joined #ocaml
ggole_ has quit [Ping timeout: 252 seconds]
thomasga has quit [Quit: Leaving.]
ggole_ has joined #ocaml
ggole__ has quit [Ping timeout: 244 seconds]
huza has quit [Quit: WeeChat 1.0.1]
struk|desk|away is now known as struk|desk
ggole__ has joined #ocaml
thomasga has joined #ocaml
d0nn1e has quit [Ping timeout: 240 seconds]
ggole_ has quit [Ping timeout: 260 seconds]
<infinity0>
how do i express the equivalent of java's <?> in ocaml?
d0nn1e has joined #ocaml
<infinity0>
e.g. i want to define "type ('a, 'b) t = X of ('a, 'b) x | Y of ('a, 'b, 'c) y1 * 'c y2"
<infinity0>
but it's giving me an unbound type parameter 'c
<Anarchos_>
infinity0 where does 'c come from ?
<mrvn>
infinity0: yes it does.
<mrvn>
infinity0: is there a question in there?
<infinity0>
i want to express the fact that consumers of ('a, 'b) t never need to care about what 'c is
<mrvn>
infinity0: but it does.
<mrvn>
type ('a, 'b +'c) t?
<mrvn>
type ('a, 'b, +'c) t?
<mrvn>
infinity0: or you need to make a GADT
<infinity0>
hm not exactly... actually i think the most elegant solution would be modular implicits here
<infinity0>
there is a parameter in the type ('c) for which, whenever we instantiate it we're always able to convert it into a 'b (so clients don't need to care what 'c is)
<mrvn>
then why not ('a, 'b, 'b) y1 * 'b y2?
thomasga has quit [Quit: Leaving.]
<ggole__>
Sounds a bit like an existential
FreeBirdLjj has joined #ocaml
oxcsh has joined #ocaml
Sorella has joined #ocaml
<infinity0>
yeah, 'c is not necessarily a subtype of 'b
tristero has quit [Quit: tristero]
larhat has joined #ocaml
Vintila has joined #ocaml
mysiticity has joined #ocaml
struk|desk is now known as struk|desk|away
<flux>
infinity0, if you want to have consumers of "X of ('a, 'b) x", you should instead just have consumers of "('a, 'b) x"
ggole__ is now known as ggole
<infinity0>
yeah it's the second part of that that's causing the unbound type param... i'll take a look at GADTs they seem promising for this
mysiticity has quit [Ping timeout: 260 seconds]
<infinity0>
ah that was pretty easy, just had to re-write it as type (_, _) t = X : ('a, 'b) x -> ('a, 'b) t | Y : ('a, 'b, 'c) y1 * 'c y2 -> ('a, 'b) t
xavierm02 has quit [Ping timeout: 252 seconds]
<mrvn>
But then you have no way to access the 'c parts
<mrvn>
infinity0: if the 'c doesn't matter then just have the consumer polymorphic in 'c. If it does matter than you need a witness for it.
<mrvn>
you need a GADT when you want different kinds of t in a list for example.
rvp has joined #ocaml
<infinity0>
mrvn: yeah it's ok 'c doesn't matter here, it only matters inside y1 and y2
<infinity0>
i can pattern-match on t and get y1 and y2, then they just play with each other and i don't need to know about how they do that
<ggole>
mrvn: you don't need witnesses for a relation between two types to be useful
thomasga has joined #ocaml
sillyotter has joined #ocaml
mysiticity has joined #ocaml
jgjl has joined #ocaml
sillyotter has quit [Client Quit]
yomimono has quit [Read error: Connection reset by peer]
yomimono has joined #ocaml
mysiticity has quit [Ping timeout: 244 seconds]
oxcsh has quit [Remote host closed the connection]
oxcsh has joined #ocaml
rvp has quit [Ping timeout: 244 seconds]
<mrvn>
I think I'm done telling ocaml about C++ types. Now if only I were done telling c++ about the ocaml types...
struk|desk|away is now known as struk|desk
larhat has quit [Quit: Leaving.]
Vintila has quit [Ping timeout: 248 seconds]
sz0 has quit [Quit: Bye.]
sz0 has joined #ocaml
<flux>
mrvn, I first thought app.native didn't open a window..
<flux>
mrvn, but it turned out to be behind a pile of papers
<mrvn>
flux: papers on your monitor?
<flux>
in front of my monitor
<flux>
so two things come to me when looking at app.ml: nice, clea, understandable example. and one instance of Obj.magic.. ;)
<mrvn>
flux: yeah. have to figure out how to downcast the proxy object type when deriving from a class.
martintrojer has quit [Ping timeout: 252 seconds]
<mrvn>
flux: or make a class that creates the c++ side internally for inheriting by the user
mettekou has quit [Ping timeout: 252 seconds]
infinity0 has quit [Ping timeout: 252 seconds]
struk|desk has quit [Ping timeout: 252 seconds]
def` has quit [Ping timeout: 252 seconds]
struk|desk2 has joined #ocaml
def` has joined #ocaml
rvp has joined #ocaml
mettekou has joined #ocaml
infinity0 has joined #ocaml
dhil has quit [Ping timeout: 268 seconds]
thomasga has quit [Ping timeout: 248 seconds]
martintrojer has joined #ocaml
yomimono has quit [Ping timeout: 246 seconds]
struk|desk2 is now known as struk|desk|away
jgjl has quit [Ping timeout: 260 seconds]
BitPuffin|osx has joined #ocaml
struk|desk|away is now known as struk|desk2
yomimono has joined #ocaml
bbc has quit [Read error: Connection reset by peer]
bbc_ has joined #ocaml
bbc_ is now known as bbc
dhil has joined #ocaml
oxcsh has quit [Remote host closed the connection]
jgjl has joined #ocaml
<Harzilein>
had cake and pizza meanwhile
<Harzilein>
now at next hurdle, still in fast-wrapper.ml above
<Harzilein>
it implements its own module StringSet = Set.Make(String), apparently a common idiom
struktured has quit [Quit: Konversation terminated!]
mettekou has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Harzilein>
ocaml-core docs say "val of_list : comparator:('a, 'cmp) Comparator.t -> 'a list -> ('a, 'cmp) t"
oxcsh has joined #ocaml
d0nn1e has quit [Ping timeout: 244 seconds]
pierpa has joined #ocaml
d0nn1e has joined #ocaml
hxegon has joined #ocaml
yegods has quit [Remote host closed the connection]
<Harzilein>
argh, wtf...
reynir1 has joined #ocaml
mettekou has joined #ocaml
Sim_n has joined #ocaml
myst|fon_ has joined #ocaml
Khady_ has joined #ocaml
alpen- has joined #ocaml
john51_ has joined #ocaml
Druup has joined #ocaml
cross_ has joined #ocaml
rvp has quit [Ping timeout: 248 seconds]
jeroud_ has joined #ocaml
trix has joined #ocaml
mietek_ has joined #ocaml
igitoor_ has joined #ocaml
myst|fon has quit [Ping timeout: 246 seconds]
cross has quit [Ping timeout: 246 seconds]
reynir has quit [Ping timeout: 246 seconds]
igitoor has quit [Ping timeout: 246 seconds]
wolfcore has quit [Ping timeout: 246 seconds]
alpen has quit [Ping timeout: 246 seconds]
mietek has quit [Ping timeout: 246 seconds]
jeroud has quit [Ping timeout: 246 seconds]
Simn has quit [Ping timeout: 246 seconds]
fraggle_ has quit [Ping timeout: 246 seconds]
Drup has quit [Ping timeout: 246 seconds]
mietek_ is now known as mietek
Khady has quit [Ping timeout: 246 seconds]
emmanueloga has quit [Ping timeout: 246 seconds]
yminsky has quit [Ping timeout: 246 seconds]
bbc has quit [Ping timeout: 246 seconds]
Nazral has quit [Ping timeout: 246 seconds]
myst|fon_ is now known as myst|fon
bbc has joined #ocaml
<companion_cube>
aww
john51 has quit [Ping timeout: 246 seconds]
jbrown has joined #ocaml
jeroud_ is now known as jeroud
fraggle_ has joined #ocaml
Nazral has joined #ocaml
struk|desk2 is now known as struk|desk|away
emmanueloga has joined #ocaml
igitoor_ has joined #ocaml
igitoor_ has quit [Changing host]
igitoor_ is now known as igitoor
deko-pyon has quit [Quit: cleanup]
yminsky has joined #ocaml
sfri has quit [Remote host closed the connection]
idegen has joined #ocaml
sz0 has quit [Quit: Bye.]
deko-pyon has joined #ocaml
<mrvn>
I have a type 'a t that is abstract (a c++ class). Can I make ocaml understand that in a function 'b t is also acceptable as long as 'b :> 'a?
yegods has joined #ocaml
bobry has joined #ocaml
<Druup>
mrvn: just make the type covariant ..
<ggole>
For abstract types the type variable is nonvariant iirc, unless you specify otherwise
sh0t has joined #ocaml
<mrvn>
yeah, ocaml drops the +
ygrek has joined #ocaml
sfri has joined #ocaml
<ggole>
What do you mean, drops?
<mrvn>
ggole: # type +'a t type +'a s = 'a t;;
<mrvn>
type +'a t
<mrvn>
type 'a s = 'a t
<Druup>
it doesn't drop anything, the fact that s is covariant is infered, since it's not abstract
<ggole>
mrvn: if you have type +'a t = ..., and the ... isn't compatible with 'a being covariant, you will get an error message
<mrvn>
anyway, covariant isn't the right thing I think.
<mrvn>
It has a 'oPushButton oClass.t' but needs a 'button oClass.t' to match the self type.
deko-pyon is now known as pyon-kan
<mrvn>
I have the change the class or the external_make or something to make derived classes accept the base type. But also oPushButton should not accept an oObject c++ object.
<mrvn>
s/the/to/
copy` has joined #ocaml
d0nn1e has quit [Ping timeout: 260 seconds]
oxcsh has quit [Ping timeout: 246 seconds]
d0nn1e has joined #ocaml
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
FreeBirdLjj has quit [Remote host closed the connection]
Algebr` has joined #ocaml
Algebr`` has joined #ocaml
dothraki__ has joined #ocaml
mettekou has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
thomasga has joined #ocaml
thomasga1 has quit [Ping timeout: 248 seconds]
thomasga1 has joined #ocaml
yomimono_ has quit [Ping timeout: 246 seconds]
Algebr` has quit [Ping timeout: 244 seconds]
jgjl_ has quit [Ping timeout: 246 seconds]
dothraki__ has quit [Ping timeout: 260 seconds]
thomasga has quit [Ping timeout: 248 seconds]
Algebr`` has quit [Ping timeout: 276 seconds]
jgjl has joined #ocaml
jgjl has quit [Read error: Connection reset by peer]
thomasga1 has quit [Read error: Connection reset by peer]
thomasga has joined #ocaml
jgjl has joined #ocaml
larhat has joined #ocaml
jgjl_ has joined #ocaml
DanielRi1hman is now known as DanielRichman
thomasga1 has joined #ocaml
abbiya has joined #ocaml
thomasga has quit [Ping timeout: 276 seconds]
Intensity has quit [Ping timeout: 240 seconds]
cross_ has quit [Ping timeout: 276 seconds]
jgjl has quit [Ping timeout: 276 seconds]
abbiya has quit [Remote host closed the connection]
cross has joined #ocaml
Intensity has joined #ocaml
yegods has quit [Remote host closed the connection]
tane has joined #ocaml
yegods has joined #ocaml
mettekou has joined #ocaml
jgjl has joined #ocaml
thomasga has joined #ocaml
thomasga1 has quit [Ping timeout: 248 seconds]
jgjl_ has quit [Ping timeout: 260 seconds]
jgjl has quit [Ping timeout: 260 seconds]
jgjl has joined #ocaml
yegods has quit [Remote host closed the connection]
cat5e has quit [Quit: Leaving]
oxcsh has joined #ocaml
yegods has joined #ocaml
tennix has quit [Ping timeout: 244 seconds]
Kakadu has joined #ocaml
oxcsh has quit [Ping timeout: 244 seconds]
seangrove has quit [Remote host closed the connection]
seangrove has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
seangrove has quit [Remote host closed the connection]
seangrov` has joined #ocaml
seangrov` has quit [Ping timeout: 244 seconds]
silver has quit [Quit: rakede]
larhat has quit [Quit: Leaving.]
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
silver has joined #ocaml
Soni has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
data_hope has joined #ocaml
Soni is now known as cat5e
<seliopou>
so it looks like there is no way to reliably figure out if a Lwt_stream.t is closed
<seliopou>
No guarantee that you call on_terminate before the stream has been closed
tennix has joined #ocaml
therac25 has joined #ocaml
jgjl has quit [Ping timeout: 240 seconds]
oxcsh has joined #ocaml
darkf has joined #ocaml
oxcsh_ has joined #ocaml
oxcsh has quit [Ping timeout: 252 seconds]
data_hope has quit [Ping timeout: 260 seconds]
seangrove has joined #ocaml
struk|desk|away is now known as struk|desk2
data_hope has joined #ocaml
Mirry has joined #ocaml
Mirry has left #ocaml [#ocaml]
AlexRussia has quit [Ping timeout: 240 seconds]
thomasga has quit [Quit: Leaving.]
<mrvn>
How do I write " ... : MODULE_NAME with type 'a t = unit -> (#foo as 'a) t" correctly?
<aantron>
you are trying to say that 'a has a constraint?
<mrvn>
aantron: no, I specify the type of a first class module, how the internal type relates to the outside world.
<mrvn>
let module E = (val (module struct type t = string -> oPushButton OClass.t end) : External with type t = string -> oPushButton Class.t) in ... but now with a polymorphic type.
<mrvn>
Without polymorphic I get: In type string -> (#oPushButton as 'a) OClass.t the variable 'a is unbound
<aantron>
your type needs to be parametric in order for you to be able to write that type constraint on the signature
<aantron>
but i think you arleady know that..
<mrvn>
yes, I made PolymorphicExternal for that with type 'a t
<mrvn>
"PolymorphicExternal with type e = string -> #oPushButton OClass.t" ==> In this `with' constraint, the new definition of e does not match its original definition in the constrained signature: Type declarations do not match: type e is not included in type 'a e
<mrvn>
and "with type 'a e = ..." Error: Syntax error: ')' expected
<mrvn>
on the '
<mrvn>
Is there somethin like "let module ['a] E = ..."?
<aantron>
can you show the actual complete example with PolymorphicExternal (the structure) and the type constraint?
<aantron>
i dont know if you can eliminate the #base and make that depend on a variable. i had huge trouble with this (but with polymorphic variants) about a year ago. i dont remember exactly what i learned, but the takeaway was it's hard (impossible)? to get the bound in a constraint to itself be a variable
apluke has joined #ocaml
<mrvn>
99.999% of the time you get problems because you can't close the class type or self escapes the class.
<mrvn>
But I realy realy realy need to close the class type in respect to the (obj : 'a t) parameter.
struk|desk2 is now known as struk|desk|away
<mrvn>
an idea why I have to declare a module type and then use it as in the module definition instead of speficying the type right there on the fly?
apluke has quit [Ping timeout: 268 seconds]
<infinity0>
is there a standard name for this operator: let (xx) f g = \ (x, y) -> (f x, g y)
<infinity0>
er, this: let (@*@) f g = fun (s0, s1) -> (f s0, g s1)
<companion_cube>
I don't think so
<mrvn>
doubtfull since it's limited in the arity.
<companion_cube>
it looks like an Arrow thing
<mrvn>
do you have @*@*@ and @*@*@*@ and so on too?
thomasga has quit [Quit: Leaving.]
<aantron>
mrvn: can you declare a constrained signature standalone (and not just express it in the ascription of your first-class module)?
<aantron>
signatures*
<mrvn>
aantron: not constraint to 'self
Algebr` has joined #ocaml
<infinity0>
well, you could chain it like "f (?) g (?) h" :p
therac25 has quit [Quit: therac25]
apluke has joined #ocaml
<infinity0>
no, but one could chain it like f @*@ g @*@ h
<mrvn>
infinity0: that wouldn't work for (1,2,3) and (1,2,3,4)
AlexRussia has quit [Ping timeout: 240 seconds]
<mrvn>
let ( ? ) f g h = fun (s0, s1, s2) -> (f s0, g s1, h s2) f ? g : h (1, 2, 3) :)
seangrove has quit [Ping timeout: 248 seconds]
<companion_cube>
hmmmmm weird, I can't install the 4.03 beta anymore...
<mrvn>
aantron: Interestingly enough that local module with #base works only in classes with arguments.
yomimono has quit [Ping timeout: 250 seconds]
Haudegen has joined #ocaml
<infinity0>
argh irc lag sorry :/
Mirry has joined #ocaml
Mirry has left #ocaml [#ocaml]
<infinity0>
mrvn: yeah but you could write it as (1,(2,3)) etc
<mrvn>
different type.
<infinity0>
i was trying to avoid needing to define many versions of basically the same idea
<mrvn>
infinity0: yeah. unfortunately one can't define a function for n-tuples. Only for known sizes.
yegods has joined #ocaml
yegods has quit [Remote host closed the connection]