aboutsummaryrefslogtreecommitdiff
path: root/src/HsSyn.lhs
diff options
context:
space:
mode:
authorkrasimir <unknown>2004-07-27 22:59:35 +0000
committerkrasimir <unknown>2004-07-27 22:59:35 +0000
commitf183618bf9c523800ae84d0cb72c65b7ef22aa0b (patch)
tree6e2403e95c9517005e8d59ee4ad5be4cec24b7bf /src/HsSyn.lhs
parent1d7bc432f61f221c16ecf96903a56a7e5724a587 (diff)
[haddock @ 2004-07-27 22:58:23 by krasimir]
Add basic support for Microsoft HTML Help 2.0
Diffstat (limited to 'src/HsSyn.lhs')
-rw-r--r--src/HsSyn.lhs17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/HsSyn.lhs b/src/HsSyn.lhs
index e43826a0..1599365c 100644
--- a/src/HsSyn.lhs
+++ b/src/HsSyn.lhs
@@ -1,5 +1,5 @@
% -----------------------------------------------------------------------------
-% $Id: HsSyn.lhs,v 1.19 2003/11/06 12:39:47 simonmar Exp $
+% $Id: HsSyn.lhs,v 1.20 2004/07/27 22:58:24 krasimir Exp $
%
% (c) The GHC Team, 1997-2002
%
@@ -30,6 +30,8 @@ module HsSyn (
unit_tycon_qname, fun_tycon_qname, list_tycon_qname, tuple_tycon_qname,
unit_tycon, fun_tycon, list_tycon, tuple_tycon,
+ hsIdentifierStr, hsAnchorNameStr, hsNameStr,
+
GenDoc(..), Doc, DocMarkup(..),
markup, mapIdent, idMarkup,
docAppend, docParagraph,
@@ -386,6 +388,19 @@ list_tycon = HsTyCon list_tycon_qname
tuple_tycon :: Int -> HsType
tuple_tycon i = HsTyCon (tuple_tycon_qname i)
+hsIdentifierStr :: HsIdentifier -> String
+hsIdentifierStr (HsIdent str) = str
+hsIdentifierStr (HsSymbol str) = str
+hsIdentifierStr (HsSpecial str) = str
+
+hsAnchorNameStr :: HsName -> String
+hsAnchorNameStr (HsTyClsName id0) = "t:" ++ hsIdentifierStr id0
+hsAnchorNameStr (HsVarName id0) = "v:" ++ hsIdentifierStr id0
+
+hsNameStr :: HsName -> String
+hsNameStr (HsTyClsName id0) = hsIdentifierStr id0
+hsNameStr (HsVarName id0) = hsIdentifierStr id0
+
-- -----------------------------------------------------------------------------
-- Doc strings and formatting