# Ticket #24 (new defect)

Opened 9 years ago

## CorruptedPGF when using non-eta-expanded linearizations

Reported by: | PeterLjunglof | Owned by: | |
---|---|---|---|

Priority: | major | Version: | 3.0 |

Keywords: | Cc: |

### Description

The following grammar gets a compilation error ("CorruptedPGF"):

lincat NP = {s:Str; n:Num}; Det = {s:{g:Gen} => Str; d:Defness; n:Num}; Noun = {s:{d:Defness;n:Num} => Str; g:Gen}; fun np : Det -> Noun -> NP; lin np x y = {s = x.s!y ++ y.s!x; n = x.n};

If one eta-expands the arguments x and y, it works:

lin np x y = {s = x.s!{g=y.g} ++ y.s!{d=x.d;n=x.n}; n = x.n};

The error message differs, depending on wheter x or y or none is eta-expanded:

No expansion:

* lin np x y = {s = x.s!y ++ y.s!x; n = x.n}; linking ... projection from P (P (V 0) (C 0)) (P (P (P (V 1) (C 0)) (C 0)) (C 0)) : S [] happened in function np happened in language TravelEng Corrupted PGF gf: unifyPType R [R [S [],S []],C 1,C 1]

y is eta-expanded:

* lin np x y = {s = x.s!{g=y.g} ++ y.s!x; n = x.n}; linking ... projection from P (P (V 0) (C 0)) (P (P (P (V 1) (C 0)) (C 0)) (C 0)) : S [] happened in function np happened in language TravelEng Corrupted PGF gf: unifyPType R [R [S [],S []],C 1,C 1]

x is eta-expanded:

* lin np x y = {s = x.s!y ++ y.s!{d=x.d;n=x.n}; n = x.n}; linking ... projection from P (P (V 0) (C 0)) (P (P (P (V 1) (C 0)) (C 0)) (C 0)) : S [] happened in function np happened in language TravelEng Corrupted PGF gf: GF/Compile/GenerateFCFG.hs:(250,38)-(251,95): Non-exhaustive patterns in case

**Note:**See TracTickets for help on using tickets.