From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <5764c029b688c1c0d24a2e97cd764f@gmail.com> 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 5D00D7F84F for ; Sun, 23 Feb 2014 13:23:04 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of 5764c029b688c1c0d24a2e97cd764f@gmail.com) identity=pra; client-ip=74.125.82.47; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="5764c029b688c1c0d24a2e97cd764f@gmail.com"; x-sender="5764c029b688c1c0d24a2e97cd764f@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of 5764c029b688c1c0d24a2e97cd764f@gmail.com designates 74.125.82.47 as permitted sender) identity=mailfrom; client-ip=74.125.82.47; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="5764c029b688c1c0d24a2e97cd764f@gmail.com"; x-sender="5764c029b688c1c0d24a2e97cd764f@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-wg0-f47.google.com) identity=helo; client-ip=74.125.82.47; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="5764c029b688c1c0d24a2e97cd764f@gmail.com"; x-sender="postmaster@mail-wg0-f47.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmMHACrnCVNKfVIvlWdsb2JhbABZghq/PoQbFg4BAQEBBw0JCRIqglMZARscAgMSEBYWGAMCAQIBEREBBQEvCAKHbAEDEQQBl0uDCoxegw6VIwoZJw1khl8BBQyOdYQiBJg0hkiJckGEWQ X-IPAS-Result: AmMHACrnCVNKfVIvlWdsb2JhbABZghq/PoQbFg4BAQEBBw0JCRIqglMZARscAgMSEBYWGAMCAQIBEREBBQEvCAKHbAEDEQQBl0uDCoxegw6VIwoZJw1khl8BBQyOdYQiBJg0hkiJckGEWQ X-IronPort-AV: E=Sophos;i="4.97,529,1389740400"; d="scan'208";a="59822159" Received: from mail-wg0-f47.google.com ([74.125.82.47]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 23 Feb 2014 13:23:04 +0100 Received: by mail-wg0-f47.google.com with SMTP id k14so3769104wgh.2 for ; Sun, 23 Feb 2014 04:23:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=vITUd0DKiH+6IGtpAliov5yLbXaFH5y+WiJIKG/pPdg=; b=LH7grgXEWVFvwN4j1Cgktx3iP5Ry+ltVOAX/K02c0BP3j/PFT/s9lcS9DFSPm+lhc0 wm2KQmItnY+9QyE11z36/13mUBUARUc55dUlohFz5u4sy460FIeaEBL946zexe8MXaUv TrMFhcPNXoTH8IJaxWKzGu5V4Bdqza1XPZovgJQwLzTtzaijDsNJbukuNRMvXt1HdTKg Gwi+Cc3SE7nnMJ6xhY+smbA4hJA8PYs11DFS5eXkZw8JJs0nqOWfA5Pye9PFfXIpZWbJ N9ydTcLzc5awP7F5Cy1T83HyueCk/lYERGEiiTR9QKofkqk9iNZblh1C4ljqftPDBHHH eDxw== X-Received: by 10.180.91.164 with SMTP id cf4mr9985608wib.37.1393158183989; Sun, 23 Feb 2014 04:23:03 -0800 (PST) Received: from [10.0.1.151] ([213.106.240.92]) by mx.google.com with ESMTPSA id bm8sm32986168wjc.12.2014.02.23.04.23.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 23 Feb 2014 04:23:03 -0800 (PST) Message-ID: <5309E82E.5060802@gmail.com> Date: Sun, 23 Feb 2014 12:23:10 +0000 From: Matej Kosik <5764c029b688c1c0d24a2e97cd764f@gmail.com> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10 MIME-Version: 1.0 To: caml-list@inria.fr X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Caml-list] how to convert strings to Ocaml values at run-time? Hi, I would like to ask, what is the easiest way how to: - take given string, provided by the user at run time - run it through lexer --> parser --> check given value, in the current context, has a given type - and bind the value to a variable (provided there were no lexing/parsing/typechecking problems). (I am not yet 100% sure, that this is the right direction to solve my problem, but I am quite interested whether I could solve it this way.)