forked from GitHub/gf-core
lib/src/*/Numeral*.gf: fix inconsistent inheritance form Cat
While the abstract Numeral inherits only Cat[Numeral,Digits], some of the concrete NumeralNNN of Numeral inherited everything from CatNNN. Normally the compiler outputs a warning message when a concrete syntax contains superflous lincats, but apparently not when they get included through inheritance... This does not seem to cause problems in the Haskell run-time system, but the C run-time system fails to load PGFs with superflous lincats. This problems shows up when creating application grammars that inherit Numeral. The Phrasebook is an example of such a grammar.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
concrete NumeralAfr of Numeral = CatAfr ** open ResAfr, Prelude in {
|
concrete NumeralAfr of Numeral = CatAfr [Numeral,Digits] ** open ResAfr, Prelude in {
|
||||||
|
|
||||||
flags optimize = all_subs ;
|
flags optimize = all_subs ;
|
||||||
coding=utf8 ;
|
coding=utf8 ;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
concrete NumeralAmh of Numeral = CatAmh ** open ResAmh,ParamX,Prelude in {
|
concrete NumeralAmh of Numeral = CatAmh [Numeral,Digits] ** open ResAmh,ParamX,Prelude in {
|
||||||
flags coding = utf8;
|
flags coding = utf8;
|
||||||
lincat
|
lincat
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete NumeralAra of Numeral = CatAra **
|
concrete NumeralAra of Numeral = CatAra [Numeral,Digits] **
|
||||||
open Predef, Prelude, ResAra, MorphoAra in {
|
open Predef, Prelude, ResAra, MorphoAra in {
|
||||||
|
|
||||||
flags coding=utf8 ;
|
flags coding=utf8 ;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
--# -coding=cp1251
|
--# -coding=cp1251
|
||||||
concrete NumeralBul of Numeral = CatBul ** open Prelude, ResBul in {
|
concrete NumeralBul of Numeral = CatBul [Numeral,Digits] ** open Prelude, ResBul in {
|
||||||
flags coding=cp1251 ;
|
flags coding=cp1251 ;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete NumeralChi of Numeral = CatChi ** open ResChi, Prelude in {
|
concrete NumeralChi of Numeral = CatChi [Numeral,Digits] ** open ResChi, Prelude in {
|
||||||
|
|
||||||
flags coding = utf8 ;
|
flags coding = utf8 ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete NumeralDan of Numeral = CatDan ** open MorphoDan,Prelude in {
|
concrete NumeralDan of Numeral = CatDan [Numeral,Digits] ** open MorphoDan,Prelude in {
|
||||||
flags coding=utf8 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete NumeralGre of Numeral = CatGre ** open ResGre,Prelude in {
|
concrete NumeralGre of Numeral = CatGre [Numeral,Digits] ** open ResGre,Prelude in {
|
||||||
|
|
||||||
flags coding= utf8 ;
|
flags coding= utf8 ;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
-- Modification for Urdu Shafqat Virk
|
-- Modification for Urdu Shafqat Virk
|
||||||
|
|
||||||
|
|
||||||
concrete NumeralHin of Numeral = CatHin ** open ResHin,CommonHindustani,ParamX, Prelude in {
|
concrete NumeralHin of Numeral = CatHin [Numeral,Digits] ** open ResHin,CommonHindustani,ParamX, Prelude in {
|
||||||
flags coding=utf8 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
param DForm = unit | ten ;
|
param DForm = unit | ten ;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete NumeralIna of Numeral = CatIna ** open ResIna,Prelude in {
|
concrete NumeralIna of Numeral = CatIna [Numeral,Digits] ** open ResIna,Prelude in {
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Digit = {s : DForm => CardOrd => Str} ;
|
Digit = {s : DForm => CardOrd => Str} ;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete NumeralJpn of Numeral = CatJpn ** open ResJpn, ParadigmsJpn, Prelude in {
|
concrete NumeralJpn of Numeral = CatJpn [Numeral,Digits] ** open ResJpn, ParadigmsJpn, Prelude in {
|
||||||
|
|
||||||
flags coding = utf8 ;
|
flags coding = utf8 ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete NumeralLat of Numeral = CatLat ** open ResLat,Prelude in {
|
concrete NumeralLat of Numeral = CatLat [Numeral,Digits] ** open ResLat,Prelude in {
|
||||||
--
|
--
|
||||||
--lincat
|
--lincat
|
||||||
-- Digit = {s : DForm => CardOrd => Str} ;
|
-- Digit = {s : DForm => CardOrd => Str} ;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:../abstract:../common:../prelude
|
--# -path=.:../abstract:../common:../prelude
|
||||||
|
|
||||||
concrete NumeralMon of Numeral = CatMon ** open ResMon, MorphoMon, Prelude in {
|
concrete NumeralMon of Numeral = CatMon [Numeral,Digits] ** open ResMon, MorphoMon, Prelude in {
|
||||||
|
|
||||||
flags coding=utf8 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete NumeralNep of Numeral = CatNep ** open ResNep, Prelude in {
|
concrete NumeralNep of Numeral = CatNep [Numeral,Digits] ** open ResNep, Prelude in {
|
||||||
-- By Harald Hammarstroem
|
-- By Harald Hammarstroem
|
||||||
-- Modification for Nepali by Dinesh Simkhada and Shafqat Virk - 2011
|
-- Modification for Nepali by Dinesh Simkhada and Shafqat Virk - 2011
|
||||||
flags coding=utf8 ;
|
flags coding=utf8 ;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete NumeralNor of Numeral = CatNor ** open MorphoNor, Prelude in {
|
concrete NumeralNor of Numeral = CatNor [Numeral,Digits] ** open MorphoNor, Prelude in {
|
||||||
flags coding=utf8 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
-- Adam Slaski, 2009, 2010 <adam.slaski@gmail.com>
|
-- Adam Slaski, 2009, 2010 <adam.slaski@gmail.com>
|
||||||
|
|
||||||
concrete NumeralPol of Numeral = CatPol ** open ResPol,Prelude, AdjectiveMorphoPol in {
|
concrete NumeralPol of Numeral = CatPol [Numeral,Digits] ** open ResPol,Prelude, AdjectiveMorphoPol in {
|
||||||
|
|
||||||
flags coding=utf8 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete NumeralPnb of Numeral = CatPnb ** open ResPnb, Prelude in {
|
concrete NumeralPnb of Numeral = CatPnb [Numeral,Digits] ** open ResPnb, Prelude in {
|
||||||
-- By Harald Hammarstroem
|
-- By Harald Hammarstroem
|
||||||
-- Modification for Punjabi by Shafqat Virk
|
-- Modification for Punjabi by Shafqat Virk
|
||||||
flags coding=utf8 ;
|
flags coding=utf8 ;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete NumeralRon of Numeral = CatRon **
|
concrete NumeralRon of Numeral = CatRon [Numeral,Digits] **
|
||||||
open MorphoRon, CatRon, Prelude in {
|
open MorphoRon, CatRon, Prelude in {
|
||||||
|
|
||||||
flags coding = utf8 ;
|
flags coding = utf8 ;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:../abstract:../common:../../prelude
|
--# -path=.:../abstract:../common:../../prelude
|
||||||
|
|
||||||
concrete NumeralRus of Numeral = CatRus ** open ResRus, Prelude in {
|
concrete NumeralRus of Numeral = CatRus [Numeral,Digits] ** open ResRus, Prelude in {
|
||||||
|
|
||||||
flags coding=utf8 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete NumeralSnd of Numeral = CatSnd ** open ResSnd, Prelude in {
|
concrete NumeralSnd of Numeral = CatSnd [Numeral,Digits] ** open ResSnd, Prelude in {
|
||||||
-- By Harald Hammarstroem
|
-- By Harald Hammarstroem
|
||||||
-- Modification for Punjabi by Shafqat Virk
|
-- Modification for Punjabi by Shafqat Virk
|
||||||
flags coding=utf8 ;
|
flags coding=utf8 ;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete NumeralSwa of Numeral = CatSwa ** open ResSwa in {
|
concrete NumeralSwa of Numeral = CatSwa [Numeral,Digits] ** open ResSwa in {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--concrete NumeralTel of Numeral = CatTel ** open ResTel in {
|
--concrete NumeralTel of Numeral = CatTel [Numeral,Digits] ** open ResTel in {
|
||||||
----
|
----
|
||||||
----lincat
|
----lincat
|
||||||
---- Digit = {s : DForm => CardOrd => Str} ;
|
---- Digit = {s : DForm => CardOrd => Str} ;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete NumeralTha of Numeral = CatTha ** open ResTha, StringsTha, Prelude in {
|
concrete NumeralTha of Numeral = CatTha [Numeral,Digits] ** open ResTha, StringsTha, Prelude in {
|
||||||
|
|
||||||
flags coding = utf8 ;
|
flags coding = utf8 ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:../abstract:../common:../../prelude
|
--# -path=.:../abstract:../common:../../prelude
|
||||||
|
|
||||||
concrete NumeralTur of Numeral = CatTur ** open Prelude, ResTur, ParadigmsTur in {
|
concrete NumeralTur of Numeral = CatTur [Numeral,Digits] ** open Prelude, ResTur, ParadigmsTur in {
|
||||||
|
|
||||||
flags
|
flags
|
||||||
coding = utf8 ;
|
coding = utf8 ;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
-- Modification for Urdu Shafqat Virk
|
-- Modification for Urdu Shafqat Virk
|
||||||
|
|
||||||
|
|
||||||
concrete NumeralUrd of Numeral = CatUrd ** open ResUrd,CommonHindustani,ParamX, Prelude in {
|
concrete NumeralUrd of Numeral = CatUrd [Numeral,Digits] ** open ResUrd,CommonHindustani,ParamX, Prelude in {
|
||||||
flags coding=utf8 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
param DForm = unit | ten ;
|
param DForm = unit | ten ;
|
||||||
|
|||||||
Reference in New Issue
Block a user