1
0
forked from GitHub/gf-core

GF shell, show_operations: also show the types of linearization functions

This is a simple change in GF.Grammar.Lookup.allOpers, which is used only in
the implementation of the show_operations command in the shell.

This is useful when importing a concrete syntax (like LexiconEng) as a resource.
However, the types don't always look as nice as I hoped...
This commit is contained in:
hallgren
2012-09-27 15:55:20 +00:00
parent 7e8bab04c5
commit 8154e480dd

View File

@@ -200,10 +200,11 @@ allOpers gr =
]
where
typesIn info = case info of
AbsFun (Just ltyp) _ _ _ -> [ltyp]
ResOper (Just ltyp) _ -> [ltyp]
AbsFun (Just ltyp) _ _ _ -> [ltyp]
ResOper (Just ltyp) _ -> [ltyp]
ResValue ltyp -> [ltyp]
ResOverload _ tytrs -> [ltyp | (ltyp,_) <- tytrs]
CncFun (Just (i,ctx,typ)) _ _ _ -> [L NoLoc (mkProdSimple ctx typ)]
_ -> []
reachable = case greatestResource gr of
Just r -> allExtendSpecs gr r