Skip to content

Commit

Permalink
Add prettyLanguage
Browse files Browse the repository at this point in the history
  • Loading branch information
UnkindPartition committed May 21, 2013
1 parent 71dd3a0 commit 97dcfe7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Language/Haskell/Exts/Extension.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module Language.Haskell.Exts.Extension (
Language(..),
knownLanguages,
classifyLanguage,
prettyLanguage,

-- * Extensions
Extension(..), KnownExtension(..),
Expand Down Expand Up @@ -105,6 +106,9 @@ classifyLanguage = \str -> case lookup str langTable of
langTable = [ (show lang, lang)
| lang <- knownLanguages ]

prettyLanguage :: Language -> String
prettyLanguage (UnknownLanguage name) = name
prettyLanguage lang = show lang

-- | This represents language extensions beyond a base 'Language' definition
-- (such as 'Haskell98') that are supported by some implementations, usually
Expand Down

0 comments on commit 97dcfe7

Please sign in to comment.