diff options
author | defanor <defanor@uberspace.net> | 2017-12-24 10:19:04 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2017-12-24 10:22:25 +0300 |
commit | c26ec2c9e869155c7d99485a4745d0da12c9a6a9 (patch) | |
tree | bed72d547ff03989a52f58d1540d8a5d8a5708f1 /Coalpit | |
parent | 2581f4b9a61d8ca4c782269886c30b3cc433d85d (diff) |
Document the 'Usage' type.
Diffstat (limited to 'Coalpit')
-rw-r--r-- | Coalpit/Core.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Coalpit/Core.hs b/Coalpit/Core.hs index 0e10757..e166af9 100644 --- a/Coalpit/Core.hs +++ b/Coalpit/Core.hs @@ -50,14 +50,26 @@ import Network.URI (URI, parseURIReference, uriToString) import Coalpit.Parsing +-- | Usage description: can be translated into help messages or +-- documentation formats. data Usage = UConstructor String + -- ^ Data constructor. | URecursive String + -- ^ Constructor of a recursive data structure (its second + -- appearance in the tree). | USelector String Usage + -- ^ Record selector. | UOptional Usage + -- ^ Optional element. | USum Usage Usage + -- ^ Sum. | UProduct Usage Usage + -- ^ Product. | UUnit + -- ^ Unit. | UType String + -- ^ Type name, e.g. \"INT\". + deriving (Show) -- | Printing and parsing options. data Options = Options { fieldSeparator :: Char |