<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>utop &amp;mdash; Learning OCaml</title>
    <link>https://learning-ocaml.writeas.com/tag:utop</link>
    <description>Notes from an OCaml learner</description>
    <pubDate>Sat, 06 Jun 2026 19:16:07 +0000</pubDate>
    <item>
      <title>Getting Started OCaml: Setting up utop with Base</title>
      <link>https://learning-ocaml.writeas.com/getting-started-ocaml-setting-up-utop-with-base?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[It is not obvious how one uses the Jane Street OCaml packages in utop, at least under Linux in 2019.&#xA;&#xA;The following assumes that you have managed to get OCaml installed and executing eval $(opam config env) sets up everything correctly in your environment.&#xA;&#xA;The key is to run `#require &#34;base&#34;;;` in utop. The following sequence should work:&#xA;require &#34;core&#34;;;&#xA;open Base;;&#xA;List.map ~f:String.length [&#34;Hello&#34;; &#34;World!&#34;];;&#xA;The  List.map above is Base.List.map, as desired.&#xA;&#xA;If you don&#39;t run #require &#34;core&#34;;; you will get the message: Error: Unbound module Base.&#xA;&#xA;#ocaml #learningocaml #utop]]&gt;</description>
      <content:encoded><![CDATA[<p>It is not obvious how one uses the Jane Street OCaml packages in <code>utop</code>, at least under Linux in 2019.</p>

<p>The following assumes that you have managed to get OCaml installed and executing <code>eval $(opam config env)</code> sets up everything correctly in your environment.</p>

<p>The key is to run <code>#require &#34;base&#34;;;</code> in utop. The following sequence should work:</p>

<pre><code>#require &#34;core&#34;;;
open Base;;
List.map ~f:String.length [&#34;Hello&#34;; &#34;World!&#34;];;
</code></pre>

<p>The  <code>List.map</code> above is <code>Base.List.map</code>, as desired.</p>

<p>If you don&#39;t run <code>#require &#34;core&#34;;;</code> you will get the message: <code>Error: Unbound module Base</code>.</p>

<p><a href="https://learning-ocaml.writeas.com/tag:ocaml" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">ocaml</span></a> <a href="https://learning-ocaml.writeas.com/tag:learningocaml" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">learningocaml</span></a> <a href="https://learning-ocaml.writeas.com/tag:utop" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">utop</span></a></p>
]]></content:encoded>
      <guid>https://learning-ocaml.writeas.com/getting-started-ocaml-setting-up-utop-with-base</guid>
      <pubDate>Sun, 02 Jun 2019 21:50:19 +0000</pubDate>
    </item>
  </channel>
</rss>