summaryrefslogtreecommitdiff
path: root/examples/phrasebook/Sentences.gf
blob: 694028183c6aa835ef798f3a75dad51b1439b2ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
abstract Sentences = Numeral ** {

  cat
    Phrase ;
    Sentence ; Question ; Proposition ; 
    Object ; Item ; Kind ; Quality ; Property ;  
    Place ; PlaceKind ; Currency ; Price ; 
    Person ; Action ; 
    Nationality ; Language ; Citizenship ; Country ;
    Day ;   -- weekday type
    Date ;  -- definite date
    Name ;  
  fun
    -- these phrases are formed here, not in Phrasebook, as they are functorial
    PSentence : Sentence -> Phrase ;
    PQuestion : Question -> Phrase ;

    PObject   : Object   -> Phrase ;
    PKind     : Kind     -> Phrase ;
    PQuality  : Quality  -> Phrase ;
    PNumeral  : Numeral  -> Phrase ;
    PPlace    : Place    -> Phrase ;
    PPlaceKind: PlaceKind-> Phrase ;
    PCurrency : Currency -> Phrase ;
    PPrice    : Price    -> Phrase ;
    PLanguage : Language -> Phrase ;
    PCitizenship : Citizenship -> Phrase ;
    PCountry  : Country -> Phrase ;
    PDay      : Day -> Phrase ;

    Is       : Item -> Quality -> Proposition ;

    SProp    : Proposition -> Sentence ;
    SPropNot : Proposition -> Sentence ;
    QProp    : Proposition -> Question ;

    WhereIs : Place -> Question ;

    PropAction : Action -> Proposition ;

    HowMuchCost : Item -> Question ;
    ItCost : Item -> Price -> Proposition ;
    AmountCurrency : Numeral -> Currency -> Price ;

    ObjItem   : Item -> Object ;
    ObjNumber : Numeral -> Kind -> Object ;
    ObjIndef  : Kind -> Object ;
    
    This, That, These, Those, The, Thes : Kind -> Item ;
    SuchKind : Quality -> Kind -> Kind ;
    Very : Property -> Quality ;
    Too : Property -> Quality ;
    PropQuality : Property -> Quality ;

    ThePlace : PlaceKind -> Place ;

    IMale, IFemale, 
    YouFamMale, YouFamFemale, 
    YouPolMale, YouPolFemale : Person ;

    LangNat    : Nationality -> Language ;
    CitiNat    : Nationality -> Citizenship ;
    CountryNat : Nationality -> Country ;
    PropCit    : Citizenship -> Property ;

    OnDay : Day -> Date ;
    Today : Date ;

    PersonName : Name -> Person ;
----    NameString : String -> Name ; ---- creates ambiguities with all words
    NameNN : Name ; -- the name "NN"
}