summaryrefslogtreecommitdiff
path: root/examples/tutorial/semantics/GSyntax.hs
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2007-10-21 10:45:51 +0000
committeraarne <aarne@cs.chalmers.se>2007-10-21 10:45:51 +0000
commit3b878f85d85f1fa7f7ff724dfa161d7ac2b619b8 (patch)
treef3bdc6ac612772df0c7d17b485b20b90e1d251eb /examples/tutorial/semantics/GSyntax.hs
parent087fddc1746e585bf4f7055e67c0f396ec58ebde (diff)
Swedish functor implementation of Base
Diffstat (limited to 'examples/tutorial/semantics/GSyntax.hs')
-rw-r--r--examples/tutorial/semantics/GSyntax.hs15
1 files changed, 5 insertions, 10 deletions
diff --git a/examples/tutorial/semantics/GSyntax.hs b/examples/tutorial/semantics/GSyntax.hs
index 48634d2e9..6c67e40aa 100644
--- a/examples/tutorial/semantics/GSyntax.hs
+++ b/examples/tutorial/semantics/GSyntax.hs
@@ -83,7 +83,7 @@ data GNP =
GConjNP GConj GNP GNP
| GEvery GCN
| GMany GListPN
- | GNone GCN
+ | GNone
| GSome GCN
| GUsePN GPN
deriving Show
@@ -101,9 +101,7 @@ data GQuestion =
| GWhichAre GCN GAP
deriving Show
-data GS =
- GConjS GConj GS GS
- | GPredAP GNP GAP
+data GS = GPredAP GNP GAP
deriving Show
@@ -141,7 +139,7 @@ instance Gf GNP where
gf (GConjNP x1 x2 x3) = DTr [] (AC (CId "ConjNP")) [gf x1, gf x2, gf x3]
gf (GEvery x1) = DTr [] (AC (CId "Every")) [gf x1]
gf (GMany x1) = DTr [] (AC (CId "Many")) [gf x1]
- gf (GNone x1) = DTr [] (AC (CId "None")) [gf x1]
+ gf GNone = DTr [] (AC (CId "None")) []
gf (GSome x1) = DTr [] (AC (CId "Some")) [gf x1]
gf (GUsePN x1) = DTr [] (AC (CId "UsePN")) [gf x1]
@@ -156,9 +154,7 @@ instance Gf GQuestion where
gf (GWhatIs x1) = DTr [] (AC (CId "WhatIs")) [gf x1]
gf (GWhichAre x1 x2) = DTr [] (AC (CId "WhichAre")) [gf x1, gf x2]
-instance Gf GS where
- gf (GConjS x1 x2 x3) = DTr [] (AC (CId "ConjS")) [gf x1, gf x2, gf x3]
- gf (GPredAP x1 x2) = DTr [] (AC (CId "PredAP")) [gf x1, gf x2]
+instance Gf GS where gf (GPredAP x1 x2) = DTr [] (AC (CId "PredAP")) [gf x1, gf x2]
instance Fg GA2 where
@@ -215,7 +211,7 @@ instance Fg GNP where
DTr [] (AC (CId "ConjNP")) [x1,x2,x3] -> GConjNP (fg x1) (fg x2) (fg x3)
DTr [] (AC (CId "Every")) [x1] -> GEvery (fg x1)
DTr [] (AC (CId "Many")) [x1] -> GMany (fg x1)
- DTr [] (AC (CId "None")) [x1] -> GNone (fg x1)
+ DTr [] (AC (CId "None")) [] -> GNone
DTr [] (AC (CId "Some")) [x1] -> GSome (fg x1)
DTr [] (AC (CId "UsePN")) [x1] -> GUsePN (fg x1)
_ -> error ("no NP " ++ show t)
@@ -240,7 +236,6 @@ instance Fg GQuestion where
instance Fg GS where
fg t =
case t of
- DTr [] (AC (CId "ConjS")) [x1,x2,x3] -> GConjS (fg x1) (fg x2) (fg x3)
DTr [] (AC (CId "PredAP")) [x1,x2] -> GPredAP (fg x1) (fg x2)
_ -> error ("no S " ++ show t)