summaryrefslogtreecommitdiff
path: root/src/GF/Conversion/MCFGtoCFG.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Conversion/MCFGtoCFG.hs')
-rw-r--r--src/GF/Conversion/MCFGtoCFG.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/GF/Conversion/MCFGtoCFG.hs b/src/GF/Conversion/MCFGtoCFG.hs
index c12bb6b53..2b86b633a 100644
--- a/src/GF/Conversion/MCFGtoCFG.hs
+++ b/src/GF/Conversion/MCFGtoCFG.hs
@@ -4,9 +4,9 @@
-- Stability : (stable)
-- Portability : (portable)
--
--- > CVS $Date: 2005/04/11 13:52:48 $
+-- > CVS $Date: 2005/04/12 10:49:44 $
-- > CVS $Author: peb $
--- > CVS $Revision: 1.1 $
+-- > CVS $Revision: 1.2 $
--
-- Converting MCFG grammars to (possibly overgenerating) CFG
-----------------------------------------------------------------------------
@@ -30,11 +30,12 @@ convertGrammar gram = tracePrt "#context-free rules" (prt.length) $
concatMap convertRule gram
convertRule :: MRule -> [CRule]
-convertRule (Rule (Abs cat args name) (Cnc _ _ record))
- = [ CFRule (CCat cat lbl) rhs (CName name profile) |
+convertRule (Rule (Abs cat args (Name fun mprofile)) (Cnc _ _ record))
+ = [ CFRule (CCat cat lbl) rhs (Name fun profile) |
Lin lbl lin <- record,
let rhs = map (mapSymbol convertArg id) lin,
- let profile = map (argPlaces lin) [0 .. length args-1]
+ let cprofile = map (Unify . argPlaces lin) [0 .. length args-1],
+ let profile = mprofile `composeProfiles` cprofile
]
convertArg :: (MCat, MLabel, Int) -> CCat