PGF.hs: export function missingLins

Also in Commands.hs: be explicit about things imported from the PGF library
that are not in the public API.
Also a couple of haddock documentation fixes.
This commit is contained in:
hallgren
2013-04-08 15:38:11 +00:00
parent 35b47968d2
commit b8ce5ef5b3
3 changed files with 14 additions and 13 deletions

View File

@@ -35,7 +35,7 @@ module PGF(
categories, startCat,
-- * Functions
functions, functionsByCat, functionType,
functions, functionsByCat, functionType, missingLins,
-- * Expressions & Trees
-- ** Tree
@@ -132,7 +132,7 @@ module PGF(
showProbabilities,
readProbabilitiesFromFile,
-- ** SortTop
-- -- ** SortTop
-- forExample,
-- * Browsing

View File

@@ -69,12 +69,13 @@ functionsToCat pgf cat =
where
(_,fs,_) = lookMap ([],[],0) cat $ cats $ abstract pgf
missingLins :: PGF -> CId -> [CId]
-- | List of functions that lack linearizations in the given language.
missingLins :: PGF -> Language -> [CId]
missingLins pgf lang = [c | c <- fs, not (hasl c)] where
fs = Map.keys $ funs $ abstract pgf
hasl = hasLin pgf lang
hasLin :: PGF -> CId -> CId -> Bool
hasLin :: PGF -> Language -> CId -> Bool
hasLin pgf lang f = Map.member f $ lproductions $ lookConcr pgf lang
restrictPGF :: (CId -> Bool) -> PGF -> PGF