Commit Graph

346 Commits

Author SHA1 Message Date
Erik
260dd44c61 moved concretizing of lens functions to much better location 2016-05-31 13:52:10 +02:00
Erik
e09d3511c9 stub thingy works! 2016-05-31 09:55:51 +02:00
Erik
8eb08fda2d code is being stubborn... generic structs is harder than expected 2016-05-30 16:56:18 +02:00
Erik
061393714a cleanup (of unfinished code) 2016-05-30 15:01:17 +02:00
Erik
131c1caaaf tests run... 2016-05-30 14:44:13 +02:00
Erik
8b4568c3a3 concretizing structs based on lenses is problematic 2016-05-30 12:47:30 +02:00
Erik Svedäng
0a63e271af tests run, have still not solved the problem with stub lens functions 2016-05-27 16:33:00 +02:00
Erik Svedäng
ec65c3a108 prevent refs in structs 2016-05-27 14:41:06 +02:00
Erik Svedäng
37e7cb90dc compiling generic structs work now (for 1 typevar) 2016-05-27 13:57:04 +02:00
Erik Svedäng
7c911d2490 Merge branch 'master' of https://github.com/eriksvedang/Carp 2016-05-27 13:05:17 +02:00
Erik Svedäng
e73106cbe7 delete _string 2016-05-27 13:05:06 +02:00
Erik
eccfe39610 making strides towards the generic struct of our dreams... 2016-05-26 10:09:30 +02:00
Erik Svedäng
ce24d00241 some more work on generic structs 2016-05-25 08:45:34 +02:00
Erik
7b21a35104 starting to think about generic structs... 2016-05-23 16:19:00 +02:00
Erik
0643b72f73 fixed bug with printing of char in ptr-to-global 2016-05-23 13:31:08 +02:00
Erik
d9406b2209 and & or are macros now 2016-05-18 19:36:53 +02:00
Erik
bd8afafd01 "or" 2016-05-18 18:54:56 +02:00
Erik
38473975b2 moved functions to test files 2016-05-18 18:07:58 +02:00
Erik
180ff2ab53 'reduce' works! 2016-05-18 17:56:00 +02:00
Erik
5f6b0a31c3 prevented infinite recursion in constraint solver 2016-05-18 16:42:04 +02:00
Erik Svedäng
30b315d37f big problems with 'reduce'... get infinite recursion in
extend-substitutions :(
2016-05-02 22:03:30 +02:00
Erik Svedäng
a90d94eeaf reduce 2016-05-02 11:25:44 +02:00
Erik Svedäng
64e407f4be can compare non-ref primitive types again 2016-05-02 11:14:16 +02:00
Erik Svedäng
78762a34e5 Bounds checking on arrays 2016-05-02 10:33:14 +02:00
Erik Svedäng
dfe9f59932 hmm... 2016-05-02 10:27:23 +02:00
Erik Svedäng
ed5e7fe012 handle true case 2016-05-02 10:10:16 +02:00
Erik Svedäng
1d2a509e9a 'error' can be baked 2016-05-02 08:26:34 +02:00
Erik Svedäng
14edefc930 can compile part of Rövarspråket algorithm 2016-05-02 08:05:57 +02:00
Erik Svedäng
1be6dde0c9 need to add a special form for 'or' 2016-04-27 21:45:05 +02:00
Erik Svedäng
8bc17bf786 and* 2016-04-27 21:18:12 +02:00
Erik Svedäng
05efae290d and binop, *-macros 2016-04-27 21:09:43 +02:00
Erik Svedäng
f558271235 equality for all types 2016-04-27 15:34:41 +02:00
Erik Svedäng
1c98133a06 clean up of more tests 2016-04-27 10:46:26 +02:00
Erik Svedäng
a61097c2cd Not allow putting refs into an array 2016-04-27 10:13:21 +02:00
Erik Svedäng
4632c589b6 more work 2016-04-26 11:38:38 +02:00
Erik Svedäng
07fcc11d8a started working on str* macro 2016-04-26 11:33:06 +02:00
Erik Svedäng
b92cc0e407 sending Obj arrays to ffi functions is more complete 2016-04-26 11:06:22 +02:00
Erik Svedäng
843b1cdac3 globals of various kinds work 2016-04-26 00:06:27 +02:00
Erik Svedäng
0f8955152a clean up docs 2016-04-25 23:35:20 +02:00
Erik
12139f20a4 handle OS signals 2016-04-25 17:26:25 +02:00
Erik
2bf19f4fed update function 2016-04-25 16:59:49 +02:00
Erik
97aa41b33d all the letters! 2016-04-25 16:56:43 +02:00
Erik
c3d31d23e5 minor fixes 2016-04-25 16:36:44 +02:00
Erik Svedäng
05e239013e p_sort_by has some kind of error... 2016-04-25 11:58:20 +02:00
Erik Svedäng
5c522e17f4 still some bug in faster 'extend-substitutions' 2016-04-25 10:58:57 +02:00
Erik Svedäng
cb039cdcf8 add 'types-exactly-eq?' 2016-04-25 07:49:17 +02:00
Erik Svedäng
d4ff624924 slashed infer-time by ~40-50% :D 2016-04-25 07:33:12 +02:00
Erik Svedäng
d866be114c implemented lookup-in-substs-fast 2016-04-25 06:56:35 +02:00
Erik Svedäng
8f3c511d9f preparing for faster unification 2016-04-25 00:00:56 +02:00
Erik Svedäng
b2ac56ae49 remove call to bake exe 2016-04-24 23:38:29 +02:00
Erik Svedäng
b7d464bb6b ownership in arrays seems fine 2016-04-24 23:36:42 +02:00
Erik Svedäng
37a43ffed0 moved test 2016-04-24 22:58:21 +02:00
Erik Svedäng
b2499bc0c9 add :Array in calculate_lifetimes.carp 2016-04-24 22:52:09 +02:00
Erik Svedäng
681f4954f6 fixing memory leaks in generated C code 2016-04-24 22:20:18 +02:00
Erik Svedäng
6a495a3d09 cleanup 2016-04-24 21:01:15 +02:00
Erik Svedäng
45de5be946 globals with arrays and structs works now!!! 2016-04-24 20:57:08 +02:00
Erik Svedäng
28ed8a4603 tests run again, solved segfault 2016-04-23 23:21:04 +02:00
Erik
f4948747fb still got some crashes when baking global variables, something with the GC 2016-04-22 16:53:17 +02:00
Erik
ba2ed774e2 spaces 2016-04-22 12:11:44 +02:00
Erik
44d058c79f much more sane solution for building exe:s 2016-04-22 09:59:05 +02:00
Erik
cc4deec25a things work, savepoint! 2016-04-22 07:34:40 +02:00
Erik
f79c6067b0 no log 2016-04-21 16:11:16 +02:00
Erik
9f4170e8d3 all tests run now, can redefine structs 2016-04-21 16:06:24 +02:00
Erik
00584a6236 can redefine structs deep in a hierarchy 2016-04-21 15:49:50 +02:00
Erik
13094c1096 structs will depend on the groups of their members (if they are structs) 2016-04-21 14:08:54 +02:00
Erik
b7879efbfd sort struct defintions by order 2016-04-21 13:35:24 +02:00
Erik
bb5acca520 moved test 2016-04-21 11:29:29 +02:00
Erik
2877ba38d2 fixed tests 2016-04-21 11:18:18 +02:00
Erik
f3cd32266c concrete versions of functions depends on their generic originals in the graph 2016-04-21 11:00:26 +02:00
Erik
1a71073463 all functions for a struct are compiled into a single dylib (group) 2016-04-21 10:27:22 +02:00
Erik
4470b703a5 made ALL deps into strings 2016-04-21 09:20:50 +02:00
Erik
6d1afd2a3a all tests run again! 2016-04-21 09:10:51 +02:00
Erik Svedäng
a2d18099ef more cleanup of compiler.carp 2016-04-20 15:18:37 +02:00
Erik Svedäng
c10c3b3585 removed unnecessary saving of prototypes 2016-04-20 12:45:54 +02:00
Erik Svedäng
62255b2ee8 removed function-dependency-graph and its functions 2016-04-20 12:23:24 +02:00
Erik Svedäng
74752c83fb cleaning up 2016-04-20 12:09:45 +02:00
Erik Svedäng
f505e65566 faster! 2016-04-19 23:38:29 +02:00
Erik Svedäng
82385359a4 fixed typograf so that it compiles with new map-copy signature 2016-04-16 11:07:41 +02:00
Erik
cde9a472b1 more glyphs 2016-04-15 18:13:37 +02:00
Erik
738c8010e9 Ownership in while loops 2016-04-15 14:42:38 +02:00
Erik
0714828977 fixed bug with dashes in names of globals 2016-04-15 14:07:19 +02:00
Erik
2eee495411 cleanup 2016-04-15 13:44:58 +02:00
Erik Svedäng
26b0e2bc8d can bake init closures 2016-04-15 10:23:21 +02:00
Erik Svedäng
f4dcf2fe5c tests run 2016-04-15 00:21:03 +02:00
Erik Svedäng
e2bd8060d4 todo 2016-04-15 00:01:12 +02:00
Erik Svedäng
bac947df62 can use arrays of arrays in globals 2016-04-14 23:52:37 +02:00
Erik Svedäng
fd337bf946 cleanups 2016-04-14 23:27:19 +02:00
Erik Svedäng
cf979de6c2 can reset arrays too 2016-04-14 22:30:28 +02:00
Erik
d4380d48cc cleanup before meetup 2016-04-14 18:03:15 +02:00
Erik Svedäng
5296871b63 can't reset baked arrays from repl 2016-04-14 00:05:21 +02:00
Erik Svedäng
89c94038d9 moved code to tests 2016-04-13 23:52:26 +02:00
Erik Svedäng
79e8b08a83 solved bugs, can now print pointers to globals in the repl 2016-04-13 23:48:56 +02:00
Erik Svedäng
a002cb6659 messing around with globals... 2016-04-13 23:34:09 +02:00
Erik Svedäng
ed40c3cf98 found bug with shared builder (need to enable it before defining structs) 2016-04-13 21:24:32 +02:00
Erik Svedäng
2001c637e2 made the reader accept bigger inputs 2016-04-13 17:53:55 +02:00
Erik Svedäng
4dbff45738 tried to fix the reader so that it can handle big forms 2016-04-13 17:50:38 +02:00
Erik Svedäng
a5f930cbda more messing around with globals and their initialization 2016-04-13 15:57:17 +02:00
Erik Svedäng
c8cecd1bdc can reset! baked global variables 2016-04-13 14:43:00 +02:00
Erik Svedäng
05ad46f701 baked global variables are shared between functions in repl 2016-04-13 13:36:12 +02:00
Erik Svedäng
d5ec94d7c6 automatically enable shared builder when baking exe 2016-04-13 10:21:45 +02:00
Erik Svedäng
d379a8752b changed name of "functions.h" to "declarations.h" 2016-04-13 09:53:45 +02:00
Erik Svedäng
abc7439640 can bake an exe with no .so dependencies! 2016-04-13 09:45:47 +02:00
Erik Svedäng
e2c2d1ceed tricky to make shared builder work 2016-04-12 19:51:44 +02:00
Erik Svedäng
4243d223f4 preparations for shared builder 2016-04-12 06:53:53 +02:00
Erik Svedäng
15e305112e Merge branch 'master' of https://github.com/eriksvedang/Carp 2016-04-11 22:22:04 +02:00
Erik Svedäng
f2dce9ece8 can profile external compile time (it's tiny) 2016-04-11 22:21:45 +02:00
Erik
c8c980d832 presentation update 2016-04-11 16:50:59 +02:00
Erik Svedäng
c48ba0844b let statements can't return refs any more 2016-04-11 16:45:42 +02:00
Erik Svedäng
37173f07a0 tried to find bugs, fixed error with sending arrays to ffi functions 2016-04-11 16:28:37 +02:00
Erik Svedäng
b4a8d8a939 more fix 2016-04-11 15:25:00 +02:00
Erik Svedäng
c3949136ad new (less constraint-heavy) approach to array literals 2016-04-11 15:10:30 +02:00
Erik
522bd70094 neater spin 2016-03-31 16:48:39 +02:00
Erik
51ee5a2287 added new spin example to front page 2016-03-31 16:34:19 +02:00
Erik
99040f98b6 ready for Compile 2016-03-31 16:30:06 +02:00
Erik
d87ffeeaa5 thinking about the abundance of constraints for arrays 2016-03-31 11:45:57 +02:00
Erik
b04e43892d more presentation 2016-03-31 10:50:27 +02:00
Erik
55ff26a0d4 spin is nice 2016-03-31 10:35:57 +02:00
Erik
793e001a93 much better spin 2016-03-31 10:29:48 +02:00
Erik
444ac10a2a nr of constraints from arrays is toooo friggin high 2016-03-31 10:19:15 +02:00
Erik
b2495a2ad7 some letters work 2016-03-31 10:15:24 +02:00
Erik
730757bc6d made map-copy take a ref instead 2016-03-31 08:53:31 +02:00
Erik
e891e48e35 add presentation 2016-03-31 07:55:53 +02:00
Erik
2caa2177a1 OK, done 2016-03-30 13:43:37 +02:00
Erik
f157bab486 a better method for defining letters 2016-03-30 13:38:20 +02:00
Erik
1def412483 init metod for glfw-app 2016-03-30 13:29:24 +02:00
Erik
da3f3b431f extracted conversions to 'obj_conversions.c', seems to have solved weird
crash bug..?!
2016-03-30 13:11:47 +02:00
Erik
d06ef4c6c4 cleaned up output 2016-03-30 10:13:02 +02:00
Erik
f8a2f648da typograf can be baked 2016-03-30 09:34:47 +02:00
Erik
c7fe9140e5 can change glyph to render (in repl) 2016-03-30 09:05:42 +02:00
Erik
e25102781d cleanup of typograf 2016-03-30 08:40:40 +02:00
Erik
f489674b16 extracted primitive_to_obj function 2016-03-30 08:29:59 +02:00
Erik
0755ad35d6 cleanup 2016-03-29 22:31:22 +02:00
Erik
62aad23621 typograf can draw shapes 2016-03-29 22:20:05 +02:00
Erik
6972f17c27 solved gc error (shadowstack needed for struct during construction) 2016-03-29 17:41:35 +02:00
Erik
510fd984ed can send nested arrays as arguments to structures 2016-03-29 17:11:45 +02:00
Erik
d3ba2ac05f can handle int arrays as arguments to struct constructors 2016-03-29 16:34:04 +02:00
Erik Svedäng
4272e362ef started work on sending arrays as args, and allowing arrays in structs 2016-03-29 15:22:43 +02:00
Erik Svedäng
4fc8cf01fc pipe macros seem to work now... 2016-03-29 13:05:00 +02:00
Erik Svedäng
d8f2a435a0 FIXED: Can send compiled ffi-function to another ffi-function that expects a struct 2016-03-24 10:57:33 +01:00
Erik Svedäng
355b135f1c concat checks all its args 2016-03-24 10:28:27 +01:00
Erik Svedäng
be49afd97f turned "join" into a primop 2016-03-24 10:21:20 +01:00
Erik Svedäng
aac91bfec5 FIXED: Self recuring function doesn't check argument count/types in the actual call to itself 2016-03-24 10:02:37 +01:00
Erik Svedäng
eca0efa1c4 enough 2016-03-24 00:05:42 +01:00
Erik Svedäng
d958dabaaf arrays get line info in type errors 2016-03-23 23:46:48 +01:00
Erik Svedäng
79a1a9ae0f reset!-statements have nice type errors too 2016-03-23 23:39:27 +01:00
Erik Svedäng
60be049cb8 while expression 2016-03-23 23:30:27 +01:00
Erik Svedäng
9ac965e2a2 if statements are better reported 2016-03-23 23:24:13 +01:00
Erik Svedäng
87e79065cc cleanup and better help for if expression 2016-03-23 23:09:07 +01:00
Erik Svedäng
fd5f601f48 type errors are OK now, wrong arg count is still ugly 2016-03-23 17:31:45 +01:00
Erik Svedäng
06b3a4cd12 much better error reporting on type errors for args to functions 2016-03-23 16:50:42 +01:00
Erik
11b022348e implemented quick sort 2016-03-23 14:03:34 +01:00
Erik Svedäng
9bef46ccdc not so easy 2016-03-23 11:53:27 +01:00
Erik Svedäng
b483e86054 arg location for type errors in arguments 2016-03-23 11:17:12 +01:00
Erik Svedäng
b57e7f802d even better type errors 2016-03-23 10:32:08 +01:00
Erik Svedäng
e9b086edc6 colors on type errors 2016-03-23 10:08:47 +01:00
Erik Svedäng
d9a8f9a020 MUCH better errors when typechecking fails 2016-03-23 09:52:48 +01:00
Erik Svedäng
bfe012a65e fixed bug with printing of stack trace 2016-03-23 08:57:38 +01:00
Erik
f923a55b39 have to allow lambda with missing type information 2016-03-22 17:56:40 +01:00
Erik
fbf807f3eb blergh 2016-03-22 17:33:20 +01:00
Erik
4c2d32b457 can't find bug: (map println state) makes the type system create an instance of "map" that expects a void->void function 2016-03-22 17:26:01 +01:00
Erik
4742111387 FIXED: Double arguments generate weird _lit variable 2016-03-22 17:19:04 +01:00
Erik Svedäng
fa13a06450 blergh 2016-03-21 08:57:35 +01:00
Erik Svedäng
b9c65a2635 can send functions to (bake ...) 2016-03-21 08:55:11 +01:00
Erik Svedäng
0e37d77552 meta for let bindings is messed up 2016-03-21 08:41:00 +01:00
Erik
38e16d4f2a modes are starting to work well 2016-03-21 07:40:25 +01:00
Erik
66acbedf41 inf-carp-mode 2016-03-21 07:12:22 +01:00
Erik Svedäng
75d8724072 started thinking about reduce/fold 2016-03-18 08:20:30 +01:00
Erik Svedäng
f0e2e1db73 removed annotations 2016-03-18 07:46:15 +01:00
Erik Svedäng
8dbfa35061 new readme 2016-03-18 07:40:57 +01:00
Erik Svedäng
673da910bb fixed the tests, added str-ref macro 2016-03-18 00:02:23 +01:00
Erik Svedäng
a6e052d98c solved severe bug in constraint solver, fixed the game 2016-03-17 23:37:50 +01:00
Erik Svedäng
f75a7ddb61 error when a lambda fails to concretezize during compilation 2016-03-17 22:19:40 +01:00
Erik Svedäng
9fddbab5f4 speed function 2016-03-17 21:35:31 +01:00
Erik Svedäng
50ef7a3ef8 ship movement! 2016-03-17 20:34:56 +01:00
Erik Svedäng
81136fa681 screen coordinates 2016-03-17 20:10:24 +01:00
Erik Svedäng
0752c724af made double the default number type, and made tests work with that 2016-03-17 19:57:00 +01:00
Erik Svedäng
b47987a110 glfwGetTime produces a double 2016-03-17 19:42:00 +01:00
Erik Svedäng
8761dfa94b bools seems fine now 2016-03-17 10:53:04 +01:00
Erik
7c8d7f773a domap implemented 2016-03-16 18:42:06 +01:00
Erik
a88932a1f4 "count" for arrays 2016-03-16 18:35:35 +01:00
Erik
634cf3ae76 fixed bugs with import of header files etc 2016-03-16 18:25:06 +01:00
Erik
e52a11ad1b failed to improve macros :/ 2016-03-16 17:09:49 +01:00
Erik
cd0b822aaf remove blergh 2016-03-16 15:58:31 +01:00
Erik
6bcdb06600 solved bugs with printing of structs 2016-03-16 15:44:48 +01:00
Erik
04d9682cfc time for new stuff 2016-03-16 13:48:45 +01:00
Erik Svedäng
4b18a256fc fixed failed test with "nth" 2016-03-16 11:26:58 +01:00
Erik Svedäng
08bdbf3909 "nth" has correct signature 2016-03-16 11:14:32 +01:00
Erik Svedäng
8fa70b292c can draw a line strip from an array of Vec2 2016-03-16 11:10:36 +01:00
Erik Svedäng
6d9cf03dd9 annotation 2016-03-16 10:32:56 +01:00
Erik Svedäng
dd0df245b4 fixed bugs with sending lambdas as args to ffi 2016-03-16 10:01:46 +01:00
Erik Svedäng
1893f692dd can call lambdas (uncompiled) from ffi functions (compiled) 2016-03-16 09:35:27 +01:00
Erik Svedäng
8fe1f469f3 tiny fix 2016-03-15 23:48:58 +01:00
Erik Svedäng
709618ac58 can send file to carp on command line 2016-03-15 23:46:34 +01:00
Erik Svedäng
3edab8d5b8 tweaks 2016-03-15 22:57:53 +01:00
Erik
7f3523a042 game example 2016-03-15 22:44:44 +01:00
Erik
2f53dec1b4 add example folder 2016-03-15 12:56:55 +01:00