String pattern handling

This commit is contained in:
aarne
2004-03-23 12:06:12 +00:00
parent dc65a16767
commit 8f829331f6
5 changed files with 8 additions and 3 deletions

View File

@@ -416,6 +416,8 @@ inferLType gr trm = case trm of
PP _ _ ps -> True --- all isConstPatt ps
PR ps -> all (isConstPatt . snd) ps
PT _ p -> isConstPatt p
PString _ -> True
PInt _ -> True
_ -> False
inferPatt p = case p of

View File

@@ -6,8 +6,9 @@ import Ident
import PrGrammar (prt)
---- import PGrammar (pTrm)
-- predefined function definitions. AR 12/3/2003.
-- Type checker looks at signatures in predefined.gf
-- predefined function type signatures and definitions. AR 12/3/2003.
---- typPredefined :: Term -> Err Type
appPredefined :: Term -> Term
appPredefined t = case t of

View File

@@ -77,6 +77,7 @@ isInConstantForm trm = case trm of
Abs _ _ -> True
App c a -> isInConstantForm c && isInConstantForm a
R r -> all (isInConstantForm . snd . snd) r
K _ -> True
Alias _ _ t -> isInConstantForm t
_ -> False ---- isInArgVarForm trm

View File

@@ -163,6 +163,7 @@ trp p = case p of
PP p c [] -> P.PQ (tri p) (tri c)
PP p c a -> P.PQC (tri p) (tri c) (map trp a)
PR r -> P.PR [P.PA [trLabelIdent l] (trp p) | (l,p) <- r]
PString s -> P.PStr s
---- PT t p -> prt p ---- prParenth (prt p +++ ":" +++ prt t)

View File

@@ -1 +1 @@
module Today where today = "Mon Mar 1 10:50:38 CET 2004"
module Today where today = "Tue Mar 23 10:59:42 CET 2004"