summaryrefslogtreecommitdiff
path: root/src/runtime/haskell
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2010-07-31 12:47:10 +0000
committerkrasimir <krasimir@chalmers.se>2010-07-31 12:47:10 +0000
commitb351c9d9ddfddc6d419649b55f516d51cffbe0c6 (patch)
tree8c31c0ccfe85df03a10c5c49e4a40b00539bcc73 /src/runtime/haskell
parentc8acc8fe116b2e967896f7e31586b83bc826de0e (diff)
added function unType in PGF
Diffstat (limited to 'src/runtime/haskell')
-rw-r--r--src/runtime/haskell/PGF.hs1
-rw-r--r--src/runtime/haskell/PGF/Type.hs4
2 files changed, 5 insertions, 0 deletions
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