John J. Camilleri
33e0e98aec
Add 1-tree treebank for Phrasebook in a few languages
2021-02-28 00:34:46 +01:00
John J. Camilleri
83bc3c9c6e
More work on params: pass all tests except params1 (!)
2021-02-27 23:13:02 +01:00
John J. Camilleri
f42b5ec9ef
More work on params, but Foods fails now
2021-02-26 20:25:05 +01:00
John J. Camilleri
4771d9c356
WIP params
2021-02-26 17:18:21 +01:00
John J. Camilleri
8324ad8801
Add pretty-printing of LPGF grammars, to help debugging
2021-02-26 10:13:33 +01:00
John J. Camilleri
b4a393ac09
Pass missing unit test
2021-02-21 14:22:46 +01:00
John J. Camilleri
5ad5789b31
Filter out record fields which don't exist in lintype
...
This is to work around an inconsistency in the canonical representation
2021-02-19 15:19:40 +01:00
John J. Camilleri
023b50557e
Write LPGF dump to file when DEBUG is set, rather than console
2021-02-19 09:31:26 +01:00
John J. Camilleri
625386a14f
Force evaluation in benchmark linearisation
...
BangPatterns only does WHNF which is not sufficient, previous benchmark results are thus wrong
2021-02-18 21:01:30 +01:00
John J. Camilleri
e6079523f1
Remove ParamAliasDefs by inlining their definitions
2021-02-18 14:45:10 +01:00
John J. Camilleri
866a2101e1
When projecting a non-existent field, return Prelude.False
...
This seems to be GF's own behaviour, as exhibited by the canonical version of PhrasebookTha:
NNumeral Numeral_0 = {s = Numeral_0.s; hasC = <>.hasC};
2021-02-18 14:42:39 +01:00
John J. Camilleri
d8557e8433
Enable debug output to files with envvar DEBUG=1
2021-02-18 14:40:03 +01:00
John J. Camilleri
236dbdbba3
Minor tidying
2021-02-17 00:15:44 +01:00
John J. Camilleri
768c3d9b2d
Include return types for params, records, pre
2021-02-17 00:04:37 +01:00
John J. Camilleri
2d03b9ee0c
Finish type passing in val2lin, generalise projection case and pass FoodsFre testsuite.
2021-02-16 21:07:24 +01:00
John J. Camilleri
7227ede24b
WIP return type from val2lin for use in projection case
2021-02-16 17:18:01 +01:00
John J. Camilleri
398b294734
Use Data.Text instead of String. Rename Abstr to Abstract, Concr to Concrete.
2021-02-16 16:04:40 +01:00
John J. Camilleri
d394cacddf
Add support for CAPIT and ALL_CAPIT
2021-02-16 15:17:54 +01:00
John J. Camilleri
21f14c2aa1
Add support for SOFT_SPACE
2021-02-16 14:57:33 +01:00
John J. Camilleri
23e49cddb7
Add support for SOFT_BIND (which PGF runtime doesn't support)
2021-02-16 14:51:29 +01:00
John J. Camilleri
4d1217b06d
Add support for pre
2021-02-15 21:57:05 +01:00
John J. Camilleri
109822675b
Pass test with FoodsFin, by forcibly resorting record fields to make s first
2021-02-15 00:43:53 +01:00
John J. Camilleri
d563abb928
Minors
2021-02-13 00:59:15 +01:00
John J. Camilleri
98f6136ebd
Add support for BIND
2021-02-13 00:14:35 +01:00
John J. Camilleri
8cfaa69b6e
Handle record tables, pass FoodSwe in testsuite
2021-02-12 23:51:16 +01:00
John J. Camilleri
a12f58e7b0
Add test case for selection using records (fails)
2021-02-10 13:55:38 +01:00
John J. Camilleri
34f0fc0ba7
Fix bug in dynamic parameter handling, compile FoodsBul successfully
2021-02-03 15:41:27 +01:00
John J. Camilleri
42b9e7036e
Support dynamic param values
2021-02-03 13:16:10 +01:00
John J. Camilleri
132f693713
Minor cleanup
2021-02-03 09:44:15 +01:00
John J. Camilleri
153bffdad7
Support nested parameters, but fails with non-static values (see FoodsBull, ASg kind.g).
2021-02-03 00:11:22 +01:00
John J. Camilleri
2a5850023b
Correctly handle projection, but only in limited cases
2021-02-01 13:08:39 +01:00
John J. Camilleri
fe15aa0c00
Use canonical GF in LPGF compiler
...
Still contains some hardcoded values, missing cases.
I notice now that LPGF and Canonical GF are almost identical, so maybe we don't need a new LPGF format,
just a linearization-only runtime which works on canonical grammars.
The argument for keeping LGPF is that it would be optimized for size and speed.
2021-02-01 12:28:06 +01:00
John J. Camilleri
cead0cc4c1
Add selection and projection cases but not working
2021-01-26 09:55:07 +01:00
John J. Camilleri
270e7f021f
Add binary instances
2021-01-25 14:42:00 +01:00
John J. Camilleri
f24c50339b
Strip down format. More early work on compiler. Add testsuite (doesn't work yet).
2021-01-25 12:10:30 +01:00
John J. Camilleri
cd5881d83a
Early work on LPGF compiler
2021-01-22 15:17:36 +01:00
John J. Camilleri
93b81b9f13
Add first version of LPGF datatype, with linearization function and some hardcoded examples
2021-01-22 14:07:41 +01:00
John J. Camilleri
8ad9cf1e09
Add flag and stubs for compiling to LPGF format
2021-01-19 17:21:13 +01:00
Andreas Källberg
56f94da772
Merge remote-tracking branch 'origin/master' into fix-newer-cabal
2020-09-05 21:11:12 +02:00
Andreas Källberg
7268253f5a
MonadFail: Make backwards-compatible
2020-09-05 20:23:07 +02:00
Andreas Källberg
0581d6827e
Fix most build errors
2020-08-05 18:48:24 +02:00
Andreas Källberg
b8812b54b2
fix newer ghc: Don't try to be backwards compatible
2020-08-05 18:48:24 +02:00
Andreas Källberg
251845f83e
First attempt at fixing incompabilities with newer cabal
2020-08-05 18:48:24 +02:00
Inari Listenmaa
7c478016d0
Replace deprecated pragma with up-to-date one. ( #17 )
2020-08-03 19:45:20 +02:00
Inari Listenmaa
868566a319
Remove accidentally added space character in deriving clause.
2020-07-31 15:16:45 +02:00
Inari Listenmaa
aeabc955c8
Remove characters that aren't allowed in Haskell data types.
...
GF allows more characters in its types, as long as they are inside
single quotes. E.g. 'VP/Object' is a valid name for a GF category,
but not for a Haskell data type.
2020-07-31 15:05:46 +02:00
Inari Listenmaa
030c3bfee9
Add option "data" to Haskell options.
...
Imports Data.Data, all GF types derive Data, and uses DeriveDataTypeable.
2020-07-31 12:46:19 +02:00
aarneranta
8a052edca2
an attempt to solve record extension overloading bug, commented out for the moment
2020-07-06 18:01:59 +02:00
aarneranta
1360723137
fixed issue #67 on order of record fields in overloading
2020-07-06 14:27:49 +02:00
Inari Listenmaa
de8cc02ba5
Condense the unsupported token gluing as per John's suggestion
2020-06-05 19:39:31 +02:00