summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoraarne <unknown>2004-03-23 12:06:12 +0000
committeraarne <unknown>2004-03-23 12:06:12 +0000
commit31836c0da9ba7a716ee0480e6219d771da4999fa (patch)
tree6df78cd648f2c1fc6587abd31fd1c3a3e34c72cc /src
parentc3796cf04ca77a8ded570678291fd65d5e17ed0f (diff)
String pattern handling
Diffstat (limited to 'src')
-rw-r--r--src/GF/Compile/CheckGrammar.hs2
-rw-r--r--src/GF/Grammar/AppPredefined.hs5
-rw-r--r--src/GF/Grammar/PatternMatch.hs1
-rw-r--r--src/GF/Source/GrammarToSource.hs1
-rw-r--r--src/Today.hs2
5 files changed, 8 insertions, 3 deletions
diff --git a/src/GF/Compile/CheckGrammar.hs b/src/GF/Compile/CheckGrammar.hs
index 46d75c744..6e8abc02d 100644
--- a/src/GF/Compile/CheckGrammar.hs
+++ b/src/GF/Compile/CheckGrammar.hs
@@ -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
diff --git a/src/GF/Grammar/AppPredefined.hs b/src/GF/Grammar/AppPredefined.hs
index 14f35a1d4..179272032 100644
--- a/src/GF/Grammar/AppPredefined.hs
+++ b/src/GF/Grammar/AppPredefined.hs
@@ -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
diff --git a/src/GF/Grammar/PatternMatch.hs b/src/GF/Grammar/PatternMatch.hs
index 2ca8b21de..ecc34709b 100644
--- a/src/GF/Grammar/PatternMatch.hs
+++ b/src/GF/Grammar/PatternMatch.hs
@@ -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
diff --git a/src/GF/Source/GrammarToSource.hs b/src/GF/Source/GrammarToSource.hs
index 3c785b322..641dc7b5d 100644
--- a/src/GF/Source/GrammarToSource.hs
+++ b/src/GF/Source/GrammarToSource.hs
@@ -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)
diff --git a/src/Today.hs b/src/Today.hs
index b9a4cd59a..5c2ce8fb0 100644
--- a/src/Today.hs
+++ b/src/Today.hs
@@ -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"