Skip to content
Browse files

update 2013-09-04

  • Loading branch information...
1 parent 51252b8 commit 28ae94d60ad0bd9a863a72b54791d96231d967a9 @qnikst committed Sep 4, 2013
Showing with 238 additions and 0 deletions.
  1. +121 −0 posts/2013-09-04-my-ghci.html
  2. +72 −0 tags/ghci.html
  3. +45 −0 tags/ghci.xml
View
121 posts/2013-09-04-my-ghci.html
@@ -0,0 +1,121 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>Qnikst blog - My ghci</title>
+ <!-- Bootstrap -->
+ <link href="../css/bootstrap.min.css" rel="stylesheet" media="screen">
+ <link href="../css/additional.css" rel="stylesheet" media="screen">
+ <style>
+ body {
+ padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
+ }
+ </style>
+ <script src="http://code.jquery.com/jquery-latest.js"></script>
+ <script src="../js/bootstrap.min.js"></script>
+
+</head>
+<body>
+ <div class="navbar navbar-fixed-top navbar-inverse">
+ <div class="navbar-inner">
+ <a class="brand" href="../">Qnikst blog</a>
+ <ul class="nav ">
+ <li class="active"><a href="../">Home</a></li>
+ <li><a href="../posts.html">Blog</a></li>
+ <li><a href="../projects.html">Projects</a></li>
+ <li><a href="../contact.html">Contacts</a></li>
+ <li><a href="../rss/">RSS</a></li>
+ </ul>
+ </div>
+ </div>
+ <div class="container">
+ <meta name="keywords" content="gentoo, haskell, ghci">
+
+
+<div class="page-header">
+ <h1>My ghci <br /><small><strong>September 4, 2013</strong></small></h1>
+</div>
+
+<p>Here is small collection of my ghci scripts taken from different places.</p>
+<h3 id="pointfree">Pointfree</h3>
+<p>Convert expression into <a href="http://www.haskell.org/haskellwiki/Pointfree">pointfree</a> style. You need to install <a href="http://hackage.haskell.org/package/pointfree">pointree package</a> before In Gentoo case run <code>emerge dev-haskell/pointfree</code>.</p>
+<pre><code>-- pointfree
+:def pf \str -&gt; return $ &quot;:! pointfree \&quot;&quot; ++ str ++ &quot;\&quot;&quot;</code></pre>
+<h3 id="haskell-docs">Haskell-docs</h3>
+<p>Show documentation on given function. In order to use it you need to intall <a href="http://hackage.haskell.org/package/haskell-docs">haskell-doc package</a> and built documentation for packages.</p>
+<p>In Gentoo case: 1. echo ‘dev-haskell/* docs’ &gt;&gt; /etc/portage/package.use 2. <code>emerge dev-haskell/haskell-docs</code></p>
+<pre><code>-- documentation
+:def doc \input -&gt; return (&quot;:!haskell-docs &quot; ++ input)</code></pre>
+<p>The format is following: <modulename> <name> [<package name>]</p>
+<blockquote>
+<p>:doc System.IO getContents base The getContents operation returns all user input as a single string, which is read lazily as it is needed (same as hGetContents stdin).</p>
+</blockquote>
+<h3 id="ghc-vis">GHC-Vis</h3>
+<p>A great tool to show how expressions will be presented in memory. You can use it in order to understand your data structure and laziness/strictness of expressions. As usual you need to install <a href="http://hackage.haskell.org/package/ghc-vis">ghc-vis package</a>. Documentation for package (nice pictures included): http://felsin9.de/nnis/ghc-vis/</p>
+<pre><code>-- ghc-vis
+:script //usr/share/ghc-vis-0.7.1/ghc-7.6.3/ghci</code></pre>
+<h3 id="hoogle">Hoogle</h3>
+<p>To enable searching with hoogle (either local or global) you can install <a href="http://hackage.haskell.org/package/hoogle">hoogle package</a>.</p>
+<pre><code>:def hoogle \str -&gt; return $ &quot;:! hoogle --count=15 \&quot;&quot; ++ str ++ &quot;\&quot;&quot;</code></pre>
+<h3 id="prompt">Prompt</h3>
+<p>To hide a big list of imported modules and have a nice look’n’feel you can change you ghci prompt.</p>
+<pre><code>:set prompt &quot;λ&gt; &quot;</code></pre>
+<p>To see list of imported modules you can type: <code>:show imports</code>.</p>
+<hr />
+<div id="sociallinks" class="pull-left">
+ <strong>Share on:</strong>
+ <a href="https://twitter.com/home?status=/posts/2013-09-04-my-ghci.html" target="_blank" class="social">t</a> -
+ <a href="http://www.facebook.com/sharer/sharer.php?u=/posts/2013-09-04-my-ghci.html" target="_blank" class="social">`</a> -
+ <a href="https://plus.google.com/share?url=/posts/2013-09-04-my-ghci.html" target="_blank" class="social">g</a>
+</div>
+<script type="text/javascript">
+//
+ (function(){window.addEventListener("DOMContentLoaded",function(){
+ var url=document.location;
+ var links=document.getElementById("sociallinks").getElementsByTagName('a');
+ for (var i=0;i!=links.length;i++){
+ links[i].setAttribute("href",
+ links[i].href.replace('/posts/2013-09-04-my-ghci.html',url));}})})();
+//
+</script>
+<div class="pull-right">
+ <em>Alexander Vershilov</em>
+
+</div>
+<br class="clearfix" />
+<hr />
+
+
+<div id="disqus_thread"></div>
+ <script type="text/javascript">
+ /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
+ var disqus_shortname = 'qnikst'; // required: replace example with your forum shortname
+
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+ </script>
+ <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+ <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
+
+
+ <footer>
+ Site generated using <a href="http://jaspervdj.be/hakyll">Hakyll</a> using <a href="http://johnmacfarlane.net/pandoc/">pandoc</a>
+ </footer>
+ </div>
+<script type="text/javascript">
+ // <noscript> я очень хочу вас посчитать, напишите комментарий хотя бы, пожааалуйста </noscript>
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-38941774-1']);
+_gaq.push(['_trackPageview']);
+
+(function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+</body>
+</html>
View
72 tags/ghci.html
@@ -0,0 +1,72 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>Qnikst blog - ghci</title>
+ <!-- Bootstrap -->
+ <link href="../css/bootstrap.min.css" rel="stylesheet" media="screen">
+ <link href="../css/additional.css" rel="stylesheet" media="screen">
+ <style>
+ body {
+ padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
+ }
+ </style>
+ <script src="http://code.jquery.com/jquery-latest.js"></script>
+ <script src="../js/bootstrap.min.js"></script>
+
+</head>
+<body>
+ <div class="navbar navbar-fixed-top navbar-inverse">
+ <div class="navbar-inner">
+ <a class="brand" href="../">Qnikst blog</a>
+ <ul class="nav ">
+ <li class="active"><a href="../">Home</a></li>
+ <li><a href="../posts.html">Blog</a></li>
+ <li><a href="../projects.html">Projects</a></li>
+ <li><a href="../contact.html">Contacts</a></li>
+ <li><a href="../rss/">RSS</a></li>
+ </ul>
+ </div>
+ </div>
+ <div class="container">
+ <div class="container-fluid">
+ <div class="span8">
+ <div id="posts">
+ <h1>All posts</h1>
+ <ul>
+ <li>
+ <a href="../posts/2013-09-04-my-ghci.html">My ghci</a> [September 4, 2013]
+</li>
+
+ </ul>
+ </div>
+ </div>
+ <div class="span3">
+ <p><strong>Browse Tags:</strong><br /> <a href="../tags/OpenRC.html">OpenRC (1)</a>, <a href="../tags/cgroups.html">cgroups (1)</a>, <a href="../tags/gentoo.html">gentoo (3)</a>, <a href="../tags/ghci.html">ghci (1)</a>, <a href="../tags/hakyll.html">hakyll (2)</a>, <a href="../tags/haskell.html">haskell (9)</a>, <a href="../tags/latex.html">latex (1)</a>, <a href="../tags/linux.html">linux (2)</a>, <a href="../tags/pam.html">pam (1)</a>, <a href="../tags/phys.html">phys (1)</a>, <a href="../tags/programming.html">programming (1)</a>, <a href="../tags/projects.html">projects (1)</a>, <a href="../tags/resourcet.html">resourcet (1)</a>, <a href="../tags/supervision.html">supervision (1)</a>, <a href="../tags/univ.html">univ (1)</a>, <a href="../tags/web.html">web (1)</a></p>
+ <p><strong>Links:</strong><br />
+ <ul>
+ <li><a href="http://gentoo.org">Gentoo Linux</a></li>
+ <li><a href="http://gentoohaskell.wordpress.com/">Gentoo haskell blog</a></li>
+ </ul>
+ </p>
+ </div>
+</div>
+
+ <footer>
+ Site generated using <a href="http://jaspervdj.be/hakyll">Hakyll</a> using <a href="http://johnmacfarlane.net/pandoc/">pandoc</a>
+ </footer>
+ </div>
+<script type="text/javascript">
+ // <noscript> я очень хочу вас посчитать, напишите комментарий хотя бы, пожааалуйста </noscript>
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-38941774-1']);
+_gaq.push(['_trackPageview']);
+
+(function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+</body>
+</html>
View
45 tags/ghci.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+ <title>Qnikst blog RSS feed - Post tagged ghci</title>
+ <link href="http://qnikst.github.com/tags/ghci.xml" rel="self" />
+ <link href="http://qnikst.github.com" />
+ <id>http://qnikst.github.com/tags/ghci.xml</id>
+ <author>
+ <name>Alexander Vershilov</name>
+ <email>alexander.vershilov@gmail.com</email>
+ </author>
+ <updated>2013-09-04T00:00:00Z</updated>
+ <entry>
+ <title>My ghci</title>
+ <link href="http://qnikst.github.com/posts/2013-09-04-my-ghci.html" />
+ <id>http://qnikst.github.com/posts/2013-09-04-my-ghci.html</id>
+ <published>2013-09-04T00:00:00Z</published>
+ <updated>2013-09-04T00:00:00Z</updated>
+ <summary type="html"><![CDATA[<p>Here is small collection of my ghci scripts taken from different places.</p>
+<h2 id="pointfree">Pointfree</h2>
+<p>Convert expression into <a href="http://www.haskell.org/haskellwiki/Pointfree">pointfree</a> style. You need to install <a href="http://hackage.haskell.org/package/pointfree">pointree package</a> before In Gentoo case run <code>emerge dev-haskell/pointfree</code>.</p>
+<pre><code>-- pointfree
+:def pf \str -&gt; return $ &quot;:! pointfree \&quot;&quot; ++ str ++ &quot;\&quot;&quot;</code></pre>
+<h2 id="haskell-docs">Haskell-docs</h2>
+<p>Show documentation on given function. In order to use it you need to intall <a href="http://hackage.haskell.org/package/haskell-docs">haskell-doc package</a> and built documentation for packages.</p>
+<p>In Gentoo case: 1. echo ‘dev-haskell/* docs’ &gt;&gt; /etc/portage/package.use 2. <code>emerge dev-haskell/haskell-docs</code></p>
+<pre><code>-- documentation
+:def doc \input -&gt; return (&quot;:!haskell-docs &quot; ++ input)</code></pre>
+<p>The format is following: <modulename> <name> [<package name>]</p>
+<blockquote>
+<p>:doc System.IO getContents base The getContents operation returns all user input as a single string, which is read lazily as it is needed (same as hGetContents stdin).</p>
+</blockquote>
+<h2 id="ghc-vis">GHC-Vis</h2>
+<p>A great tool to show how expressions will be presented in memory. You can use it in order to understand your data structure and laziness/strictness of expressions. As usual you need to install <a href="http://hackage.haskell.org/package/ghc-vis">ghc-vis package</a>. Documentation for package (nice pictures included): http://felsin9.de/nnis/ghc-vis/</p>
+<pre><code>-- ghc-vis
+:script //usr/share/ghc-vis-0.7.1/ghc-7.6.3/ghci</code></pre>
+<h2 id="hoogle">Hoogle</h2>
+<p>To enable searching with hoogle (either local or global) you can install <a href="http://hackage.haskell.org/package/hoogle">hoogle package</a>.</p>
+<pre><code>:def hoogle \str -&gt; return $ &quot;:! hoogle --count=15 \&quot;&quot; ++ str ++ &quot;\&quot;&quot;</code></pre>
+<h2 id="prompt">Prompt</h2>
+<p>To hide a big list of imported modules and have a nice look’n’feel you can change you ghci prompt.</p>
+<pre><code>:set prompt &quot;λ&gt; &quot;</code></pre>
+<p>To see list of imported modules you can type: <code>:show imports</code>.</p>]]></summary>
+</entry>
+
+</feed>

0 comments on commit 28ae94d

Please sign in to comment.
Something went wrong with that request. Please try again.