added function unType in PGF

This commit is contained in:
krasimir committed 2010-07-31 12:47:10 +00:00
1 parent c8acc8fe11
commit b351c9d9dd
2 files changed
+5

No files matched your search

+1
View File
@@ -30,6 +30,7 @@ module PGF(
Type, Hypo,
showType, readType,
mkType, mkHypo, mkDepHypo, mkImplHypo,
unType,
categories, startCat,
-- * Functions
+4
View File
@@ -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