diff options
| author | krasimir <krasimir@chalmers.se> | 2008-02-14 12:48:41 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2008-02-14 12:48:41 +0000 |
| commit | 5b4a228215062d6c08b7875d69b6dadaa63611f7 (patch) | |
| tree | 2cc99530ae9e4ac5e3ecd2758b030f4cc4ca1bfa /src/GF/Conversion/SimpleToFCFG.hs | |
| parent | 0064b67925af0b1598b18152ee114696e3d222ee (diff) | |
fix the singleton selector generation
Diffstat (limited to 'src/GF/Conversion/SimpleToFCFG.hs')
| -rw-r--r-- | src/GF/Conversion/SimpleToFCFG.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/GF/Conversion/SimpleToFCFG.hs b/src/GF/Conversion/SimpleToFCFG.hs index 664f36f80..a964dfcd8 100644 --- a/src/GF/Conversion/SimpleToFCFG.hs +++ b/src/GF/Conversion/SimpleToFCFG.hs @@ -428,8 +428,8 @@ mkSingletonSelectors cnc_defs term = sels0 loop path st (R record) = List.foldl' (\st (index,term) -> loop (index:path) st term) st (zip [0..] record) loop path st (RP _ t) = loop path st t - loop path (sels,tcss) (C i) = ( sels,map ((,) path) [0..i-1] : tcss) - loop path (sels,tcss) (S _) = (mkSelector [path] tcss0 : sels, tcss) + loop path (sels,tcss) (C i) = ( sels,map ((,) path) [0..i] : tcss) + loop path (sels,tcss) (S _) = (mkSelector [path] tcss0 : sels, tcss) loop path (sels,tcss) (F id) = case Map.lookup id cnc_defs of Just term -> loop path (sels,tcss) term Nothing -> error ("unknown identifier: "++prt id) |
