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 1E3B57F20C for ; Sat, 9 Feb 2013 21:10:46 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of nanaki@gmail.com) identity=pra; client-ip=209.85.128.178; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="nanaki@gmail.com"; x-sender="nanaki@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of nanaki@gmail.com designates 209.85.128.178 as permitted sender) identity=mailfrom; client-ip=209.85.128.178; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="nanaki@gmail.com"; x-sender="nanaki@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-ve0-f178.google.com) identity=helo; client-ip=209.85.128.178; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="nanaki@gmail.com"; x-sender="postmaster@mail-ve0-f178.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApICAA+sFlHRVYCym2dsb2JhbAA8Ca4uiUuJJQgWDgEBAQEBCAkLCRQngh8BAQQBJxkBGxILAQMBCwYFBAcNDSEiAREBBQEKEgYTEodsAQMJBgyhJIw0gnuECQoZJwMKFUSIfAEFDI08hEIDiGaNPoEdjVQWKYRK X-IPAS-Result: ApICAA+sFlHRVYCym2dsb2JhbAA8Ca4uiUuJJQgWDgEBAQEBCAkLCRQngh8BAQQBJxkBGxILAQMBCwYFBAcNDSEiAREBBQEKEgYTEodsAQMJBgyhJIw0gnuECQoZJwMKFUSIfAEFDI08hEIDiGaNPoEdjVQWKYRK X-IronPort-AV: E=Sophos;i="4.84,634,1355094000"; d="scan'208";a="2137142" Received: from mail-ve0-f178.google.com ([209.85.128.178]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 09 Feb 2013 21:10:45 +0100 Received: by mail-ve0-f178.google.com with SMTP id db10so4204156veb.37 for ; Sat, 09 Feb 2013 12:10:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=NQzC4Ko+DoSL4VneaddBRgA/I3UcMRbx8mVR4Mbex5g=; b=Ey/aeFc9DHvhwTWj5YULbSGLFAsgVR+sbGcFTR28CU/Nbjb6x08RrTZijoY+pKyIea BuDUv/zV5OdBPXXVC4RbCiwp5Y9Imc7O0LyDzElo+VYjcFXL6oL/jLTFwWaQx3+bM2So VTohoKY9rjys9sUmmRrUVCeLM8uzMoMtpkPkrxQ7jfPqmNvd+1Cef+hEhWTHXMUfyGTD 6sOAchRom/B+7boFo1HmZJt6nDF06DxpawQxoqvZ1fBvKPegZIW/pSFJ2Smw3pmToThb NkAEnCnK67GCWyhNWoueOCgryLV5b8pnooff5pdhzaCmLTtHLXTGO8UXHHTqpuSnB8cp /kHg== MIME-Version: 1.0 X-Received: by 10.221.11.205 with SMTP id pf13mr12223362vcb.70.1360440644429; Sat, 09 Feb 2013 12:10:44 -0800 (PST) Received: by 10.58.235.73 with HTTP; Sat, 9 Feb 2013 12:10:44 -0800 (PST) In-Reply-To: <20130209131353.GA27519@frosties> References: <20130209131353.GA27519@frosties> Date: Sat, 9 Feb 2013 12:10:44 -0800 Message-ID: From: Jeff Meister To: Goswin von Brederlow Cc: Caml List Content-Type: multipart/alternative; boundary=bcaec54fb4165968e804d55045bc Subject: Re: [Caml-list] use identity for default function --bcaec54fb4165968e804d55045bc Content-Type: text/plain; charset=ISO-8859-1 Indeed, reading this thread now I have no idea why I thought that was a good idea in the first place! On Sat, Feb 9, 2013 at 5:13 AM, Goswin von Brederlow wrote: > On Thu, Feb 07, 2013 at 11:53:25AM -0800, Jeff Meister wrote: > > Can't you simply define it this way? (I don't think I'm using any new > > features, so maybe I misunderstood your question.) > > > > OCaml version 4.00.1 > > > > # external id : 'a -> 'b = "%identity";; > > external id : 'a -> 'b = "%identity" > > That is wrong. %identity is of type 'a -> 'a. You are lying to the > type system and all matter of errors and segfaults will ensure (see > later mails). > > MfG > Goswin > > -- > 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 > --bcaec54fb4165968e804d55045bc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Indeed, reading this thread now I have no idea why I thoug= ht that was a good idea in the first place!


On Sat, Feb 9, 2013 at 5:13 AM, Gos= win von Brederlow <goswin-v-b@web.de> wrote:
On Thu, Feb 07, 2013 at 11= :53:25AM -0800, Jeff Meister wrote:
> Can't you simply define it this way? (I do= n't think I'm using any new
> features, so maybe I misunderstood your question.)
>
> =A0 =A0 =A0 =A0 OCaml version 4.00.1
>
> # external id : 'a -> 'b =3D "%identity";;
> external id : 'a -> 'b =3D "%identity"

That is wrong. %identity is of type 'a -> 'a. You are lyin= g to the
type system and all matter of errors and segfaults will ensure (see
later mails).

MfG
=A0 =A0 =A0 =A0 Goswin

--
Caml-list mailing list. =A0Subscription management and archives:
ht= tps://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

--bcaec54fb4165968e804d55045bc--