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 2980D7EE4B for ; Thu, 10 Oct 2013 10:01:16 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of martindemello@gmail.com) identity=pra; client-ip=209.85.220.178; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="martindemello@gmail.com"; x-sender="martindemello@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of martindemello@gmail.com designates 209.85.220.178 as permitted sender) identity=mailfrom; client-ip=209.85.220.178; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="martindemello@gmail.com"; x-sender="martindemello@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-vc0-f178.google.com) identity=helo; client-ip=209.85.220.178; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="martindemello@gmail.com"; x-sender="postmaster@mail-vc0-f178.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AucCAGNeVlLRVdyylGdsb2JhbABZhBHCNggWDgEBAQEHCwsJEiqCUxkBGx4DEhBdAREBBQEWDIgGAQMPl2aDBIxTgwqEHAoZJw1kiQEBBQyTZQOJPI5JkBcYKYRuHA X-IPAS-Result: AucCAGNeVlLRVdyylGdsb2JhbABZhBHCNggWDgEBAQEHCwsJEiqCUxkBGx4DEhBdAREBBQEWDIgGAQMPl2aDBIxTgwqEHAoZJw1kiQEBBQyTZQOJPI5JkBcYKYRuHA X-IronPort-AV: E=Sophos;i="4.90,1070,1371074400"; d="scan'208";a="36356486" Received: from mail-vc0-f178.google.com ([209.85.220.178]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 10 Oct 2013 10:00:48 +0200 Received: by mail-vc0-f178.google.com with SMTP id lh4so1356952vcb.37 for ; Thu, 10 Oct 2013 01:00:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=+glQtsye8riYbntpeeroLCD2qieebih8338hHuSX3JU=; b=pi2yVQ5hKdP+PKT+DDb+X4DzUr93liqx134ewWRr3NC//RDGXEupzO6qaYQO/Cn1Aj 8fqB3CmdoetiqpqXsxvVu41sUnc36CkXTRBTDBwSfotZFVo9X9IHaeKva9LBdiPx5DO/ /u6CkITrsZ/wJ90xo3cXVvfqSQuIh1tQ6xjOTQ12xszROx/VxXcQAM40IZI01agmnh/X 0Fb3CJQN2p8N0mqB94AshCICbW2480asOZB4S6iX4nlRfWWTZ6AVq13b+d00bdBISk6B cbMhvPkCg23LJ4/mESB0TUPwfqmcpzgNuEFF8GanAABKxcpM+42s7R2myaKPGCPCLoT/ IPlg== MIME-Version: 1.0 X-Received: by 10.52.26.6 with SMTP id h6mr3843020vdg.57.1381392048348; Thu, 10 Oct 2013 01:00:48 -0700 (PDT) Received: by 10.220.162.197 with HTTP; Thu, 10 Oct 2013 01:00:48 -0700 (PDT) Date: Thu, 10 Oct 2013 01:00:48 -0700 Message-ID: From: Martin DeMello To: OCaml List Content-Type: text/plain; charset=ISO-8859-1 Subject: [Caml-list] exhaustiveness checking within a submatch Just curious as to why the compiler can't handle this, since in theory everything is statically deducible: # type test = A | B | C | D;; type test = A | B | C | D # let f = A;; val f : test = A # match f with A -> 1 | B -> 2 | C | D -> ( match f with C -> 3 | D -> 4);; Characters 40-71: Warning 8: this pattern-matching is not exhaustive. Here is an example of a value that is not matched: (A|B) Characters 40-71: Warning 8: this pattern-matching is not exhaustive. Here is an example of a value that is not matched: (A|B) - : int = 1 martin