Verified Commit 7af404f2 authored by Camil Staps's avatar Camil Staps 🚀

Export strictness

parent 21bc591a
......@@ -139,12 +139,12 @@ derive gDefault TypeDoc
/**
* Convert a ConstructorDoc to a FunctionDoc.
*/
constructorToFunctionDoc :: ConstructorDoc -> FunctionDoc
constructorToFunctionDoc :: !ConstructorDoc -> FunctionDoc
/**
* Convert a FunctionDoc to a ClassMemberDoc.
*/
functionToClassMemberDoc :: FunctionDoc -> ClassMemberDoc
functionToClassMemberDoc :: !FunctionDoc -> ClassMemberDoc
/**
* Add a class member to an existing class definition
......@@ -163,7 +163,7 @@ parseSingleLineDoc :: (String -> String)
/**
* Parse a documentation block. The magic happens in {{`docBlockToDoc`}}.
*/
parseDoc :: String -> Either ParseError (d, [ParseWarning]) | docBlockToDoc{|*|} d
parseDoc :: !String -> Either ParseError (d, [ParseWarning]) | docBlockToDoc{|*|} d
/**
* A documentation block.
......
......@@ -54,7 +54,7 @@ instance docRepresentation TypeDoc where docRepresentation d = d.TypeDoc.represe
derive gDefault Type, TypeRestriction, ModuleDoc, FunctionDoc, ClassMemberDoc,
ConstructorDoc, ClassDoc, TypeDoc
constructorToFunctionDoc :: ConstructorDoc -> FunctionDoc
constructorToFunctionDoc :: !ConstructorDoc -> FunctionDoc
constructorToFunctionDoc d =
{ FunctionDoc
| gDefault{|*|}
......@@ -62,7 +62,7 @@ constructorToFunctionDoc d =
, params = d.ConstructorDoc.params
}
functionToClassMemberDoc :: FunctionDoc -> ClassMemberDoc
functionToClassMemberDoc :: !FunctionDoc -> ClassMemberDoc
functionToClassMemberDoc d =
{ ClassMemberDoc
| description = d.FunctionDoc.description
......@@ -77,7 +77,7 @@ addClassMemberDoc d m = {d & members=d.members ++ [m]}
parseSingleLineDoc :: (String -> String)
parseSingleLineDoc = toString o trim o dropWhile ((==) '*') o fromString
parseDoc :: String -> Either ParseError (d, [ParseWarning]) | docBlockToDoc{|*|} d
parseDoc :: !String -> Either ParseError (d, [ParseWarning]) | docBlockToDoc{|*|} d
parseDoc s = docBlockToDoc{|*|} (Left [s])
generic docBlockToDoc d :: !(Either [String] DocBlock) -> Either ParseError (!d, ![ParseWarning])
......@@ -122,7 +122,7 @@ derive docBlockToDoc ModuleDoc, FunctionDoc, ClassMemberDoc, ConstructorDoc,
:: DocBlock :== [(String, String)]
parseDocBlock :: String -> Either ParseError (DocBlock, [ParseWarning])
parseDocBlock :: !String -> Either ParseError (DocBlock, [ParseWarning])
parseDocBlock b = prepareString b >>= parsef
where
parsef :: [[Char]] -> Either ParseError (DocBlock, [ParseWarning])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment