diff options
| author | aarne <unknown> | 2005-10-31 18:02:34 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2005-10-31 18:02:34 +0000 |
| commit | f06638cc7d90eb8298180d36e79fc292a9f898dc (patch) | |
| tree | b33a7459a5e777a319c3d85dbf21da62b8a34358 /src/GF/Compile/ShellState.hs | |
| parent | 94f87d85023fc9b0e759600435e3c85cf31e3bc4 (diff) | |
probabilities in ShellState
Diffstat (limited to 'src/GF/Compile/ShellState.hs')
| -rw-r--r-- | src/GF/Compile/ShellState.hs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/GF/Compile/ShellState.hs b/src/GF/Compile/ShellState.hs index e00e2e477..2d87bdf67 100644 --- a/src/GF/Compile/ShellState.hs +++ b/src/GF/Compile/ShellState.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/10/30 23:44:00 $ +-- > CVS $Date: 2005/10/31 19:02:35 $ -- > CVS $Author: aarne $ --- > CVS $Revision: 1.49 $ +-- > CVS $Revision: 1.50 $ -- -- (Description of the module) ----------------------------------------------------------------------------- @@ -462,6 +462,13 @@ abstractOfState = maybe emptyAbstractST id . maybeStateAbstract stateIsWord :: StateGrammar -> String -> Bool stateIsWord sg = isKnownWord (stateMorpho sg) +addProbs :: (Ident,Probs) -> ShellState -> Err ShellState +addProbs ip@(lang,probs) + sh@(ShSt x y cs ms ss cfs old_pis mcfgs cfgs pinfos mos pbs os rs acs s) = do + let gr = grammarOfLang sh lang + probs' <- checkGrammarProbs gr probs + let pbs' = (lang,probs') : filter ((/= lang) . fst) pbs + return (ShSt x y cs ms ss cfs old_pis mcfgs cfgs pinfos mos pbs' os rs acs s) {- |
