From 465a1919d694caf56052b21431c419f74a5f0105 Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Tue, 15 Sep 2026 10:45:59 +0200 Subject: [PATCH] implement missingLins --- src/runtime/haskell/PGF.hs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/runtime/haskell/PGF.hs b/src/runtime/haskell/PGF.hs index b8fd025be..309959555 100644 --- a/src/runtime/haskell/PGF.hs +++ b/src/runtime/haskell/PGF.hs @@ -37,7 +37,7 @@ module PGF( categories, categoryContext, PGF2.startCat, -- * Functions - functions, functionsByCat, functionType, + functions, functionsByCat, functionType, missingLins, -- * Expressions & Trees -- ** Tree @@ -349,6 +349,14 @@ functionsByCat gr (CId fun) = map CId (PGF2.functionsByCat gr fun) functionType :: PGF -> CId -> Maybe Type functionType gr (CId fun) = PGF2.functionType gr fun +-- | List of functions that lack linearizations in the given language. +missingLins :: PGF -> Language -> [CId] +missingLins gr (CId lang) = + case Map.lookup lang (PGF2.languages gr) of + Just cnc -> [CId c | c <- PGF2.functions gr, PGF2.hasLinearization cnc c] + Nothing -> error ("Unknown language: " ++ lang) + + type LIndex= String type Token = String