John J. Camilleri
2b8d792e09
Updates to cabal file
2021-07-07 12:38:01 +02:00
John J. Camilleri
045def61d8
Merge branch 'master' into lpgf
...
# Conflicts:
# gf.cabal
# src/compiler/GF/Grammar/Canonical.hs
2021-07-07 09:42:44 +02:00
John J. Camilleri
f2e52d6f2c
Replace tabs for whitespace in source code
2021-07-07 09:40:41 +02:00
John J. Camilleri
a2b23d5897
Make whitespace uniform in Cabal files, add a few more dependency bounds
2021-07-07 09:11:46 +02:00
John J. Camilleri
2be54ffb12
Update ConcreteNew, RConcrete in gf.cabal
2021-07-07 08:55:35 +02:00
John J. Camilleri
4bd26eae6d
Merge branch 'master' into lpgf
...
# Conflicts:
# gf.cabal
# src/compiler/GF/Compile/GrammarToCanonical.hs
# src/compiler/GF/Grammar/Canonical.hs
# src/compiler/GF/Infra/Option.hs
2021-07-07 08:36:09 +02:00
John J. Camilleri
0886eb520d
Update 3.11 release notes
2021-07-06 15:45:21 +02:00
John J. Camilleri
ef42216415
Add import from command line invocation to command history
...
Closes #64
2021-07-06 15:35:03 +02:00
John J. Camilleri
0c3ca3d79a
Add note in PGF2 documentation about risk for integer overflow.
...
Closes #109
2021-07-06 14:43:21 +02:00
John J. Camilleri
84b4b6fab9
Some more cabal file cleanup. Add stack files for pgf, pgf2.
2021-07-06 14:11:30 +02:00
John J. Camilleri
dff1193f7b
Add --haskell=pgf2 flag
2021-07-06 14:59:53 +08:00
John J. Camilleri
b090e9b0ff
Add --haskell=pgf2 flag
2021-07-01 15:31:00 +02:00
John J. Camilleri
5d7c687cb7
Make imports in CheckGrammar a little more explicit
2021-07-01 14:32:39 +02:00
John J. Camilleri
376b1234a2
Rename GF.Compile.TypeCheck.RConcrete to GF.Compile.TypeCheck.Concrete
2021-07-01 14:27:11 +02:00
John J. Camilleri
71d99b9ecb
Rename GF.Compile.Compute.ConcreteNew to GF.Compile.Compute.Concrete
2021-07-01 14:21:29 +02:00
John J. Camilleri
a27b07542d
Add run-on-grammar canonical test script
2021-07-01 14:05:30 +02:00
John J. Camilleri
78b73fba20
Make cleanupRecordFields also recurse into variants
...
It's possible that more constructors need to be handled
2021-07-01 13:53:33 +02:00
John J. Camilleri
e5a2aed5b6
Remove record fields not in lincat
...
Fixes #100 , #101
2021-07-01 11:47:14 +02:00
John J. Camilleri
13575b093f
Add top-level signatures and general code cleanup
2021-07-01 10:13:42 +02:00
John J. Camilleri
32be75ca7d
Reduce Phrasebook grammars in testsuite/canonical to bare minimum
2021-07-01 09:22:57 +02:00
John J. Camilleri
587004f985
Sort record fields in lin definitions
...
Fixes #102
2021-06-30 14:14:54 +02:00
John J. Camilleri
4436cb101e
Move testsuite/compiler/canonical on level up, update test script
2021-06-30 13:47:15 +02:00
John J. Camilleri
0f5be0bbaa
Add shell script in testsuite/compiler/canonical for replicating known issues
...
Ideally this is integrated into proper test suite, but that's too much overhead for now
2021-06-30 12:41:56 +02:00
John J. Camilleri
d5c6aec3ec
Superficial refactoring to testsuite module
2021-06-30 12:12:26 +02:00
John J. Camilleri
0a70eca6e2
Make GF.Grammar.Canonical.Id a type synonym for GF.Infra.Ident.RawIdent
...
This avoids a lot of conversion back and forth between Strings and ByteStrings
This commit was cherry-picked from d0c27cdaae (lpgf branch)
2021-06-30 10:58:23 +02:00
John J. Camilleri
3a27fa0d39
Add another =
2021-06-24 09:34:27 +02:00
John J. Camilleri
1ba5449d21
Update pgf.cabal, and minors to other cabal files
2021-06-24 09:31:37 +02:00
John J. Camilleri
5564a2f244
Make stack.yaml a regular file again
2021-06-22 13:35:46 +02:00
John J. Camilleri
cf2eff3801
Merge branch 'master' into stack-yaml-symlink
2021-06-22 13:32:17 +02:00
John J. Camilleri
84fd431afd
Manage to get completion working in PGF2
2021-05-03 22:28:48 +02:00
John J. Camilleri
588cd6ddb1
Improvement to test script, distinguishes when input ends with whitespace
2021-05-03 20:51:24 +02:00
John J. Camilleri
437bd8e7f9
Add proper error handling in complete
2021-05-03 20:36:31 +02:00
John J. Camilleri
e56d1b2959
Second attempt. Reading enum is closer to working but all strings are empty.
2021-05-03 14:25:35 +02:00
John J. Camilleri
450368f9bb
First attempt at adding support for complete in PGF2 (gives segmentation faults)
2021-05-03 13:19:08 +02:00
John J. Camilleri
07fd41294a
Comment out c-runtime flag by default
2021-05-03 10:33:36 +02:00
John J. Camilleri
4729d22c36
Make stack.yaml an actual symlink to stack-ghc8.6.5.yaml. Add some commented flags in stack files.
2021-05-03 10:24:26 +02:00
John J. Camilleri
60bc752a6f
Add note about type-checking dynamic expressions in PGF2 Haddock
...
Closes #72
2021-04-30 14:59:20 +02:00
John J. Camilleri
91278e2b4b
Remove notice about example grammars not being included anymore from build scripts
2021-04-30 13:39:15 +02:00
John J. Camilleri
c1af40532c
Add some stuff to gitignore
2021-04-30 13:06:50 +02:00
John J. Camilleri
d0c27cdaae
Make GF.Grammar.Canonical.Id a type synonym for GF.Infra.Ident.RawIdent
...
This avoids a lot of conversion back and forth between Strings and ByteStrings
2021-04-06 22:15:07 +02:00
John J. Camilleri
f7df62a445
Add support for literals
2021-03-22 09:12:34 +01:00
John J. Camilleri
2d066853f1
Add unit test for literals (fails)
2021-03-22 08:37:59 +01:00
John J. Camilleri
f900ea3885
Don't process impossible values at all (not even for finding their types)
2021-03-16 16:59:58 +01:00
John J. Camilleri
d9c37fc093
Minors to LPGF readme
2021-03-12 13:47:36 +01:00
John J. Camilleri
c9f0867491
Remove state Map from compilation
2021-03-12 13:46:50 +01:00
John J. Camilleri
6c6a201d96
Introduce state with Map for caching compilation, but results are worse
2021-03-12 13:39:56 +01:00
John J. Camilleri
8f5033e4ce
Add notes on profiling
2021-03-09 08:36:35 +01:00
John J. Camilleri
126b61ea03
Merge branch 'master' into lpgf
2021-03-08 13:52:34 +01:00
John J. Camilleri
9b4f2dd18b
Remove notice about RGL not being included anymore from build scripts
2021-03-08 13:48:30 +01:00
John J. Camilleri
99abb9b2a5
Add Phrasebook benchmark snippet to LPGF README
2021-03-08 13:37:02 +01:00
John J. Camilleri
3e9d12854a
Switch to 10000-tree Phrasebook treebank. All errors to do with missing functions, plus variants in German.
2021-03-08 11:19:06 +01:00
John J. Camilleri
fd07946a50
Remove commented line
2021-03-08 10:42:16 +01:00
John J. Camilleri
c76efcf916
Use C runtime in mkTreebank script
2021-03-08 10:17:03 +01:00
John J. Camilleri
785d6069e2
Fix lin2string and pass all unittests and Phrasebook
2021-03-08 09:53:10 +01:00
John J. Camilleri
0f4b349b0b
Remove old commented code
2021-03-05 16:51:59 +01:00
John J. Camilleri
dbf369aae5
Make removal of record fields recursive. Latest results with Phrasebook:
...
Bul ✓
Cat ✗
Chi ✓
Dan ✓
Dut ✓
Eng ✓
Est ✓
Fin ✓
Fre ✗
Ger ✓
Hin ✓
Ita ✗
Jpn ✓
Lav ✓
Nor ✓
Pol ✓
Ron ✓
Snd ✗
Spa ✓
Swe ✓
Tha ✓
Urd ✓
Passed 18 | Failed 4 | Total 22
2021-03-05 16:48:05 +01:00
John J. Camilleri
0d4659fe8c
Add workaround for missing param defs. Add links to gf-core issues in workaround comments.
2021-03-05 13:23:00 +01:00
John J. Camilleri
575a746a3e
Add LPGF function for catching errors. Manual fixes to Phrasebook treebank.
2021-03-05 12:05:25 +01:00
John J. Camilleri
70581c2d8c
Improve base case in table handling, cleanup. Add run-phrasebook script, current output:
...
Bul ✗
Cat ✗
Chi ✓
Dan ✓
Dut ✓
Eng ✓
Est ✓
Fin ✗
Fre ✗
Ger ✓
Hin ✓
Ita ✗
Jpn ✓
Lav ✓
Nor ✓
Pol ✓
Ron ✓
Snd ✗
Spa ✗
Swe ✓
Tha ✓
Urd ✓
Passed 15 | Failed 7 | Total 22
2021-03-04 17:09:35 +01:00
John J. Camilleri
bca1e2286d
New handling of tables, works for all tests but Phrasebook still fails
2021-03-04 16:42:56 +01:00
John J. Camilleri
94f76b9e36
Add more tests to Params5 which cause it to fail again
...
Originally found in PhrasebookFre
2021-03-04 13:38:55 +01:00
John J. Camilleri
f5886bf447
Add more complex param/table unit tests and pass them. Still fails on Phrasebook though.
2021-03-04 12:37:12 +01:00
John J. Camilleri
0ba0438dc7
Add a little colour to benchmark output
2021-03-04 10:20:57 +01:00
John J. Camilleri
30b016032d
Also store Pre prefixes in token map. Introduce IntMapBuilder data structure.
...
Storing of prefixes uses show/read, which isn't a great solution but avoids having yet another token map.
2021-03-04 09:58:17 +01:00
John J. Camilleri
4082c006c3
Extract token strings and put them in map which linfuns refer to by index, to reduce LPGF sizes.
2021-03-04 00:16:12 +01:00
John J. Camilleri
adc162b374
Pass all unit tests and Foods again, with new strategy. Cleanup.
2021-03-03 15:21:32 +01:00
John J. Camilleri
3beed2c49e
Replace list comprehension lookups with maps. Halfway through transitioning to new strategy for tables/params, see testsuite/lpgf/README.md.
2021-03-03 13:26:03 +01:00
John J. Camilleri
a8e3dc8855
Improve mkTreebank script. Add 100-tree Phrasebook treebank. Improve output in testsuite.
2021-03-03 11:01:31 +01:00
John J. Camilleri
997d7c1694
Use ErrorMonad instead of IOE
...
It probably ends up being the same thing, but the code is a little cleaner for it.
2021-03-03 09:36:48 +01:00
John J. Camilleri
4c09e4a340
Remove LF prefix from constructors. Pass all unit tests and Foods again, but improvements/cleanup still necessary.
2021-03-03 09:19:52 +01:00
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
9785f8351d
Reduce Params2 further
2021-02-26 11:52:12 +01:00
John J. Camilleri
6a5d735904
Reduce Params2 unittest (still fails)
2021-02-26 10:26:11 +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
20290be616
Add Params2 unit test, from problem uncovered in PhrasebookGer
2021-02-22 10:52:37 +01:00
John J. Camilleri
b4a393ac09
Pass missing unit test
2021-02-21 14:22:46 +01:00
John J. Camilleri
9942908df9
Add unit test for missing lins
2021-02-21 14:05:31 +01:00
John J. Camilleri
dca2ebaf72
Add Phrasebook to testsuite. Move grammars into subfolders. Add run-bench script.
2021-02-20 13:22:29 +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
9f3f4139b1
Grammar and languages to run in testsuite can be specified by command line options, see README
2021-02-19 11:14:55 +01:00
John J. Camilleri
505c12c528
Rename run.hs to test.hs
2021-02-19 09:33:35 +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
2b0493eece
Tweak memory reporting and strictness in benchmark
2021-02-19 09:18:01 +01:00
John J. Camilleri
51e543878b
Add support for wildcards when specifying modules names in benchmark compilation
2021-02-18 21:34:23 +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
5240749fad
Make grammar and trees files command line arguments into benchmark script
2021-02-18 15:27:25 +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
7a5bc2dab3
Separate compile/run in benchmark
2021-02-17 16:57:06 +01:00
John J. Camilleri
9a263450f5
Add PFG2 linearisation to benchmark
2021-02-17 15:30:11 +01:00
John J. Camilleri
8e1fa4981f
Add memory stats to benchmark
2021-02-17 15:02:39 +01:00
John J. Camilleri
b4fce5db59
Use envvars in benchmark for controlling PGF/LPGF. Add readme.
2021-02-17 11:44:00 +01:00
John J. Camilleri
6a7ead0f84
Add benchmark for comparing PGF and LPGF
2021-02-17 10:04:36 +01:00
John J. Camilleri
d3988f93d5
writePGF et al. functions return path[s] of written files
2021-02-17 10:03:52 +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