From: Marek Kubica <marek@xivilization.net>
To: Gabriel Scherer <gabriel.scherer@gmail.com>
Cc: Malcolm Matalka <mmatalka@gmail.com>, Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] [ANN] slacko-0.9.0
Date: Sun, 5 Oct 2014 00:43:38 +0200 [thread overview]
Message-ID: <20141005004338.6af9622f@xivilization.net> (raw)
In-Reply-To: <CAPFanBF80Z4ohJngE_BwoLLNs6RopYXHJTWjz=nADgruOG=Q8A@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1096 bytes --]
Hello Gabriel,
On Sat, 4 Oct 2014 17:23:02 +0200
Gabriel Scherer <gabriel.scherer@gmail.com> wrote:
> `kick` now returns a [> error_cant_kick | `Success of 'a ], while
> `invite` returns [> error_cant_invite | `Success of 'a ].
Thank you for this idea, I was actually looking for a way to define
subsets of polymorphic variants, I didn't know that I can just put them
into other types and was unaware of the # syntax. Now my functions
return just the possible error variants, not all of them anymore.
I've reworked the code to get rid of the huge apierror type (which I
suppose I can throw away completely, since a user of the API will never
need it anyway), but it lead to quite huge blow-up of signatures:
<https://github.com/Leonidas-from-XIV/slacko/blob/37c3626bb9574bc99325267fb4c9f9c3c4f4730c/src/slacko.mli>
I am going to simplify these subsets a bit (since e.g. all history
methods use the same polymorphic variants and some possible error types
imply other error types) but it kinda looks very verbose now - any hints
on what can be done?
regards,
Marek
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-10-04 22:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-04 13:05 Marek Kubica
2014-10-04 13:36 ` Malcolm Matalka
2014-10-04 14:54 ` Marek Kubica
2014-10-04 15:23 ` Gabriel Scherer
2014-10-04 22:43 ` Marek Kubica [this message]
2014-10-05 2:23 ` Jacques Garrigue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141005004338.6af9622f@xivilization.net \
--to=marek@xivilization.net \
--cc=caml-list@inria.fr \
--cc=gabriel.scherer@gmail.com \
--cc=mmatalka@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox