mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 09:28:54 -06:00
minimized the number of disambiguating forms of function names in MkMorphodict.hs even more
This commit is contained in:
@@ -147,9 +147,13 @@ mkMorphoDict env =
|
|||||||
shrink fls = case fls of
|
shrink fls = case fls of
|
||||||
fl@(_:_):_ | all ((==head fl) . head) fls -> shrink (map tail fls)
|
fl@(_:_):_ | all ((==head fl) . head) fls -> shrink (map tail fls)
|
||||||
fl@(_:_):_ | all ((==last fl) . last) fls -> shrink (map init fls)
|
fl@(_:_):_ | all ((==last fl) . last) fls -> shrink (map init fls)
|
||||||
|
_ -> shrinkMore fls
|
||||||
|
|
||||||
|
shrinkMore fls = case fls of
|
||||||
|
_ | length (nub (map init fls)) == length fls -> shrinkMore (map init fls)
|
||||||
|
_ | length (nub (map tail fls)) == length fls -> shrinkMore (map tail fls)
|
||||||
_ -> fls
|
_ -> fls
|
||||||
|
|
||||||
formlists fls = [wfs | (_:ws,fs) <- map (snd . snd) fls, let wfs = ws ++ fs]
|
|
||||||
|
|
||||||
mkFun = showCId . mkCId . concat . intersperse "_"
|
mkFun = showCId . mkCId . concat . intersperse "_"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user