From c369e055597eadcd5b68f966afcc2453f5174a4c Mon Sep 17 00:00:00 2001 From: David Waern Date: Wed, 1 Sep 2010 11:19:21 +0000 Subject: Replace ghci> with >>> in example syntax --- src/Haddock/Backends/Xhtml/DocMarkup.hs | 2 +- src/Haddock/Lex.x | 6 +++--- src/Haddock/Types.hs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Haddock') diff --git a/src/Haddock/Backends/Xhtml/DocMarkup.hs b/src/Haddock/Backends/Xhtml/DocMarkup.hs index b1260a9c..be9ae876 100644 --- a/src/Haddock/Backends/Xhtml/DocMarkup.hs +++ b/src/Haddock/Backends/Xhtml/DocMarkup.hs @@ -69,7 +69,7 @@ parHtmlMarkup ppId isTyCon = Markup { exampleToHtml (Example expression result) = htmlExample where htmlExample = htmlPrompt +++ htmlExpression +++ (toHtml $ unlines result) - htmlPrompt = (thecode . toHtml $ "ghci> ") ! [theclass "prompt"] + htmlPrompt = (thecode . toHtml $ ">>> ") ! [theclass "prompt"] htmlExpression = (strong . thecode . toHtml $ expression ++ "\n") ! [theclass "userinput"] diff --git a/src/Haddock/Lex.x b/src/Haddock/Lex.x index fc3b3d51..4f877fc9 100644 --- a/src/Haddock/Lex.x +++ b/src/Haddock/Lex.x @@ -48,7 +48,7 @@ $ident = [$alphanum \'\_\.\!\#\$\%\&\*\+\/\<\=\>\?\@\\\\\^\|\-\~\:] <0,para> { $ws* \n ; $ws* \> { begin birdtrack } - $ws* ghci \> { strtoken TokExamplePrompt `andBegin` exampleexpr } + $ws* \>\>\> { strtoken TokExamplePrompt `andBegin` exampleexpr } $ws* [\*\-] { token TokBullet `andBegin` string } $ws* \[ { token TokDefStart `andBegin` def } $ws* \( $digit+ \) { token TokNumber `andBegin` string } @@ -59,7 +59,7 @@ $ident = [$alphanum \'\_\.\!\#\$\%\&\*\+\/\<\=\>\?\@\\\\\^\|\-\~\:] -- beginning of a line { $ws* \> { begin birdtrack } - $ws* ghci \> { strtoken TokExamplePrompt `andBegin` exampleexpr } + $ws* \>\>\> { strtoken TokExamplePrompt `andBegin` exampleexpr } $ws* \n { token TokPara `andBegin` para } -- Here, we really want to be able to say -- $ws* (\n | ) { token TokPara `andBegin` para} @@ -74,7 +74,7 @@ $ident = [$alphanum \'\_\.\!\#\$\%\&\*\+\/\<\=\>\?\@\\\\\^\|\-\~\:] { $ws* \n { token TokPara `andBegin` para } - $ws* ghci \> { strtoken TokExamplePrompt `andBegin` exampleexpr } + $ws* \>\>\> { strtoken TokExamplePrompt `andBegin` exampleexpr } () { begin exampleresult } } diff --git a/src/Haddock/Types.hs b/src/Haddock/Types.hs index 3ec37469..33892e49 100644 --- a/src/Haddock/Types.hs +++ b/src/Haddock/Types.hs @@ -296,7 +296,7 @@ data Example = Example exampleToString :: Example -> String exampleToString (Example expression result) = - "ghci> " ++ expression ++ "\n" ++ unlines result + ">>> " ++ expression ++ "\n" ++ unlines result data DocMarkup id a = Markup { -- cgit v1.2.3