Some auxiliary operations of CurryDoc to read programs.
Author: Michael Hanus, Jan Tikovsky
Version: November 2017
readModuleComment
:: String -> IO String
Reads the module comment of a Curry source file. |
readComments
:: String -> IO (String,[(SourceLine,String)])
Reads the comments of a source file to be put in the HTML documentation. |
readCategory
:: [String] -> Category
Determine the category for a module |
showCategory
:: Category -> String
Show a category |
getCategoryID
:: Category -> String
ID for a category |
classifyLine
:: String -> SourceLine
|
getFirstId
:: String -> String
|
isIdChar
:: Char -> Bool
|
infixIDs
:: String
|
groupLines
:: [SourceLine] -> (String,[(SourceLine,String)])
|
groupProgLines
:: [SourceLine] -> [(SourceLine,String)]
|
groupComment
:: String -> [SourceLine] -> [(SourceLine,String)]
|
skipFuncDefs
:: String -> [SourceLine] -> [(SourceLine,String)]
|
skipDataDefs
:: String -> [SourceLine] -> [(SourceLine,String)]
|
getFuncComment
:: String -> [(SourceLine,String)] -> String
|
getConsComment
:: [String] -> String -> Maybe (String,String)
|
getDataComment
:: String -> [(SourceLine,String)] -> String
|
getCommentType
:: Eq a => a -> [(a,b)] -> [b]
|
splitComment
:: String -> (String,[(String,String)])
|
splitCommentMain
:: [String] -> (String,[(String,String)])
|
splitCommentParams
:: String -> String -> [String] -> [(String,String)]
|
isFunctionType
:: TypeExpr -> Bool
|
skipWhiteSpace
:: String -> String
|
isWhiteSpace
:: Char -> Bool
|
showId
:: String -> String
|
brackets
:: Bool -> String -> String
|
getLastName
:: String -> String
|
This datatype is used to classify all input lines.
Constructors:
Comment
:: String -> SourceLine
: a comment for CurryDoc
FuncDef
:: String -> SourceLine
: a definition of a function
DataDef
:: String -> SourceLine
: a definition of a datatype
ModDef
:: SourceLine
: a line containing a module definition
OtherLine
:: SourceLine
: a line not relevant for CurryDoc
This datatype is used to categorize Curry libraries
Constructors:
General
:: Category
: a general library
Algorithm
:: Category
: a library which provides data structures and algorithms
Database
:: Category
: a library for database access
Web
:: Category
: a library for web applications
Meta
:: Category
: a library for meta-programming
Type synonym: ModInfo = (Category,String,String)
Reads the module comment of a Curry source file. |
Reads the comments of a source file to be put in the HTML documentation. Returns the module comment and the list of (Func/DataDef,comment) pairs. |
Determine the category for a module |
Show a category
|
ID for a category
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|