summaryrefslogtreecommitdiff
path: root/src/GF
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2005-12-17 20:44:20 +0000
committeraarne <aarne@cs.chalmers.se>2005-12-17 20:44:20 +0000
commit14defedc653f50d11a52cecba13632688d1ec811 (patch)
tree23749f9d5f4c6d33402e9f837e105f70b2f714e5 /src/GF
parentd3157ad7e7a85a78e60a5bc406ec6cc805037e06 (diff)
tutorial; mkMorpho bug fix
Diffstat (limited to 'src/GF')
-rw-r--r--src/GF/UseGrammar/Morphology.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/GF/UseGrammar/Morphology.hs b/src/GF/UseGrammar/Morphology.hs
index 626269836..8b9935c23 100644
--- a/src/GF/UseGrammar/Morphology.hs
+++ b/src/GF/UseGrammar/Morphology.hs
@@ -23,6 +23,7 @@ import GF.Canon.AbsGFC
import GF.Canon.GFC
import GF.Grammar.PrGrammar
import GF.Canon.CMacros
+import GF.Canon.Look
import GF.Grammar.LookAbs
import GF.Infra.Ident
import qualified GF.Grammar.Macros as M
@@ -63,13 +64,15 @@ isKnownWord mo = not . null . snd . appMorphoOnly mo
mkMorpho :: CanonGrammar -> Ident -> Morpho
mkMorpho gr a = tcompile $ concatMap mkOne $ allItems where
+ comp = ccompute gr [] -- to undo 'values' optimization
+
mkOne (Left (fun,c)) = map (prOne fun c) $ allLins fun
mkOne (Right (fun,_)) = map (prSyn fun) $ allSyns fun
-- gather forms of lexical items
allLins fun@(m,f) = errVal [] $ do
ts <- allLinsOfFun gr (CIQ a f)
- ss <- mapM (mapPairsM (mapPairsM (return . wordsInTerm))) ts
+ ss <- mapM (mapPairsM (mapPairsM (liftM wordsInTerm . comp))) ts
return [(p,s) | (p,fs) <- concat $ map snd $ concat ss, s <- fs]
prOne (_,f) c (ps,s) = (s, [prt f +++ tagPrt c +++ unwords (map prt_ ps)])