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 CD7037EE35 for ; Fri, 22 Apr 2016 18:10:36 +0200 (CEST) IronPort-PHdr: 9a23:0qKJtxD+EbcltMHpQLNiUyQJP3N1i/DPJgcQr6AfoPdwSP//osbcNUDSrc9gkEXOFd2CrakU26yJ6+uxByQp2tWojjMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpQAbFhi3DwdpPOO9QteU1JTnkb/qsMyNKyxzxxODIppKZC2sqgvQssREyaBDEY0WjiXzn31TZu5NznlpL1/A1zz158O34YIxu38I46Fp34d6XK77Z6U1S6BDRHRjajhtpZ7djgTYVQaE+lcbV2wXlFIIX1mEv1nGWcLbvy2yk+t53DadOsG+GboxWDCm8KBsRDfqgSEKLCIj/WzLzMd3ifQf6D6ooR1yx7n+9IeHMPs2Kq/Ue9IXQSxLQ8tXRShAKo6mdYITDvMcMKBTr9+uiUEJqE6RHwSjA/n+ghpBgnL93aRyh+skGAXL1wwpN90LuXXQ6t7yMfFBAqiO0KDUwGCbPLtt0jDn5d2NL0ks Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=gmalecha@gmail.com; spf=Pass smtp.mailfrom=gmalecha@gmail.com; spf=None smtp.helo=postmaster@mail-wm0-f54.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of gmalecha@gmail.com) identity=pra; client-ip=74.125.82.54; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gmalecha@gmail.com"; x-sender="gmalecha@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of gmalecha@gmail.com designates 74.125.82.54 as permitted sender) identity=mailfrom; client-ip=74.125.82.54; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gmalecha@gmail.com"; x-sender="gmalecha@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wm0-f54.google.com) identity=helo; client-ip=74.125.82.54; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gmalecha@gmail.com"; x-sender="postmaster@mail-wm0-f54.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BPAAD2SxpXjzZSfUpeFoN1fQapIIVdhhCEcwENgXMkhWoCgSIHOBQBAQEBAQEBAREBAQEBBwsLCSEvgi2CFAEBAQMBEhEdARsSCwEDAQsGBQQHAwoNHQICIgERAQUBChIGARIIChCHcgEDCggOoF6BMT4xizaBaoJXhyAKGScDClGEGQEBAQEBAQEBAQEBAQEBAQEBAQEBAQ8BBQoFhRp4hEuEbIJTglYFhjMMiAiEV4RxhXuCdYUkgjSMXI1xEh6BDg8PAQGCOh6BdRwwAYh6AQEB X-IPAS-Result: A0BPAAD2SxpXjzZSfUpeFoN1fQapIIVdhhCEcwENgXMkhWoCgSIHOBQBAQEBAQEBAREBAQEBBwsLCSEvgi2CFAEBAQMBEhEdARsSCwEDAQsGBQQHAwoNHQICIgERAQUBChIGARIIChCHcgEDCggOoF6BMT4xizaBaoJXhyAKGScDClGEGQEBAQEBAQEBAQEBAQEBAQEBAQEBAQ8BBQoFhRp4hEuEbIJTglYFhjMMiAiEV4RxhXuCdYUkgjSMXI1xEh6BDg8PAQGCOh6BdRwwAYh6AQEB X-IronPort-AV: E=Sophos;i="5.24,517,1454972400"; d="scan'208,217";a="215464111" Received: from mail-wm0-f54.google.com ([74.125.82.54]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 22 Apr 2016 18:10:36 +0200 Received: by mail-wm0-f54.google.com with SMTP id n3so34352038wmn.0 for ; Fri, 22 Apr 2016 09:10:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=xNczD7ASq1Wphdll/xbdUbjAmlGrER8eEUgzNsHk0zQ=; b=ZIZAsMOar8Jl8iT/uxSia62Q/d4px81azdK4uVygrqrX75CaXTcLKEPjXrDnZbQvNq AOqyLemTTb7DDZuPHnzYBHHhoiK1yRobHUCWYDomK+7ZTHfR4fZmj++RM2yb7ti4QLnW jRIhUfUJrBqkljffG00XSRHh1by/KxNAmin5I20gO+sifcWPuVB2LKBRBjweRLETn7ce dNrzIX9tSfw8zOWgwbXGzaHKU9s26lelArQpi8f9VEu3HdxUrbbePIwLCuGY2wYCKc+b fa9Udtg02qiOmzUoQ1P3m+KBHbD7cKAwkqWJw4+5ZaRHy2kiteO+yALTTH8/Wzq+zGKu c0GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xNczD7ASq1Wphdll/xbdUbjAmlGrER8eEUgzNsHk0zQ=; b=LCR6/rGi+9Nic5bpUC5faMsU1+7VFwjFkLWmX4VzLKKC0Hm2GDlk7HWpx784fp8XO+ 5RFmd7RzONZ4exIGgxZtfpGgHEReKY5bvUE4Ar6qfTPindrWX0N/6ovS804MwqHMN9LZ HFBjnKuHZg6MHMHLbofUTmBjhv/Vf5YjzEsisFtw2pkX3VQ37UBZq+x/Qy+/s2Xg5/E8 7J2YWTCpYF69j3A/eCAC1M8UYWGw7gAwi7Gx4Rlw601HywXMoStoZAaKMsS75BJ669X8 vwwlRM6hWgSn7p7Vpn9IJGJe/VqooF0LTXxh6DN8gaWJtw7/sM/8kHNcNZvkKUXz3sxg h3UA== X-Gm-Message-State: AOPr4FVonJbATqPC7AnGJx6+W+varwB0e8fBen0aqlksHbXorx5n1OSCFhG8u3U8nnndfbqETD4ncsoI/jSlzw== X-Received: by 10.28.10.196 with SMTP id 187mr696352wmk.76.1461341435903; Fri, 22 Apr 2016 09:10:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.9.1 with HTTP; Fri, 22 Apr 2016 09:09:55 -0700 (PDT) In-Reply-To: References: <9213202F68854BA7A7A9CF9179DF685E@erratique.ch> From: Gregory Malecha Date: Fri, 22 Apr 2016 09:09:55 -0700 Message-ID: To: Ben Millwood , =?UTF-8?Q?Daniel_B=C3=BCnzli?= Cc: Gabriel Scherer , Jonas Jensen , Yaron Minsky , caml users Content-Type: multipart/alternative; boundary=001a114422942ec573053115110e Subject: Re: [Caml-list] Question about Optimization --001a114422942ec573053115110e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, Ben -- Thanks this is really helpful. On Thu, Apr 21, 2016, 9:35 AM Ben Millwood wrote: > You can see hints at the problems with rewrite rules by reading about the > mechanisms GHC has to work around them: > > > https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/pragmas.h= tml#inline-pragma > > For example, rules can be prevented from matching if some subexpression is > inlined first, but on the flipside, some rules need some inlining to occur > before they can match. This leads GHC to support "phase specifications" > that help you to control the order of inlinings and rules. > > On 21 April 2016 at 12:05, Daniel B=C3=BCnzli > wrote: > >> Le jeudi, 21 avril 2016 =C3=A0 18:02, Gabriel Scherer a =C3=A9crit : >> > useful in some situations but also very fragile. >> >> What kind of fragility ? >> >> Daniel >> > -- >> Caml-list mailing list. Subscription management and archives: >> https://sympa.inria.fr/sympa/arc/caml-list >> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners >> Bug reports: http://caml.inria.fr/bin/caml-bugs >> > --001a114422942ec573053115110e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi, Ben --

Thanks this is really helpful.


On Thu, Apr 21, 2016= , 9:35 AM Ben Millwood <bmillwood@janestreet.com> wrote:
You can see hints at the problems = with rewrite rules by reading about the mechanisms GHC has to work around t= hem:


For example, rules can be prev= ented from matching if some subexpression is inlined first, but on the flip= side, some rules need some inlining to occur before they can match. This le= ads GHC to support "phase specifications" that help you to contro= l the order of inlinings and rules.

On 21 April 2016 at 12:05, Daniel B=C3=BCnzli <= daniel.buenzli@erratique.ch> wrote:
= Le jeudi, 21 avril 2016 =C3=A0 18:02, Gabriel Scherer a =C3=A9crit :<= br> > useful in some situations but also very fragile.

What kind of fragility ?

Daniel
--
Caml-list mailing list.=C2=A0 Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocam= l_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
--001a114422942ec573053115110e--