From ebe5b87738e7e2e65e3ae33db040be07da2ef834 Mon Sep 17 00:00:00 2001 From: krasimir Date: Sat, 31 Jul 2010 12:47:10 +0000 Subject: [PATCH] added function unType in PGF --- src/runtime/haskell/PGF.hs | 1 + src/runtime/haskell/PGF/Type.hs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/runtime/haskell/PGF.hs b/src/runtime/haskell/PGF.hs index 3b8eced42..c387521a7 100644 --- a/src/runtime/haskell/PGF.hs +++ b/src/runtime/haskell/PGF.hs @@ -30,6 +30,7 @@ module PGF( Type, Hypo, showType, readType, mkType, mkHypo, mkDepHypo, mkImplHypo, + unType, categories, startCat, -- * Functions diff --git a/src/runtime/haskell/PGF/Type.hs b/src/runtime/haskell/PGF/Type.hs index 70604a123..e3cf46eec 100644 --- a/src/runtime/haskell/PGF/Type.hs +++ b/src/runtime/haskell/PGF/Type.hs @@ -1,6 +1,7 @@ module PGF.Type ( Type(..), Hypo, readType, showType, mkType, mkHypo, mkDepHypo, mkImplHypo, + unType, pType, ppType, ppHypo ) where import PGF.CId @@ -51,6 +52,9 @@ mkDepHypo x ty = (Explicit,x,ty) mkImplHypo :: CId -> Type -> Hypo mkImplHypo x ty = (Implicit,x,ty) +unType :: Type -> ([Hypo], CId, [Expr]) +unType (DTyp hyps cat es) = (hyps, cat, es) + pType :: RP.ReadP Type pType = do RP.skipSpaces