mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-03 08:12:51 -06:00
redesign the open-literals API
This commit is contained in:
@@ -48,7 +48,7 @@ lookGlobalFlag pgf f = Map.lookup f (gflags pgf)
|
||||
lookAbsFlag :: PGF -> CId -> Maybe Literal
|
||||
lookAbsFlag pgf f = Map.lookup f (aflags (abstract pgf))
|
||||
|
||||
lookConcr :: PGF -> CId -> Concr
|
||||
lookConcr :: PGF -> Language -> Concr
|
||||
lookConcr pgf cnc =
|
||||
lookMap (error $ "Missing concrete syntax: " ++ showCId cnc) cnc $ concretes pgf
|
||||
|
||||
@@ -127,9 +127,6 @@ combinations t = case t of
|
||||
[] -> [[]]
|
||||
aa:uu -> [a:u | a <- aa, u <- combinations uu]
|
||||
|
||||
isLiteralCat :: CId -> Bool
|
||||
isLiteralCat = (`elem` [cidString, cidFloat, cidInt, cidVar])
|
||||
|
||||
cidString = mkCId "String"
|
||||
cidInt = mkCId "Int"
|
||||
cidFloat = mkCId "Float"
|
||||
|
||||
Reference in New Issue
Block a user