added the expression type

This commit is contained in:
krangelov
2021-08-06 20:03:22 +02:00
parent 825e8447db
commit 3a7743afad
3 changed files with 102 additions and 3 deletions

View File

@@ -1,6 +1,42 @@
module PGF (PGF2.PGF, readPGF
module PGF ( PGF2.PGF, readPGF
, abstractName
, CId, mkCId, wildCId, showCId, readCId
, categories
, functions, functionsByCat
, PGF2.Expr(..), PGF2.Literal(..), Tree
, PGF2.Type, PGF2.Hypo
) where
import qualified PGF2 as PGF2
newtype CId = CId String deriving (Show,Read,Eq,Ord)
type Language = CId
readPGF = PGF2.readPGF
readLanguage = readCId
showLanguage (CId s) = s
abstractName gr = CId (PGF2.abstractName gr)
categories gr = map CId (PGF2.categories gr)
functions gr = map CId (PGF2.functions gr)
functionsByCat gr (CId c) = map CId (PGF2.functionsByCat gr c)
type Tree = PGF2.Expr
mkCId x = CId x
wildCId = CId "_"
showCId (CId x) = x
readCId s = Just (CId s)