1
0
forked from GitHub/gf-core

new languages in resource Make; moved GF-specific stuff from Quiz

This commit is contained in:
aarne
2008-06-16 11:15:38 +00:00
parent f6ef4e2dfd
commit 361c6cb096
3 changed files with 32 additions and 23 deletions

View File

@@ -454,3 +454,18 @@ allCommands pgf = Map.fromList [
-- ps -f -g s returns g (f s)
stringOps opts s = foldr app s (reverse (map prOpt opts)) where
app f = maybe id id (stringOp f)
translationQuiz :: PGF -> Language -> Language -> Category -> IO ()
translationQuiz pgf ig og cat = do
tts <- translationList pgf ig og cat infinity
mkQuiz "Welcome to GF Translation Quiz." tts
morphologyQuiz :: PGF -> Language -> Category -> IO ()
morphologyQuiz pgf ig cat = do
tts <- morphologyList pgf ig cat infinity
mkQuiz "Welcome to GF Morphology Quiz." tts
-- | the maximal number of precompiled quiz problems
infinity :: Int
infinity = 256