From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr 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 55D587EE35 for ; Thu, 21 Apr 2016 18:35:24 +0200 (CEST) IronPort-PHdr: 9a23:09SiMhPPC0mKPK1MCyYl6mtUPXoX/o7sNwtQ0KIMzox0Kfz8rarrMEGX3/hxlliBBdydsKIUzbSG+PGwEUU7or+/81k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZvIaytQ8iJ35TxibD5qs2bSj4LrQT+SIs6FA+xowTVu5teqqpZAYF19CH0pGBVcf9d32JiKAHbtR/94sCt4MwrqHwI6LoJvvRNWqTifqk+UacQTHF/azh0t/vQqALbQACTynwZW2QQ2loUUkmWpC39C7v4tCr3st1XTC+IOcy+Gbw9XzWv6+FhVRLumiMGHzMj6mjLi9VtgeRQoETyiQZ4xtv+bYfdEft6erzaet9SEWBEX8JVSCtGDqu+Zo0CFPYbMOtE6YL6og1d/lOFGQCwCba3mXdzjXjs0Ph/jr0s Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=bmillwood@janestreet.com; spf=Pass smtp.mailfrom=bmillwood@janestreet.com; spf=None smtp.helo=postmaster@mxout3.mail.janestreet.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of bmillwood@janestreet.com) identity=pra; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="bmillwood@janestreet.com"; x-sender="bmillwood@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of bmillwood@janestreet.com designates 38.105.200.229 as permitted sender) identity=mailfrom; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="bmillwood@janestreet.com"; x-sender="bmillwood@janestreet.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@mxout3.mail.janestreet.com) identity=helo; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="bmillwood@janestreet.com"; x-sender="postmaster@mxout3.mail.janestreet.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0D7AAASABlXiuXIaSZeFoN1fQapDYtthQCBcySFagKBLAc6EgEBAQEBAQEBEQEBAQgWCVCCLYIVAQEDARIRHQEBLAsBBAsLBAcaHQICIhIBBQEKEgYTEhCHcwMKCAMLoR+BMT4xik9nhEEBBIdcA4R6AQEBAQEBAQECAQEBAQEBAQEBARAGCoYXhEuEbIJTglaGOAyRUIV7gnWFJII0jFyNcBEegQ4PGASCLh6Bb1ABiHUBAQE X-IPAS-Result: A0D7AAASABlXiuXIaSZeFoN1fQapDYtthQCBcySFagKBLAc6EgEBAQEBAQEBEQEBAQgWCVCCLYIVAQEDARIRHQEBLAsBBAsLBAcaHQICIhIBBQEKEgYTEhCHcwMKCAMLoR+BMT4xik9nhEEBBIdcA4R6AQEBAQEBAQECAQEBAQEBAQEBARAGCoYXhEuEbIJTglaGOAyRUIV7gnWFJII0jFyNcBEegQ4PGASCLh6Bb1ABiHUBAQE X-IronPort-AV: E=Sophos;i="5.24,513,1454972400"; d="scan'208,217";a="215321340" Received: from mxout3.mail.janestreet.com ([38.105.200.229]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Apr 2016 18:35:23 +0200 Received: from tot-qpr-mailcore2.delacy.com ([172.27.56.106] helo=tot-qpr-mailcore2) by mxout3.mail.janestreet.com with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82) (envelope-from ) id 1atHZa-0007kk-3f for caml-list@inria.fr; Thu, 21 Apr 2016 12:35:22 -0400 X-JS-Flow: external Received: by tot-qpr-mailcore2 with JS-mailcore (0.1) (envelope-from ) id BXGQFK-AAABgU-Bm; 2016-04-21 12:35:22.052439-04:00 Received: from mail-wm0-f72.google.com ([74.125.82.72]) by mxgoog1.mail.janestreet.com with esmtps (UNKNOWN:AES128-GCM-SHA256:128) (Exim 4.72) (envelope-from ) id 1atHZZ-0003ED-SH for caml-list@inria.fr; Thu, 21 Apr 2016 12:35:21 -0400 Received: by mail-wm0-f72.google.com with SMTP id l6so57552258wml.3 for ; Thu, 21 Apr 2016 09:35:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=LWY8U7VS3SvGre6sFoX4JlmKP/dM9MrUFwz7ZFzF/FU=; b=iPghHD0NKUOp7uKnIUkgwOf1BEhdtvpmYILXvmWXYd6LZBdO4c7z8D8Z1T7XRlqGk6 92TxMkVxguTl8kr63L/S4L1f3XZ251R8tbvBjlfb/YwgQOk0altth/j+D1V5xNhVHTWT InXi/I0wrZQruYzm6pHfJ+lZkU1E3m2X0RJiE= 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=LWY8U7VS3SvGre6sFoX4JlmKP/dM9MrUFwz7ZFzF/FU=; b=NeRtjwMDzQYNb5i3xjpS8ri03A4lHQBkE+UM/rojKfK88/uNw48gnFT2Xd7PCP7dI6 cgMJkjXJHXrt83fpEaTGCPPZfxW7Nmr+J70Y+BPPBw6zlSHDJ0VpYeJdwdw5jio8yoPj ZfUYTk9+ccckE8/p7SXXlOWHEREhAMQ6aYnlCL+xN232V/JxM8aLEXfZ/YUSqQI3ga4X LJBvrY/ZmScQOywESTchYBJ3mGMBhxJQp6z4BqsdKslK4OBIRrvM1mWn2diOT6h2/fDz oHiwo8C5y+/F1HeZVJENXApomTxGNdY8QyEB0pDG73mn/SxSpBTHFeRKSACunLW/YskN Ojgg== X-Gm-Message-State: AOPr4FVHCK9Wykcsy2bjVcDwgYiApRv+0VoxWD1Vtf64M71WEqOwqjR8hvtjtsoy+Vjlt+mFIEghabVjrgABLXE3YtBnaAGK3EexwaR+5iQhJXAl5S9R51iaWPji3EELmsTOSU8w6lvOYmp9oS5oYZle+lZvNu82GOU9G2cP7sM= X-Received: by 10.25.82.203 with SMTP id g194mr7128622lfb.1.1461256521139; Thu, 21 Apr 2016 09:35:21 -0700 (PDT) X-Received: by 10.25.82.203 with SMTP id g194mr7128614lfb.1.1461256521002; Thu, 21 Apr 2016 09:35:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.85.5 with HTTP; Thu, 21 Apr 2016 09:35:01 -0700 (PDT) In-Reply-To: <9213202F68854BA7A7A9CF9179DF685E@erratique.ch> References: <9213202F68854BA7A7A9CF9179DF685E@erratique.ch> From:Ben Millwood Date: Thu, 21 Apr 2016 12:35:01 -0400 Message-ID: To:=?UTF-8?Q?Daniel_B=C3=BCnzli?= Cc:Gabriel Scherer , Gregory Malecha , Yaron Minsky , Jonas Jensen , caml users Content-Type: multipart/alternative; boundary=001a1141d984dc546d0531014b37 X-JS-Processed-by: mailcore X-Sender-Copy: hkg-copy Subject: Re: [Caml-list] Question about Optimization --001a1141d984dc546d0531014b37 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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.htm= l#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 > --001a1141d984dc546d0531014b37 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
You can see hints at the problems with rewrite rules = by reading about the mechanisms GHC has to work around them:

=
For example, rules can be prevented from matching if some subexpres= sion is inlined first, but on the flipside, some rules need some inlining t= o occur before they can match. This leads GHC to support "phase specif= ications" that help you to control the order of inlinings and rules. --001a1141d984dc546d0531014b37--