From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 9F6C87F61E for ; Mon, 30 Oct 2017 11:08:20 +0100 (CET) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=mail@matej-kosik.net; spf=SoftFail smtp.mailfrom=mail@matej-kosik.net; spf=SoftFail smtp.helo=postmaster@matej-kosik.net Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of mail@matej-kosik.net) identity=pra; client-ip=145.239.83.105; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mail@matej-kosik.net"; x-sender="mail@matej-kosik.net"; x-conformance=sidf_compatible Received-SPF: SoftFail (mail2-smtp-roc.national.inria.fr: domain of mail@matej-kosik.net is inclined to not designate 145.239.83.105 as permitted sender) identity=mailfrom; client-ip=145.239.83.105; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mail@matej-kosik.net"; x-sender="mail@matej-kosik.net"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: SoftFail (mail2-smtp-roc.national.inria.fr: domain of postmaster@matej-kosik.net is inclined to not designate 145.239.83.105 as permitted sender) identity=helo; client-ip=145.239.83.105; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mail@matej-kosik.net"; x-sender="postmaster@matej-kosik.net"; x-conformance=sidf_compatible; x-record-type="v=spf1" IronPort-PHdr: =?us-ascii?q?9a23=3AJJtPhxcT33RuKylJ86PRhHnklGMj4u6mDksu8pMi?= =?us-ascii?q?zoh2WeGdxc2zZR7h7PlgxGXEQZ/co6odzbGJ4+a9ASQp2tWojjMrSNR0TRgLiM?= =?us-ascii?q?EbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpRMMFw/ANQtp?= =?us-ascii?q?K6GwM8aSyp3vj6Hhs6HUNg5BgT71fKh/Ng7++Q7Ys81ThYp5No4wzAHIqz1GYb?= =?us-ascii?q?IF63lvIAe2lgrx5I+T+2zm8GwEvvsg8+ZFWLn3feE7SqdZD3IgPnxjt56jjgXK?= =?us-ascii?q?UQbavihUaW4RiBcdRlGdtBw=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0CyCwA8+fZZZGlT75FbHgYMGQYMgzRkA?= =?us-ascii?q?2sng3yLE6hsByqJaUQUAQEBAQEBAQEBAQEDgQ+COCQBgmoEgS8CXw0IAQGKIwy?= =?us-ascii?q?oQoFtOosfCgWDLoJagmkphheBOoMZDDGCYQWiA4FvglOCI4EBg2eVI4c5jF+Ka?= =?us-ascii?q?jYgQ4EmgQUKgy6CF3mBT3YFizQBAQE?= X-IPAS-Result: =?us-ascii?q?A0CyCwA8+fZZZGlT75FbHgYMGQYMgzRkA2sng3yLE6hsByq?= =?us-ascii?q?JaUQUAQEBAQEBAQEBAQEDgQ+COCQBgmoEgS8CXw0IAQGKIwyoQoFtOosfCgWDL?= =?us-ascii?q?oJagmkphheBOoMZDDGCYQWiA4FvglOCI4EBg2eVI4c5jF+KajYgQ4EmgQUKgy6?= =?us-ascii?q?CF3mBT3YFizQBAQE?= X-IronPort-AV: E=Sophos;i="5.44,319,1505772000"; d="asc'?scan'208";a="298501644" Received: from 105.ip-145-239-83.eu (HELO matej-kosik.net) ([145.239.83.105]) by mail2-smtp-roc.national.inria.fr with ESMTP; 30 Oct 2017 11:08:19 +0100 Received: from [192.168.1.10] (adsl-dyn210.78-99-253.t-com.sk [78.99.253.210]) by matej-kosik.net (Postfix) with ESMTPSA id D18C81F9EA for ; Mon, 30 Oct 2017 11:08:18 +0100 (CET) To: caml users From: =?UTF-8?B?TWF0ZWogS2/FocOtaw==?= Openpgp: id=1CD41D0A52319DC7ABC1B79F50AFFA128CE48649; url=http://matej-kosik.net/doc/kosik.asc Message-ID: <6c2af6b6-2f9f-7f12-2bbf-22b1286d29d5@matej-kosik.net> Date: Mon, 30 Oct 2017 11:08:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="r5W9797QnVe8UCf6NSTuvL1OFu2geePdP" Subject: [Caml-list] What is the right way to configure Tuareg to get the same indentation as in Batteries Included? This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --r5W9797QnVe8UCf6NSTuvL1OFu2geePdP Content-Type: multipart/mixed; boundary="r2P46V3Ecjk25Qqw8axujUE9aB4dX27t5"; protected-headers="v1" From: =?UTF-8?B?TWF0ZWogS2/FocOtaw==?= To: caml users Message-ID: <6c2af6b6-2f9f-7f12-2bbf-22b1286d29d5@matej-kosik.net> Subject: What is the right way to configure Tuareg to get the same indentation as in Batteries Included? --r2P46V3Ecjk25Qqw8axujUE9aB4dX27t5 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi, Tuareg and indentation does not work for me very well. I am trying to figure out how should I configure it so that I get the same = indentation behavior as is used in Batteries Included. One (of several) problem is with the or-patterns in match-expressions. Here is the original sample: (behavior I like) (* https://github.com/ocaml-batteries-team/batteries-included/blob/e069e2= 8678a0d15d338721e1ff5e480fe0ad26c5/src/batComplex.ml#L82-L83 *) match BatEnum.peek enum with | None -> {re; im =3D multiplier} | Some (Kwd ".") | Some (Kwd "*") -> BatEnum.junk enum; parse_im ~multiplier re | Some _token -> parse_im ~multiplier re However, Tuareg, in my currenct configuration does instead this: match BatEnum.peek enum with | None -> {re; im =3D multiplier} | Some (Kwd ".") | Some (Kwd "*") -> BatEnum.junk enum; parse_im ~multiplier re | Some _token -> parse_im ~multiplier re I am using: - Ocaml 4.06.0+beta2 - Tuareg 2.0.10 (installed via OPAM) and my ~/.emacs file contains just this: (load "~/.opam/4.06.0+beta2/share/emacs/site-lisp/tuareg-site-file") (setq tuareg-indent-align-with-first-arg t) (setq tuareg-match-patterns-aligned t) which is, I guess, wrong/insufficient. I'd be grateful for any hints concerning how to fix/complete the configurat= ion in order to get indentation behavior consistent with Ocaml Batteries. Is that possible (with Tuareg or whatever other tool)? --- Matej --r2P46V3Ecjk25Qqw8axujUE9aB4dX27t5-- --r5W9797QnVe8UCf6NSTuvL1OFu2geePdP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEHNQdClIxncerwbefUK/6EozkhkkFAln2+hEACgkQUK/6Eozk hkn8Mw//cSOyZocZmRGR3paTxWmdYBqFpvXMQoy/ONcOtAUVLe4kcNb4lHZwHb8z 0qNBEl6P/bYalPWa1xh5f4PIJh+o7KeVv9TE3DkNDLiq7ry2Oi57RZcqwTUUEFB3 gL801qia4sHgmF/P7J6A9PqimXpwpTyjyrQROpNRrgKfQ97I0VVcLfxRT5dpzdMU CLGBQ5PKlefEZZZzSLWQAbLhvq7cqI8qd9pyS8LDZEYA0iyopANK9imnRRl9jaVL 1nR1NnO4j9XPEw4wFKd0Jk/ARCPK/m5jwp+oeT+DKF5bDJtOHqRvU/pfp+Vf0goX 4VtD7OAnJwbg654GG5LrPPn5HyHuYnRd0N6bRU9WoH8MOTooH2nRaqZP/doYOWBV vmkH+UIAMDsyuw07k+4kS5vC0l6x8uM4rT9ZO7wQ+iUmECqcBj2i/Rf3Zp1tixZ9 LNZcSo8z9qdeSBAo9wjeg/S3/ChkniM00MwJXqTlmj8k3nMTTCUtcWJ+IAQ28hoi UjRuTDFYGruNPgdGVjul51WuyUUqn09ivhKw7B98839Todf2t0D9YdsZR5dtZ4oY w/7vNw7tHXo6kOKeMKFV441ji8mWLYgKhbxI4fe5eAvz9RaUIltjp1su8kctoHM9 mg6llxXvTuuUpmPro1Xnv1be8hxcIj8N8+bO3t3zujvDW1pikv0= =6601 -----END PGP SIGNATURE----- --r5W9797QnVe8UCf6NSTuvL1OFu2geePdP--