Personal tools

HaskellWiki talk:Syntax highlighting

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(moved from project page)
 
Line 1: Line 1:
 
Question: Would it be possible to have an markup tag, say <code>&lt;haskell-pretty&gt;</code> which would utilize the <code>&lt;math&gt;</code> environment to produce neat looking things like <math>\operatorname{foo} :: \forall \alpha \beta . \alpha \rightarrow \beta</math>, corresponding to <hask>foo :: forall a b. a -> b</hask>. ''&mdash; asks [[User:SebastianSylvan|SebastianSylvan]]''
 
Question: Would it be possible to have an markup tag, say <code>&lt;haskell-pretty&gt;</code> which would utilize the <code>&lt;math&gt;</code> environment to produce neat looking things like <math>\operatorname{foo} :: \forall \alpha \beta . \alpha \rightarrow \beta</math>, corresponding to <hask>foo :: forall a b. a -> b</hask>. ''&mdash; asks [[User:SebastianSylvan|SebastianSylvan]]''
  +
  +
:It may be possible, but there are issues. Bear in mind Haskell type variables can be more than one character: <hask>return :: (Monad monad) => a -> monad a</hask>. I also find the TeX a bit ugly placed in the text.
  +
  +
:An alternative might be to use Unicode more effectively: "foo :: &forall; m a b. (Monad m) &rArr; a &rarr; m b". &mdash;[[User:Ashley Y|Ashley Y]] 23:38, 13 March 2006 (UTC)

Revision as of 23:38, 13 March 2006

Question: Would it be possible to have an markup tag, say <haskell-pretty> which would utilize the <math> environment to produce neat looking things like \operatorname{foo} :: \forall \alpha \beta . \alpha \rightarrow \beta, corresponding to
foo :: forall a b. a -> b
. — asks SebastianSylvan
It may be possible, but there are issues. Bear in mind Haskell type variables can be more than one character:
return :: (Monad monad) => a -> monad a
. I also find the TeX a bit ugly placed in the text.
An alternative might be to use Unicode more effectively: "foo :: ∀ m a b. (Monad m) ⇒ a → m b". —Ashley Y 23:38, 13 March 2006 (UTC)