<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Distribution.ModuleName</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[ window.onload = function () {pageLoad();setSynopsis("mini_Distribution-ModuleName.html");}; //]]> </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">Cabal-1.14.0: A framework for packaging Haskell software</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Maintainer</th><td>cabal-devel@haskell.org</td></tr><tr><th>Safe Haskell</th><td>Safe-Infered</td></tr></table><p class="caption">Distribution.ModuleName</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Data type for Haskell module names. </p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:ModuleName">ModuleName</a> </li><li class="src short"><a href="#v:fromString">fromString</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> <a href="Distribution-ModuleName.html#t:ModuleName">ModuleName</a></li><li class="src short"><a href="#v:components">components</a> :: <a href="Distribution-ModuleName.html#t:ModuleName">ModuleName</a> -> [<a href="../base-4.5.1.0/Data-String.html#t:String">String</a>]</li><li class="src short"><a href="#v:toFilePath">toFilePath</a> :: <a href="Distribution-ModuleName.html#t:ModuleName">ModuleName</a> -> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:main">main</a> :: <a href="Distribution-ModuleName.html#t:ModuleName">ModuleName</a></li><li class="src short"><a href="#v:simple">simple</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> <a href="Distribution-ModuleName.html#t:ModuleName">ModuleName</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ModuleName" class="def">ModuleName</a> </p><div class="doc"><p>A valid Haskell module name. </p></div><div class="subs instances"><p id="control.i:ModuleName" class="caption collapser" onclick="toggleSection('i:ModuleName')">Instances</p><div id="section.i:ModuleName" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Distribution-ModuleName.html#t:ModuleName">ModuleName</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="Distribution-ModuleName.html#t:ModuleName">ModuleName</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Read.html#t:Read">Read</a> <a href="Distribution-ModuleName.html#t:ModuleName">ModuleName</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="Distribution-ModuleName.html#t:ModuleName">ModuleName</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Distribution-Text.html#t:Text">Text</a> <a href="Distribution-ModuleName.html#t:ModuleName">ModuleName</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:fromString" class="def">fromString</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> <a href="Distribution-ModuleName.html#t:ModuleName">ModuleName</a></p><div class="doc"><p>Construct a <code><a href="Distribution-ModuleName.html#t:ModuleName">ModuleName</a></code> from a valid module name <code><a href="../base-4.5.1.0/Data-String.html#t:String">String</a></code>. </p><p>This is just a convenience function intended for valid module strings. It is an error if it is used with a string that is not a valid module name. If you are parsing user input then use <code><a href="Distribution-Text.html#v:simpleParse">simpleParse</a></code> instead. </p></div></div><div class="top"><p class="src"><a name="v:components" class="def">components</a> :: <a href="Distribution-ModuleName.html#t:ModuleName">ModuleName</a> -> [<a href="../base-4.5.1.0/Data-String.html#t:String">String</a>]</p><div class="doc"><p>The individual components of a hierarchical module name. For example </p><pre> components (fromString "A.B.C") = ["A", "B", "C"] </pre></div></div><div class="top"><p class="src"><a name="v:toFilePath" class="def">toFilePath</a> :: <a href="Distribution-ModuleName.html#t:ModuleName">ModuleName</a> -> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></p><div class="doc"><p>Convert a module name to a file path, but without any file extension. For example: </p><pre> toFilePath (fromString "A.B.C") = "A/B/C" </pre></div></div><div class="top"><p class="src"><a name="v:main" class="def">main</a> :: <a href="Distribution-ModuleName.html#t:ModuleName">ModuleName</a></p><div class="doc"><p>The module name <code>Main</code>. </p></div></div><div class="top"><p class="src"><a name="v:simple" class="def">simple</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> <a href="Distribution-ModuleName.html#t:ModuleName">ModuleName</a></p><div class="doc"><div class="warning"><p>Deprecated: use ModuleName.fromString instead</p></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.11.0</p></div></body></html>