diff options
Diffstat (limited to 'src/GF/GFCC/Macros.hs')
| -rw-r--r-- | src/GF/GFCC/Macros.hs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/GF/GFCC/Macros.hs b/src/GF/GFCC/Macros.hs index cfb257ab8..a23c4c021 100644 --- a/src/GF/GFCC/Macros.hs +++ b/src/GF/GFCC/Macros.hs @@ -38,6 +38,20 @@ depth tr = case tr of tree :: Atom -> [Exp] -> Exp tree = DTr [] +cftype :: [CId] -> CId -> Type +cftype args val = DTyp [Hyp wildCId (cftype [] arg) | arg <- args] val [] + +catSkeleton :: Type -> ([CId],CId) +catSkeleton ty = case ty of + DTyp hyps val _ -> ([valCat ty | Hyp _ ty <- hyps],val) + +valCat :: Type -> CId +valCat ty = case ty of + DTyp _ val _ -> val + +wildCId :: CId +wildCId = CId "_" + exp0 :: Exp exp0 = Tr (AM 0) [] |
