/usr/share/doc/libghc-language-c-doc/html/Language-C-Analysis-DeclAnalysis.html is in libghc-language-c-doc 0.4.2-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | <!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>Language.C.Analysis.DeclAnalysis</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_Language-C-Analysis-DeclAnalysis.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Language-C-Analysis-DeclAnalysis.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">language-c-0.4.2: Analysis and generation of C code</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>ghc</td></tr><tr><th>Stability</th><td>alpha</td></tr><tr><th>Maintainer</th><td>benedikt.huber@gmail.com</td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Language.C.Analysis.DeclAnalysis</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Translating types
</a></li><li><a href="#g:2">Dissecting type specs
</a></li><li><a href="#g:3">Helpers
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module performs the analysis of declarations and the translation of
type specifications in the AST.
</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"><a href="#v:analyseTypeDecl">analyseTypeDecl</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadTrav">MonadTrav</a> m => <a href="Language-C-Syntax-AST.html#t:CDecl">CDecl</a> -> m <a href="Language-C-Analysis-SemRep.html#t:Type">Type</a></li><li class="src short"><a href="#v:tType">tType</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadTrav">MonadTrav</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> <a href="Language-C-Data-Node.html#t:NodeInfo">NodeInfo</a> -> [<a href="Language-C-Syntax-AST.html#t:CTypeQual">CTypeQual</a>] -> <a href="Language-C-Analysis-DeclAnalysis.html#t:TypeSpecAnalysis">TypeSpecAnalysis</a> -> [<a href="Language-C-Syntax-AST.html#t:CDerivedDeclr">CDerivedDeclr</a>] -> [<a href="Language-C-Syntax-AST.html#t:CDecl">CDecl</a>] -> m <a href="Language-C-Analysis-SemRep.html#t:Type">Type</a></li><li class="src short"><a href="#v:tDirectType">tDirectType</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadTrav">MonadTrav</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> <a href="Language-C-Data-Node.html#t:NodeInfo">NodeInfo</a> -> [<a href="Language-C-Syntax-AST.html#t:CTypeQual">CTypeQual</a>] -> <a href="Language-C-Analysis-DeclAnalysis.html#t:TypeSpecAnalysis">TypeSpecAnalysis</a> -> m <a href="Language-C-Analysis-SemRep.html#t:Type">Type</a></li><li class="src short"><a href="#v:tNumType">tNumType</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadCError">MonadCError</a> m => <a href="Language-C-Analysis-DeclAnalysis.html#t:NumTypeSpec">NumTypeSpec</a> -> m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> (<a href="Language-C-Analysis-SemRep.html#t:FloatType">FloatType</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a>) <a href="Language-C-Analysis-SemRep.html#t:IntType">IntType</a>)</li><li class="src short"><a href="#v:tArraySize">tArraySize</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadTrav">MonadTrav</a> m => <a href="Language-C-Syntax-AST.html#t:CArrSize">CArrSize</a> -> m <a href="Language-C-Analysis-SemRep.html#t:ArraySize">ArraySize</a></li><li class="src short"><a href="#v:tTypeQuals">tTypeQuals</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadTrav">MonadTrav</a> m => [<a href="Language-C-Syntax-AST.html#t:CTypeQual">CTypeQual</a>] -> m (<a href="Language-C-Analysis-SemRep.html#t:TypeQuals">TypeQuals</a>, <a href="Language-C-Analysis-SemRep.html#t:Attributes">Attributes</a>)</li><li class="src short"><a href="#v:mergeOldStyle">mergeOldStyle</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadCError">MonadCError</a> m => <a href="Language-C-Data-Node.html#t:NodeInfo">NodeInfo</a> -> [<a href="Language-C-Syntax-AST.html#t:CDecl">CDecl</a>] -> [<a href="Language-C-Syntax-AST.html#t:CDerivedDeclr">CDerivedDeclr</a>] -> m [<a href="Language-C-Syntax-AST.html#t:CDerivedDeclr">CDerivedDeclr</a>]</li><li class="src short"><a href="#v:canonicalTypeSpec">canonicalTypeSpec</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadTrav">MonadTrav</a> m => [<a href="Language-C-Syntax-AST.html#t:CTypeSpec">CTypeSpec</a>] -> m <a href="Language-C-Analysis-DeclAnalysis.html#t:TypeSpecAnalysis">TypeSpecAnalysis</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:NumBaseType">NumBaseType</a> <ul class="subs"><li>= <a href="#v:NoBaseType">NoBaseType</a> </li><li>| <a href="#v:BaseChar">BaseChar</a> </li><li>| <a href="#v:BaseInt">BaseInt</a> </li><li>| <a href="#v:BaseFloat">BaseFloat</a> </li><li>| <a href="#v:BaseDouble">BaseDouble</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:SignSpec">SignSpec</a> <ul class="subs"><li>= <a href="#v:NoSignSpec">NoSignSpec</a> </li><li>| <a href="#v:Signed">Signed</a> </li><li>| <a href="#v:Unsigned">Unsigned</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:SizeMod">SizeMod</a> <ul class="subs"><li>= <a href="#v:NoSizeMod">NoSizeMod</a> </li><li>| <a href="#v:ShortMod">ShortMod</a> </li><li>| <a href="#v:LongMod">LongMod</a> </li><li>| <a href="#v:LongLongMod">LongLongMod</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:NumTypeSpec">NumTypeSpec</a> = <a href="#v:NumTypeSpec">NumTypeSpec</a> {<ul class="subs"><li><a href="#v:base">base</a> :: <a href="Language-C-Analysis-DeclAnalysis.html#t:NumBaseType">NumBaseType</a></li><li><a href="#v:signSpec">signSpec</a> :: <a href="Language-C-Analysis-DeclAnalysis.html#t:SignSpec">SignSpec</a></li><li><a href="#v:sizeMod">sizeMod</a> :: <a href="Language-C-Analysis-DeclAnalysis.html#t:SizeMod">SizeMod</a></li><li><a href="#v:isComplex">isComplex</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:TypeSpecAnalysis">TypeSpecAnalysis</a> <ul class="subs"><li>= <a href="#v:TSNone">TSNone</a> </li><li>| <a href="#v:TSVoid">TSVoid</a> </li><li>| <a href="#v:TSBool">TSBool</a> </li><li>| <a href="#v:TSNum">TSNum</a> <a href="Language-C-Analysis-DeclAnalysis.html#t:NumTypeSpec">NumTypeSpec</a> </li><li>| <a href="#v:TSTypeDef">TSTypeDef</a> <a href="Language-C-Analysis-SemRep.html#t:TypeDefRef">TypeDefRef</a> </li><li>| <a href="#v:TSType">TSType</a> <a href="Language-C-Analysis-SemRep.html#t:Type">Type</a> </li><li>| <a href="#v:TSNonBasic">TSNonBasic</a> <a href="Language-C-Syntax-AST.html#t:CTypeSpec">CTypeSpec</a> </li></ul></li><li class="src short"><a href="#v:canonicalStorageSpec">canonicalStorageSpec</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadCError">MonadCError</a> m => [<a href="Language-C-Syntax-AST.html#t:CStorageSpec">CStorageSpec</a>] -> m <a href="Language-C-Analysis-DeclAnalysis.html#t:StorageSpec">StorageSpec</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:StorageSpec">StorageSpec</a> <ul class="subs"><li>= <a href="#v:NoStorageSpec">NoStorageSpec</a> </li><li>| <a href="#v:AutoSpec">AutoSpec</a> </li><li>| <a href="#v:RegSpec">RegSpec</a> </li><li>| <a href="#v:ThreadSpec">ThreadSpec</a> </li><li>| <a href="#v:StaticSpec">StaticSpec</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> </li><li>| <a href="#v:ExternSpec">ExternSpec</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> </li></ul></li><li class="src short"><a href="#v:hasThreadLocalSpec">hasThreadLocalSpec</a> :: <a href="Language-C-Analysis-DeclAnalysis.html#t:StorageSpec">StorageSpec</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isTypeDef">isTypeDef</a> :: [<a href="Language-C-Syntax-AST.html#t:CDeclSpec">CDeclSpec</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:VarDeclInfo">VarDeclInfo</a> = <a href="#v:VarDeclInfo">VarDeclInfo</a> <a href="Language-C-Analysis-SemRep.html#t:VarName">VarName</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> <a href="Language-C-Analysis-DeclAnalysis.html#t:StorageSpec">StorageSpec</a> <a href="Language-C-Analysis-SemRep.html#t:Attributes">Attributes</a> <a href="Language-C-Analysis-SemRep.html#t:Type">Type</a> <a href="Language-C-Data-Node.html#t:NodeInfo">NodeInfo</a></li><li class="src short"><a href="#v:tAttr">tAttr</a> :: (<a href="Language-C-Analysis-TravMonad.html#t:MonadCError">MonadCError</a> m, <a href="Language-C-Analysis-TravMonad.html#t:MonadSymtab">MonadSymtab</a> m) => <a href="Language-C-Syntax-AST.html#t:CAttr">CAttr</a> -> m <a href="Language-C-Analysis-SemRep.html#t:Attr">Attr</a></li><li class="src short"><a href="#v:mkVarName">mkVarName</a> :: (<a href="Language-C-Analysis-TravMonad.html#t:MonadCError">MonadCError</a> m, <a href="Language-C-Analysis-TravMonad.html#t:MonadSymtab">MonadSymtab</a> m) => <a href="Language-C-Data-Node.html#t:NodeInfo">NodeInfo</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Language-C-Data-Ident.html#t:Ident">Ident</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Language-C-Analysis-SemRep.html#t:AsmName">AsmName</a> -> m <a href="Language-C-Analysis-SemRep.html#t:VarName">VarName</a></li><li class="src short"><a href="#v:getOnlyDeclr">getOnlyDeclr</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadCError">MonadCError</a> m => <a href="Language-C-Syntax-AST.html#t:CDecl">CDecl</a> -> m <a href="Language-C-Syntax-AST.html#t:CDeclr">CDeclr</a></li><li class="src short"><a href="#v:nameOfDecl">nameOfDecl</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadCError">MonadCError</a> m => <a href="Language-C-Syntax-AST.html#t:CDecl">CDecl</a> -> m <a href="Language-C-Data-Ident.html#t:Ident">Ident</a></li><li class="src short"><a href="#v:analyseVarDecl">analyseVarDecl</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadTrav">MonadTrav</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> [<a href="Language-C-Syntax-AST.html#t:CStorageSpec">CStorageSpec</a>] -> [<a href="Language-C-Syntax-AST.html#t:CAttr">CAttr</a>] -> [<a href="Language-C-Syntax-AST.html#t:CTypeQual">CTypeQual</a>] -> <a href="Language-C-Analysis-DeclAnalysis.html#t:TypeSpecAnalysis">TypeSpecAnalysis</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> <a href="Language-C-Syntax-AST.html#t:CDeclr">CDeclr</a> -> [<a href="Language-C-Syntax-AST.html#t:CDecl">CDecl</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Language-C-Syntax-AST.html#t:CInit">CInit</a> -> m <a href="Language-C-Analysis-DeclAnalysis.html#t:VarDeclInfo">VarDeclInfo</a></li><li class="src short"><a href="#v:analyseVarDecl-39-">analyseVarDecl'</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadTrav">MonadTrav</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> [<a href="Language-C-Syntax-AST.html#t:CDeclSpec">CDeclSpec</a>] -> <a href="Language-C-Syntax-AST.html#t:CDeclr">CDeclr</a> -> [<a href="Language-C-Syntax-AST.html#t:CDecl">CDecl</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Language-C-Syntax-AST.html#t:CInit">CInit</a> -> m <a href="Language-C-Analysis-DeclAnalysis.html#t:VarDeclInfo">VarDeclInfo</a></li></ul></div><div id="interface"><h1 id="g:1">Translating types
</h1><div class="top"><p class="src"><a name="v:analyseTypeDecl" class="def">analyseTypeDecl</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadTrav">MonadTrav</a> m => <a href="Language-C-Syntax-AST.html#t:CDecl">CDecl</a> -> m <a href="Language-C-Analysis-SemRep.html#t:Type">Type</a><a href="src/Language-C-Analysis-DeclAnalysis.html#analyseTypeDecl" class="link">Source</a></p><div class="doc"><p>get the type of a <em>type declaration</em>
</p><p>A type declaration <code>T</code> may appear in thre forms:
</p><ul><li><pre>typeof(T)</pre></li><li> as abstract declarator in a function prototype, as in <code>f(int)</code>
</li><li> in a declaration without declarators, as in <code>struct x { int a } ;</code>
</li></ul><p>Currently, <code>analyseTypeDecl</code> is exlusively used for analysing types for GNU's <code>typeof(T)</code>.
</p><p>We move attributes to the type, as they have no meaning for the abstract declarator
</p></div></div><div class="top"><p class="src"><a name="v:tType" class="def">tType</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadTrav">MonadTrav</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> <a href="Language-C-Data-Node.html#t:NodeInfo">NodeInfo</a> -> [<a href="Language-C-Syntax-AST.html#t:CTypeQual">CTypeQual</a>] -> <a href="Language-C-Analysis-DeclAnalysis.html#t:TypeSpecAnalysis">TypeSpecAnalysis</a> -> [<a href="Language-C-Syntax-AST.html#t:CDerivedDeclr">CDerivedDeclr</a>] -> [<a href="Language-C-Syntax-AST.html#t:CDecl">CDecl</a>] -> m <a href="Language-C-Analysis-SemRep.html#t:Type">Type</a><a href="src/Language-C-Analysis-DeclAnalysis.html#tType" class="link">Source</a></p><div class="doc"><p>translate a type
</p></div></div><div class="top"><p class="src"><a name="v:tDirectType" class="def">tDirectType</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadTrav">MonadTrav</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> <a href="Language-C-Data-Node.html#t:NodeInfo">NodeInfo</a> -> [<a href="Language-C-Syntax-AST.html#t:CTypeQual">CTypeQual</a>] -> <a href="Language-C-Analysis-DeclAnalysis.html#t:TypeSpecAnalysis">TypeSpecAnalysis</a> -> m <a href="Language-C-Analysis-SemRep.html#t:Type">Type</a><a href="src/Language-C-Analysis-DeclAnalysis.html#tDirectType" class="link">Source</a></p><div class="doc"><p>translate a type without (syntactic) indirections
Due to the GNU <code>typeof</code> extension and typeDefs, this can be an arbitrary type
</p></div></div><div class="top"><p class="src"><a name="v:tNumType" class="def">tNumType</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadCError">MonadCError</a> m => <a href="Language-C-Analysis-DeclAnalysis.html#t:NumTypeSpec">NumTypeSpec</a> -> m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> (<a href="Language-C-Analysis-SemRep.html#t:FloatType">FloatType</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a>) <a href="Language-C-Analysis-SemRep.html#t:IntType">IntType</a>)<a href="src/Language-C-Analysis-DeclAnalysis.html#tNumType" class="link">Source</a></p><div class="doc"><p>Mapping from num type specs to C types (C99 6.7.2-2), ignoring the complex qualifier.
</p></div></div><div class="top"><p class="src"><a name="v:tArraySize" class="def">tArraySize</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadTrav">MonadTrav</a> m => <a href="Language-C-Syntax-AST.html#t:CArrSize">CArrSize</a> -> m <a href="Language-C-Analysis-SemRep.html#t:ArraySize">ArraySize</a><a href="src/Language-C-Analysis-DeclAnalysis.html#tArraySize" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:tTypeQuals" class="def">tTypeQuals</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadTrav">MonadTrav</a> m => [<a href="Language-C-Syntax-AST.html#t:CTypeQual">CTypeQual</a>] -> m (<a href="Language-C-Analysis-SemRep.html#t:TypeQuals">TypeQuals</a>, <a href="Language-C-Analysis-SemRep.html#t:Attributes">Attributes</a>)<a href="src/Language-C-Analysis-DeclAnalysis.html#tTypeQuals" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:mergeOldStyle" class="def">mergeOldStyle</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadCError">MonadCError</a> m => <a href="Language-C-Data-Node.html#t:NodeInfo">NodeInfo</a> -> [<a href="Language-C-Syntax-AST.html#t:CDecl">CDecl</a>] -> [<a href="Language-C-Syntax-AST.html#t:CDerivedDeclr">CDerivedDeclr</a>] -> m [<a href="Language-C-Syntax-AST.html#t:CDerivedDeclr">CDerivedDeclr</a>]<a href="src/Language-C-Analysis-DeclAnalysis.html#mergeOldStyle" class="link">Source</a></p><div class="doc"><p>convert old style parameters
</p><p>This requires matching parameter names and declarations, as in the following example:
</p><pre> int f(d,c,a,b)
char a,*b;
int c;
{ }
</pre><p>is converted to
</p><pre> int f(int d, int c, char a, char* b)
</pre><p>TODO: This could be moved to syntax, as it operates on the AST only
</p></div></div><h1 id="g:2">Dissecting type specs
</h1><div class="top"><p class="src"><a name="v:canonicalTypeSpec" class="def">canonicalTypeSpec</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadTrav">MonadTrav</a> m => [<a href="Language-C-Syntax-AST.html#t:CTypeSpec">CTypeSpec</a>] -> m <a href="Language-C-Analysis-DeclAnalysis.html#t:TypeSpecAnalysis">TypeSpecAnalysis</a><a href="src/Language-C-Analysis-DeclAnalysis.html#canonicalTypeSpec" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:NumBaseType" class="def">NumBaseType</a> <a href="src/Language-C-Analysis-DeclAnalysis.html#NumBaseType" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:NoBaseType" class="def">NoBaseType</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:BaseChar" class="def">BaseChar</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:BaseInt" class="def">BaseInt</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:BaseFloat" class="def">BaseFloat</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:BaseDouble" class="def">BaseDouble</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:NumBaseType" class="caption collapser" onclick="toggleSection('i:NumBaseType')">Instances</p><div id="section.i:NumBaseType" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> <a href="Language-C-Analysis-DeclAnalysis.html#t:NumBaseType">NumBaseType</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> <a href="Language-C-Analysis-DeclAnalysis.html#t:NumBaseType">NumBaseType</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:SignSpec" class="def">SignSpec</a> <a href="src/Language-C-Analysis-DeclAnalysis.html#SignSpec" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:NoSignSpec" class="def">NoSignSpec</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Signed" class="def">Signed</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Unsigned" class="def">Unsigned</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:SignSpec" class="caption collapser" onclick="toggleSection('i:SignSpec')">Instances</p><div id="section.i:SignSpec" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> <a href="Language-C-Analysis-DeclAnalysis.html#t:SignSpec">SignSpec</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> <a href="Language-C-Analysis-DeclAnalysis.html#t:SignSpec">SignSpec</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:SizeMod" class="def">SizeMod</a> <a href="src/Language-C-Analysis-DeclAnalysis.html#SizeMod" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:NoSizeMod" class="def">NoSizeMod</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:ShortMod" class="def">ShortMod</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:LongMod" class="def">LongMod</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:LongLongMod" class="def">LongLongMod</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:SizeMod" class="caption collapser" onclick="toggleSection('i:SizeMod')">Instances</p><div id="section.i:SizeMod" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> <a href="Language-C-Analysis-DeclAnalysis.html#t:SizeMod">SizeMod</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> <a href="Language-C-Analysis-DeclAnalysis.html#t:SizeMod">SizeMod</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:NumTypeSpec" class="def">NumTypeSpec</a> <a href="src/Language-C-Analysis-DeclAnalysis.html#NumTypeSpec" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:NumTypeSpec" class="def">NumTypeSpec</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:base" class="def">base</a> :: <a href="Language-C-Analysis-DeclAnalysis.html#t:NumBaseType">NumBaseType</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:signSpec" class="def">signSpec</a> :: <a href="Language-C-Analysis-DeclAnalysis.html#t:SignSpec">SignSpec</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:sizeMod" class="def">sizeMod</a> :: <a href="Language-C-Analysis-DeclAnalysis.html#t:SizeMod">SizeMod</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:isComplex" class="def">isComplex</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:TypeSpecAnalysis" class="def">TypeSpecAnalysis</a> <a href="src/Language-C-Analysis-DeclAnalysis.html#TypeSpecAnalysis" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:TSNone" class="def">TSNone</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:TSVoid" class="def">TSVoid</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:TSBool" class="def">TSBool</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:TSNum" class="def">TSNum</a> <a href="Language-C-Analysis-DeclAnalysis.html#t:NumTypeSpec">NumTypeSpec</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:TSTypeDef" class="def">TSTypeDef</a> <a href="Language-C-Analysis-SemRep.html#t:TypeDefRef">TypeDefRef</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:TSType" class="def">TSType</a> <a href="Language-C-Analysis-SemRep.html#t:Type">Type</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:TSNonBasic" class="def">TSNonBasic</a> <a href="Language-C-Syntax-AST.html#t:CTypeSpec">CTypeSpec</a></td><td class="doc empty"> </td></tr></table></div></div><div class="top"><p class="src"><a name="v:canonicalStorageSpec" class="def">canonicalStorageSpec</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadCError">MonadCError</a> m => [<a href="Language-C-Syntax-AST.html#t:CStorageSpec">CStorageSpec</a>] -> m <a href="Language-C-Analysis-DeclAnalysis.html#t:StorageSpec">StorageSpec</a><a href="src/Language-C-Analysis-DeclAnalysis.html#canonicalStorageSpec" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:StorageSpec" class="def">StorageSpec</a> <a href="src/Language-C-Analysis-DeclAnalysis.html#StorageSpec" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:NoStorageSpec" class="def">NoStorageSpec</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:AutoSpec" class="def">AutoSpec</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:RegSpec" class="def">RegSpec</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:ThreadSpec" class="def">ThreadSpec</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:StaticSpec" class="def">StaticSpec</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:ExternSpec" class="def">ExternSpec</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:StorageSpec" class="caption collapser" onclick="toggleSection('i:StorageSpec')">Instances</p><div id="section.i:StorageSpec" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> <a href="Language-C-Analysis-DeclAnalysis.html#t:StorageSpec">StorageSpec</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> <a href="Language-C-Analysis-DeclAnalysis.html#t:StorageSpec">StorageSpec</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Read.html#t:Read">Read</a> <a href="Language-C-Analysis-DeclAnalysis.html#t:StorageSpec">StorageSpec</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Language-C-Analysis-DeclAnalysis.html#t:StorageSpec">StorageSpec</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:hasThreadLocalSpec" class="def">hasThreadLocalSpec</a> :: <a href="Language-C-Analysis-DeclAnalysis.html#t:StorageSpec">StorageSpec</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Language-C-Analysis-DeclAnalysis.html#hasThreadLocalSpec" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:isTypeDef" class="def">isTypeDef</a> :: [<a href="Language-C-Syntax-AST.html#t:CDeclSpec">CDeclSpec</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Language-C-Analysis-DeclAnalysis.html#isTypeDef" class="link">Source</a></p></div><h1 id="g:3">Helpers
</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:VarDeclInfo" class="def">VarDeclInfo</a> <a href="src/Language-C-Analysis-DeclAnalysis.html#VarDeclInfo" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:VarDeclInfo" class="def">VarDeclInfo</a> <a href="Language-C-Analysis-SemRep.html#t:VarName">VarName</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> <a href="Language-C-Analysis-DeclAnalysis.html#t:StorageSpec">StorageSpec</a> <a href="Language-C-Analysis-SemRep.html#t:Attributes">Attributes</a> <a href="Language-C-Analysis-SemRep.html#t:Type">Type</a> <a href="Language-C-Data-Node.html#t:NodeInfo">NodeInfo</a></td><td class="doc empty"> </td></tr></table></div></div><div class="top"><p class="src"><a name="v:tAttr" class="def">tAttr</a> :: (<a href="Language-C-Analysis-TravMonad.html#t:MonadCError">MonadCError</a> m, <a href="Language-C-Analysis-TravMonad.html#t:MonadSymtab">MonadSymtab</a> m) => <a href="Language-C-Syntax-AST.html#t:CAttr">CAttr</a> -> m <a href="Language-C-Analysis-SemRep.html#t:Attr">Attr</a><a href="src/Language-C-Analysis-DeclAnalysis.html#tAttr" class="link">Source</a></p><div class="doc"><p>translate <code>__attribute__</code> annotations
TODO: This is a unwrap and wrap stub
</p></div></div><div class="top"><p class="src"><a name="v:mkVarName" class="def">mkVarName</a> :: (<a href="Language-C-Analysis-TravMonad.html#t:MonadCError">MonadCError</a> m, <a href="Language-C-Analysis-TravMonad.html#t:MonadSymtab">MonadSymtab</a> m) => <a href="Language-C-Data-Node.html#t:NodeInfo">NodeInfo</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Language-C-Data-Ident.html#t:Ident">Ident</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Language-C-Analysis-SemRep.html#t:AsmName">AsmName</a> -> m <a href="Language-C-Analysis-SemRep.html#t:VarName">VarName</a><a href="src/Language-C-Analysis-DeclAnalysis.html#mkVarName" class="link">Source</a></p><div class="doc"><p>construct a name for a variable
TODO: more or less bogus
</p></div></div><div class="top"><p class="src"><a name="v:getOnlyDeclr" class="def">getOnlyDeclr</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadCError">MonadCError</a> m => <a href="Language-C-Syntax-AST.html#t:CDecl">CDecl</a> -> m <a href="Language-C-Syntax-AST.html#t:CDeclr">CDeclr</a><a href="src/Language-C-Analysis-DeclAnalysis.html#getOnlyDeclr" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:nameOfDecl" class="def">nameOfDecl</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadCError">MonadCError</a> m => <a href="Language-C-Syntax-AST.html#t:CDecl">CDecl</a> -> m <a href="Language-C-Data-Ident.html#t:Ident">Ident</a><a href="src/Language-C-Analysis-DeclAnalysis.html#nameOfDecl" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:analyseVarDecl" class="def">analyseVarDecl</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadTrav">MonadTrav</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> [<a href="Language-C-Syntax-AST.html#t:CStorageSpec">CStorageSpec</a>] -> [<a href="Language-C-Syntax-AST.html#t:CAttr">CAttr</a>] -> [<a href="Language-C-Syntax-AST.html#t:CTypeQual">CTypeQual</a>] -> <a href="Language-C-Analysis-DeclAnalysis.html#t:TypeSpecAnalysis">TypeSpecAnalysis</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> <a href="Language-C-Syntax-AST.html#t:CDeclr">CDeclr</a> -> [<a href="Language-C-Syntax-AST.html#t:CDecl">CDecl</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Language-C-Syntax-AST.html#t:CInit">CInit</a> -> m <a href="Language-C-Analysis-DeclAnalysis.html#t:VarDeclInfo">VarDeclInfo</a><a href="src/Language-C-Analysis-DeclAnalysis.html#analyseVarDecl" class="link">Source</a></p><div class="doc"><p>analyse declarators
</p></div></div><div class="top"><p class="src"><a name="v:analyseVarDecl-39-" class="def">analyseVarDecl'</a> :: <a href="Language-C-Analysis-TravMonad.html#t:MonadTrav">MonadTrav</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> [<a href="Language-C-Syntax-AST.html#t:CDeclSpec">CDeclSpec</a>] -> <a href="Language-C-Syntax-AST.html#t:CDeclr">CDeclr</a> -> [<a href="Language-C-Syntax-AST.html#t:CDecl">CDecl</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Language-C-Syntax-AST.html#t:CInit">CInit</a> -> m <a href="Language-C-Analysis-DeclAnalysis.html#t:VarDeclInfo">VarDeclInfo</a><a href="src/Language-C-Analysis-DeclAnalysis.html#analyseVarDecl%27" class="link">Source</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>
|