summaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorbjorn <bjorn@bringert.net>2008-08-18 20:20:32 +0000
committerbjorn <bjorn@bringert.net>2008-08-18 20:20:32 +0000
commitc6c9028022f3b05ceacc31d72877ccac3789f53d (patch)
treef403f96362ed9203d96a0831c498195d258f1005 /src/server
parentdc1db399f698ec80ca80cf2e0925239527087a01 (diff)
Sort languages in fastcgi /languages output.
Diffstat (limited to 'src/server')
-rw-r--r--src/server/MainFastCGI.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/MainFastCGI.hs b/src/server/MainFastCGI.hs
index 5987f1e6d..88178b017 100644
--- a/src/server/MainFastCGI.hs
+++ b/src/server/MainFastCGI.hs
@@ -12,6 +12,7 @@ import Control.Exception
import Control.Monad
import Data.Dynamic
import Data.Maybe
+import Data.List
grammarFile :: FilePath
@@ -92,7 +93,7 @@ linearize' pgf mto tree =
Just to -> [(to,PGF.linearize pgf to tree)]
listLanguages :: PGF -> [(PGF.Language,JSObject JSValue)]
-listLanguages pgf = [(l,toJSObject (info l)) | l <- PGF.languages pgf]
+listLanguages pgf = [(l,toJSObject (info l)) | l <- sort (PGF.languages pgf)]
where info l = [("languageCode", showJSON (fromMaybe "" (PGF.languageCode pgf l))),
("canParse", showJSON (PGF.canParse pgf l))]