diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-12-16 12:07:21 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-12-16 12:07:21 +0000 |
| commit | 898d5b2dd44d84f876e2ec0c95f8c35d166a98bd (patch) | |
| tree | e93ee012340637b90864015cc3e63cfc23f77ec5 /runtime/src | |
| parent | efde2450dbd8c491135edc87975fb075945027f2 (diff) | |
Extract closures.h
Diffstat (limited to 'runtime/src')
| -rw-r--r-- | runtime/src/closures.h | 17 | ||||
| -rw-r--r-- | runtime/src/effects.c | 2 | ||||
| -rw-r--r-- | runtime/src/shed.h | 14 |
3 files changed, 19 insertions, 14 deletions
diff --git a/runtime/src/closures.h b/runtime/src/closures.h new file mode 100644 index 00000000..50cae18b --- /dev/null +++ b/runtime/src/closures.h @@ -0,0 +1,17 @@ +#ifndef SHED_CLOSURES_H +#define SHED_CLOSURES_H + +#include "./primitives.h" + +struct ShedClosure { + void* function; + ShedObject freeVariables[]; +}; + +typedef struct ShedClosure ShedClosureStruct; + +typedef struct ShedClosure* ShedClosurePointer; + +typedef ShedObject* ShedEnv; + +#endif diff --git a/runtime/src/effects.c b/runtime/src/effects.c index f90e8b91..7f73130d 100644 --- a/runtime/src/effects.c +++ b/runtime/src/effects.c @@ -1,7 +1,7 @@ #include "./std/unistd.h" #include "./alloc.h" +#include "./closures.h" #include "./effects.h" -#include "./shed.h" struct ShedEffectHandler { ShedEffectTag effect_tag; diff --git a/runtime/src/shed.h b/runtime/src/shed.h index 5e0bbf8c..ff44cd9c 100644 --- a/runtime/src/shed.h +++ b/runtime/src/shed.h @@ -1,20 +1,8 @@ #ifndef SHED_H #define SHED_H -#include "./std/unistd.h" -#include "./patio/patio.h" +#include "./closures.h" #include "./primitives.h" #include "./strings.h" -struct ShedClosure { - void* function; - ShedObject freeVariables[]; -}; - -typedef struct ShedClosure ShedClosureStruct; - -typedef struct ShedClosure* ShedClosurePointer; - -typedef ShedObject* ShedEnv; - #endif |
