mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-19 08:02:51 -06:00
PGF.Type.Hypo now can represent explicit and implicit arguments and argument without bound variable
This commit is contained in:
@@ -105,15 +105,20 @@ depth (Fun _ ts) = maximum (0:map depth ts) + 1
|
||||
depth _ = 1
|
||||
|
||||
cftype :: [CId] -> CId -> Type
|
||||
cftype args val = DTyp [Hyp wildCId (cftype [] arg) | arg <- args] val []
|
||||
cftype args val = DTyp [Hyp (cftype [] arg) | arg <- args] val []
|
||||
|
||||
typeOfHypo :: Hypo -> Type
|
||||
typeOfHypo (Hyp ty) = ty
|
||||
typeOfHypo (HypV _ ty) = ty
|
||||
typeOfHypo (HypI _ ty) = ty
|
||||
|
||||
catSkeleton :: Type -> ([CId],CId)
|
||||
catSkeleton ty = case ty of
|
||||
DTyp hyps val _ -> ([valCat ty | Hyp _ ty <- hyps],val)
|
||||
DTyp hyps val _ -> ([valCat (typeOfHypo h) | h <- hyps],val)
|
||||
|
||||
typeSkeleton :: Type -> ([(Int,CId)],CId)
|
||||
typeSkeleton ty = case ty of
|
||||
DTyp hyps val _ -> ([(contextLength ty, valCat ty) | Hyp _ ty <- hyps],val)
|
||||
DTyp hyps val _ -> ([(contextLength ty, valCat ty) | h <- hyps, let ty = typeOfHypo h],val)
|
||||
|
||||
valCat :: Type -> CId
|
||||
valCat ty = case ty of
|
||||
|
||||
Reference in New Issue
Block a user