Module CurryDoc.CDoc

Functions to generate documentation in "CDoc" format.

Author: Sandra Dylus

Version: July 2025

Summary of exported operations:

generateCDoc :: String -> String -> [(SourceLine,String)] -> AnaInfo -> IO String  Non-deterministic 
Generates the documentation of a module in "CDoc" format.
removeForall :: TypeExpr -> TypeExpr  Deterministic 
funcComment :: String -> [(SourceLine,String)] -> String  Deterministic 
dataComment :: String -> [(SourceLine,String)] -> String  Deterministic 
flexRigid :: Rule -> FlexRigidResult  Deterministic 
author :: [(String,String)] -> String  Deterministic 
consSignature :: ConsDecl -> ((String,String),[TypeExpr])  Deterministic 
newconsSignature :: NewConsDecl -> ((String,String),[TypeExpr])  Deterministic 

Exported datatypes:


CurryInfo

The information about a Curry module contains

  • the module information
  • information about the function defined in the module
  • information about types (also newtypes and classes) defined in the module

Constructors:


ModuleInfo

The base information about some module contains

  • the name
  • the author
  • the description

Constructors:

  • ModuleInfo :: String -> String -> String -> ModuleInfo

FunctionInfo

The information about functions defined in a Curry module contains

  • the name
  • the signature
  • the corresponding module
  • the description
  • True if the function is non-deterministically defined
  • the flex/rigid status of the function

Constructors:


TypeInfo

The information about types defined in a Curry module contains

  • the name (which has _Dict# as a prefix if it is a class)
  • a list of constructor names and their argument types (or the type name and the type expression in case of type synonyms)
  • a list of type variables (which is non-empty for a polymorphic type)
  • the corresponding module
  • the description
  • a flag which is True if it is a type synonym

Constructors:


Exported operations:

generateCDoc :: String -> String -> [(SourceLine,String)] -> AnaInfo -> IO String  Non-deterministic 

Generates the documentation of a module in "CDoc" format.

funcComment :: String -> [(SourceLine,String)] -> String  Deterministic 

dataComment :: String -> [(SourceLine,String)] -> String  Deterministic 

author :: [(String,String)] -> String  Deterministic 

consSignature :: ConsDecl -> ((String,String),[TypeExpr])  Deterministic 

newconsSignature :: NewConsDecl -> ((String,String),[TypeExpr])  Deterministic