2019-10-03 01:23:27 +03:00
|
|
|
(system-include "assert.h")
|
|
|
|
(system-include "stddef.h")
|
|
|
|
(system-include "stdlib.h")
|
2020-02-21 14:28:34 +03:00
|
|
|
(system-include "stdint.h")
|
|
|
|
(system-include "inttypes.h")
|
2019-10-03 01:23:27 +03:00
|
|
|
(system-include "float.h")
|
|
|
|
(system-include "limits.h")
|
|
|
|
(system-include "string.h")
|
|
|
|
(system-include "math.h")
|
|
|
|
(system-include "ctype.h")
|
|
|
|
(system-include "stdarg.h")
|
|
|
|
(system-include "stdio.h")
|
|
|
|
(system-include "time.h")
|
|
|
|
(system-include "carp_stdbool.h")
|
|
|
|
(system-include "core.h")
|
|
|
|
(system-include "carp_memory.h")
|
2019-11-21 00:26:59 +03:00
|
|
|
|
2020-05-05 16:00:57 +03:00
|
|
|
(load-once "Interfaces.carp")
|
2020-12-20 23:21:14 +03:00
|
|
|
(load-once "Blitable.carp")
|
2020-05-05 16:00:57 +03:00
|
|
|
(load-once "Bool.carp")
|
|
|
|
(load-once "Macros.carp")
|
2020-11-28 14:53:18 +03:00
|
|
|
(load-once "List.carp")
|
|
|
|
(load-once "Gensym.carp")
|
|
|
|
(load-once "ControlMacros.carp")
|
|
|
|
(load-once "Project.carp")
|
|
|
|
(load-once "Platform.carp")
|
2020-05-22 08:16:55 +03:00
|
|
|
(load-once "Introspect.carp")
|
2020-05-12 22:58:40 +03:00
|
|
|
(load-once "Pointer.carp")
|
|
|
|
(load-once "Unsafe.carp")
|
2020-11-27 12:17:29 +03:00
|
|
|
(load-once "Function.carp")
|
2020-05-05 16:00:57 +03:00
|
|
|
(load-once "Generics.carp")
|
|
|
|
(load-once "Maybe.carp")
|
|
|
|
(load-once "Result.carp")
|
|
|
|
(load-once "Dynamic.carp")
|
|
|
|
(load-once "Format.carp")
|
|
|
|
(load-once "Byte.carp")
|
|
|
|
(load-once "Int.carp")
|
|
|
|
(load-once "Long.carp")
|
|
|
|
(load-once "Double.carp")
|
|
|
|
(load-once "Float.carp")
|
|
|
|
(load-once "Tuples.carp")
|
|
|
|
(load-once "Array.carp")
|
2020-11-28 14:53:18 +03:00
|
|
|
(load-once "StaticArray.carp")
|
2020-10-26 22:14:50 +03:00
|
|
|
(load-once "StdInt.carp")
|
2020-05-05 16:00:57 +03:00
|
|
|
(load-once "Char.carp")
|
|
|
|
(load-once "String.carp")
|
2020-05-21 16:23:29 +03:00
|
|
|
(load-once "ArrayExt.carp")
|
2020-05-05 16:00:57 +03:00
|
|
|
(load-once "System.carp")
|
|
|
|
(load-once "IO.carp")
|
|
|
|
(load-once "Pattern.carp")
|
|
|
|
(load-once "Debug.carp")
|
|
|
|
(load-once "Format.carp")
|
|
|
|
(load-once "Random.carp")
|
|
|
|
(load-once "Map.carp")
|
|
|
|
(load-once "Heap.carp")
|
|
|
|
(load-once "Sort.carp")
|
|
|
|
(load-once "Binary.carp")
|
|
|
|
(load-once "Control.carp")
|
2020-06-18 01:16:58 +03:00
|
|
|
(load-once "Opaque.carp")
|
More Unit type member enhancements (#986)
* Emit/Deftype: Add a few more special cases for Unit members
There were a few gaps remaining in our handling of Unit types as members
of user defined types, most notably, generic setters weren't handling
Units appropriately. This commit adds special checks for Unit types in
generic setters, and also accounts for a Unit refs:
- Specialize generic setter functions against Unit members
- Specialize calls to str/prn against Unit members in StructUtils
(rather than accessing the struct member, which doesn't exist in the
Unit case, we simple call Unit's prn function (added in the next
commit).
- Don't bind references to Unit values to variables. This fixes an error
whereby a reference to a Unit would generate invalid C such as:
`void* _9 = &;`
Likewise, we omit references to Units from function arguments just as
we omit Unit values.
* Unit: Add Unit type implementations for common interfaces.
Now that Unit can be used as a member type it is subject to several
interfaces, such as prn, that it previously hadn't implemented.
This commit adds Unit.carp to core which implements `prn`, `copy`, and
`zero` for the Unit type.
* Deftype: Return null pointers for Unit getters
This is *hopefully* one of the final updates needed to fully support
Unit's as member types. Getters for fields of such types have no struct
member to read, but are expected to return a void pointer; so we return
a NULL void pointer instead.
This commit also updates our emissions for function calls to prevent
assigning the results of functions with Unit and (Ref Unit) return types
to variables.
* Emit: Filter void args from lambda calls
Just as we filter void argument types from other function calls, we now
filter them from calls to lambdas.
2020-11-21 07:57:03 +03:00
|
|
|
(load-once "Unit.carp")
|
2020-05-01 13:50:31 +03:00
|
|
|
|
2020-05-12 21:24:40 +03:00
|
|
|
(posix-only
|
|
|
|
(system-include "sys/wait.h")
|
|
|
|
(system-include "unistd.h")
|
|
|
|
(system-include "signal.h"))
|