mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
String pattern handling
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user