From c26ec2c9e869155c7d99485a4745d0da12c9a6a9 Mon Sep 17 00:00:00 2001 From: defanor Date: Sun, 24 Dec 2017 10:19:04 +0300 Subject: Document the 'Usage' type. --- Coalpit/Core.hs | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 -- cgit v1.2.3