summaryrefslogtreecommitdiff
path: root/src/PGF/Macros.hs
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2009-07-05 15:44:52 +0000
committerkrasimir <krasimir@chalmers.se>2009-07-05 15:44:52 +0000
commit279ff9a6d28c87e1a6c105d9d33df2511fb8f132 (patch)
treea31ecbb34830c6566eb556e6aefaccb1551eabf7 /src/PGF/Macros.hs
parent3394c171edf60bf21d46e628032c3369a4ee10b3 (diff)
PGF.Type.Hypo now can represent explicit and implicit arguments and argument without bound variable
Diffstat (limited to 'src/PGF/Macros.hs')
-rw-r--r--src/PGF/Macros.hs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/PGF/Macros.hs b/src/PGF/Macros.hs
index fe00f4ff7..5d8600090 100644
--- a/src/PGF/Macros.hs
+++ b/src/PGF/Macros.hs
@@ -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