diff --git a/src/Compiler/Scheme/Common.idr b/src/Compiler/Scheme/Common.idr index 05362a1..1774212 100644 --- a/src/Compiler/Scheme/Common.idr +++ b/src/Compiler/Scheme/Common.idr @@ -425,7 +425,7 @@ parameters (schExtPrim : Int -> ExtPrim -> List NamedCExp -> Core String, schExtCommon i VoidElim [_, _] = pure "(display \"Error: Executed 'void'\")" schExtCommon i SysOS [] - = pure $ show os + = pure $ "(blodwen-os)" schExtCommon i (Unknown n) args = throw (InternalError ("Can't compile unknown external primitive " ++ show n)) schExtCommon i prim args diff --git a/support/chez/support.ss b/support/chez/support.ss index 3434818..5e36f73 100644 --- a/support/chez/support.ss +++ b/support/chez/support.ss @@ -1,3 +1,10 @@ +(define (blodwen-os) + (case (machine-type) + [(i3le ti3le a6le ta6le) "unix"] + [(i3osx ti3osx a6osx ta6osx) "darwin"] + [(i3nt ti3nt a6nt ta6nt) "windows"] + [else "unknown"])) + (define blodwen-read-args (lambda (desc) (case (vector-ref desc 0) ((0) '())