flake.nix: Use Racket's Chez for non-x86_64-linux platforms

It supports many more platforms, excerpt from the README:
> Supported platforms:
>
>     Windows: x86, x86_64
>     Mac OS: x86, x86_64, AArch64, PowerPC32
>     Linux: x86, x86_64, ARMv6, AArch64, PowerPC32
>     FreeBSD: x86, x86_64, ARMv6, AArch64, PowerPC32
>     OpenBSD: x86, x86_64, ARMv6, AArch64, PowerPC32
>     NetBSD: x86, x86_64, ARMv6, AArch64, PowerPC32
>     Solaris: x86, x86_64
>     Android: ARMv7, AArch64
>     iOS: AArch64

Link to the fork: https://github.com/racket/ChezScheme
This commit is contained in:
Las Safin 2021-07-28 16:20:39 +00:00 committed by CodingCellist
parent 1b6cc3ba1b
commit ca95781a74
6 changed files with 32 additions and 12 deletions

View File

@ -4,7 +4,7 @@
(import (chezscheme)) (import (chezscheme))
(case (machine-type) (case (machine-type)
[(i3fb ti3fb a6fb ta6fb) #f] [(i3fb ti3fb a6fb ta6fb) #f]
[(i3le ti3le a6le ta6le) (load-shared-object "libc.so.6")] [(i3le ti3le a6le ta6le tarm64le) (load-shared-object "libc.so.6")]
[(i3osx ti3osx a6osx ta6osx) (load-shared-object "libc.dylib")] [(i3osx ti3osx a6osx ta6osx) (load-shared-object "libc.dylib")]
[(i3nt ti3nt a6nt ta6nt) (load-shared-object "msvcrt.dll") (load-shared-object "ws2_32.dll")] [(i3nt ti3nt a6nt ta6nt) (load-shared-object "msvcrt.dll") (load-shared-object "ws2_32.dll")]
[else (load-shared-object "libc.so")]) [else (load-shared-object "libc.so")])
@ -6127,7 +6127,7 @@
(define CompilerC-45SchemeC-45ChezSep-startChezWinSh (lambda (arg-0 arg-1 arg-2) (DataC-45String-fastUnlines (cons "#!/bin/sh" (cons (PreludeC-45TypesC-45String-C-43C-43 "# " (CompilerC-45Generated-generatedString "Chez")) (cons "" (cons "set -e # exit on any error" (cons "" (cons "DIR=$(dirname \"$(readlink -f -- \"$0\")\")" (cons (PreludeC-45TypesC-45String-C-43C-43 "CHEZ=$(cygpath \"" (PreludeC-45TypesC-45String-C-43C-43 arg-0 "\")")) (cons (PreludeC-45TypesC-45String-C-43C-43 "export PATH=\"$DIR/" (PreludeC-45TypesC-45String-C-43C-43 arg-1 "\":$PATH")) (cons (PreludeC-45TypesC-45String-C-43C-43 "\"$CHEZ\" --program \"$DIR/" (PreludeC-45TypesC-45String-C-43C-43 arg-2 "\" \"$@\"")) (cons (PreludeC-45TypesC-45String-C-43C-43 "\"$CHEZ\" -q " (PreludeC-45TypesC-45String-C-43C-43 "--libdirs \"$DIR/" (PreludeC-45TypesC-45String-C-43C-43 arg-1 (PreludeC-45TypesC-45String-C-43C-43 "\" " (PreludeC-45TypesC-45String-C-43C-43 "--program \"$DIR/" (PreludeC-45TypesC-45String-C-43C-43 arg-2 (PreludeC-45TypesC-45String-C-43C-43 "\" " "\"$@\""))))))) '()))))))))))))) (define CompilerC-45SchemeC-45ChezSep-startChezWinSh (lambda (arg-0 arg-1 arg-2) (DataC-45String-fastUnlines (cons "#!/bin/sh" (cons (PreludeC-45TypesC-45String-C-43C-43 "# " (CompilerC-45Generated-generatedString "Chez")) (cons "" (cons "set -e # exit on any error" (cons "" (cons "DIR=$(dirname \"$(readlink -f -- \"$0\")\")" (cons (PreludeC-45TypesC-45String-C-43C-43 "CHEZ=$(cygpath \"" (PreludeC-45TypesC-45String-C-43C-43 arg-0 "\")")) (cons (PreludeC-45TypesC-45String-C-43C-43 "export PATH=\"$DIR/" (PreludeC-45TypesC-45String-C-43C-43 arg-1 "\":$PATH")) (cons (PreludeC-45TypesC-45String-C-43C-43 "\"$CHEZ\" --program \"$DIR/" (PreludeC-45TypesC-45String-C-43C-43 arg-2 "\" \"$@\"")) (cons (PreludeC-45TypesC-45String-C-43C-43 "\"$CHEZ\" -q " (PreludeC-45TypesC-45String-C-43C-43 "--libdirs \"$DIR/" (PreludeC-45TypesC-45String-C-43C-43 arg-1 (PreludeC-45TypesC-45String-C-43C-43 "\" " (PreludeC-45TypesC-45String-C-43C-43 "--program \"$DIR/" (PreludeC-45TypesC-45String-C-43C-43 arg-2 (PreludeC-45TypesC-45String-C-43C-43 "\" " "\"$@\""))))))) '())))))))))))))
(define CompilerC-45SchemeC-45ChezSep-startChezCmd (lambda (arg-0 arg-1 arg-2) (DataC-45String-fastUnlines (cons "@echo off" (cons "set APPDIR=%~dp0" (cons (PreludeC-45TypesC-45String-C-43C-43 "set PATH=%APPDIR%\\" (PreludeC-45TypesC-45String-C-43C-43 arg-1 ";%PATH%")) (cons (PreludeC-45TypesC-45String-C-43C-43 "\"" (PreludeC-45TypesC-45String-C-43C-43 arg-0 (PreludeC-45TypesC-45String-C-43C-43 "\" -q " (PreludeC-45TypesC-45String-C-43C-43 "--libdirs \"%APPDIR%/" (PreludeC-45TypesC-45String-C-43C-43 arg-1 (PreludeC-45TypesC-45String-C-43C-43 "\" " (PreludeC-45TypesC-45String-C-43C-43 "--program \"%APPDIR%/" (PreludeC-45TypesC-45String-C-43C-43 arg-2 (PreludeC-45TypesC-45String-C-43C-43 "\" " "%*"))))))))) '()))))))) (define CompilerC-45SchemeC-45ChezSep-startChezCmd (lambda (arg-0 arg-1 arg-2) (DataC-45String-fastUnlines (cons "@echo off" (cons "set APPDIR=%~dp0" (cons (PreludeC-45TypesC-45String-C-43C-43 "set PATH=%APPDIR%\\" (PreludeC-45TypesC-45String-C-43C-43 arg-1 ";%PATH%")) (cons (PreludeC-45TypesC-45String-C-43C-43 "\"" (PreludeC-45TypesC-45String-C-43C-43 arg-0 (PreludeC-45TypesC-45String-C-43C-43 "\" -q " (PreludeC-45TypesC-45String-C-43C-43 "--libdirs \"%APPDIR%/" (PreludeC-45TypesC-45String-C-43C-43 arg-1 (PreludeC-45TypesC-45String-C-43C-43 "\" " (PreludeC-45TypesC-45String-C-43C-43 "--program \"%APPDIR%/" (PreludeC-45TypesC-45String-C-43C-43 arg-2 (PreludeC-45TypesC-45String-C-43C-43 "\" " "%*"))))))))) '())))))))
(define CompilerC-45SchemeC-45ChezSep-startChez (lambda (arg-0 arg-1 arg-2) (PreludeC-45TypesC-45String-C-43C-43 (CompilerC-45SchemeC-45Chez-startChezPreamble) (DataC-45String-fastUnlines (cons (PreludeC-45TypesC-45String-C-43C-43 "export LD_LIBRARY_PATH=\"$DIR/" (PreludeC-45TypesC-45String-C-43C-43 arg-1 "\":$LD_LIBRARY_PATH")) (cons (PreludeC-45TypesC-45String-C-43C-43 "\"" (PreludeC-45TypesC-45String-C-43C-43 arg-0 (PreludeC-45TypesC-45String-C-43C-43 "\" -q " (PreludeC-45TypesC-45String-C-43C-43 "--libdirs \"$DIR/" (PreludeC-45TypesC-45String-C-43C-43 arg-1 (PreludeC-45TypesC-45String-C-43C-43 "\" " (PreludeC-45TypesC-45String-C-43C-43 "--program \"$DIR/" (PreludeC-45TypesC-45String-C-43C-43 arg-2 (PreludeC-45TypesC-45String-C-43C-43 "\" " "\"$@\""))))))))) '())))))) (define CompilerC-45SchemeC-45ChezSep-startChez (lambda (arg-0 arg-1 arg-2) (PreludeC-45TypesC-45String-C-43C-43 (CompilerC-45SchemeC-45Chez-startChezPreamble) (DataC-45String-fastUnlines (cons (PreludeC-45TypesC-45String-C-43C-43 "export LD_LIBRARY_PATH=\"$DIR/" (PreludeC-45TypesC-45String-C-43C-43 arg-1 "\":$LD_LIBRARY_PATH")) (cons (PreludeC-45TypesC-45String-C-43C-43 "\"" (PreludeC-45TypesC-45String-C-43C-43 arg-0 (PreludeC-45TypesC-45String-C-43C-43 "\" -q " (PreludeC-45TypesC-45String-C-43C-43 "--libdirs \"$DIR/" (PreludeC-45TypesC-45String-C-43C-43 arg-1 (PreludeC-45TypesC-45String-C-43C-43 "\" " (PreludeC-45TypesC-45String-C-43C-43 "--program \"$DIR/" (PreludeC-45TypesC-45String-C-43C-43 arg-2 (PreludeC-45TypesC-45String-C-43C-43 "\" " "\"$@\""))))))))) '()))))))
(define CompilerC-45SchemeC-45ChezSep-schHeader (lambda (arg-0 arg-1) (DataC-45String-fastUnlines (cons (PreludeC-45TypesC-45String-C-43C-43 "(import (chezscheme) (support) " (PreludeC-45TypesC-45String-C-43C-43 (DataC-45String-unwords (PreludeC-45Types-u--C-62C-62C-61_Monad_List arg-1 (lambda (u--cu) (PreludeC-45Types-u--pure_Applicative_List (PreludeC-45TypesC-45String-C-43C-43 "(" (PreludeC-45TypesC-45String-C-43C-43 u--cu ")")))))) ")")) (cons "(case (machine-type)" (cons " [(i3le ti3le a6le ta6le) (load-shared-object \"libc.so.6\")]" (cons " [(i3osx ti3osx a6osx ta6osx) (load-shared-object \"libc.dylib\")]" (cons " [(i3nt ti3nt a6nt ta6nt) (load-shared-object \"msvcrt.dll\")" (cons " (load-shared-object \"ws2_32.dll\")]" (cons " [else (load-shared-object \"libc.so\")]" (cons (DataC-45String-fastUnlines (PreludeC-45Types-u--C-62C-62C-61_Monad_List arg-0 (lambda (u--lib) (PreludeC-45Types-u--pure_Applicative_List (PreludeC-45TypesC-45String-C-43C-43 " (load-shared-object \"" (PreludeC-45TypesC-45String-C-43C-43 (LibrariesC-45UtilsC-45String-escapeStringChez u--lib) "\")")))))) (cons ")" '())))))))))))) (define CompilerC-45SchemeC-45ChezSep-schHeader (lambda (arg-0 arg-1) (DataC-45String-fastUnlines (cons (PreludeC-45TypesC-45String-C-43C-43 "(import (chezscheme) (support) " (PreludeC-45TypesC-45String-C-43C-43 (DataC-45String-unwords (PreludeC-45Types-u--C-62C-62C-61_Monad_List arg-1 (lambda (u--cu) (PreludeC-45Types-u--pure_Applicative_List (PreludeC-45TypesC-45String-C-43C-43 "(" (PreludeC-45TypesC-45String-C-43C-43 u--cu ")")))))) ")")) (cons "(case (machine-type)" (cons " [(i3le ti3le a6le ta6le tarm64le) (load-shared-object \"libc.so.6\")]" (cons " [(i3osx ti3osx a6osx ta6osx) (load-shared-object \"libc.dylib\")]" (cons " [(i3nt ti3nt a6nt ta6nt) (load-shared-object \"msvcrt.dll\")" (cons " (load-shared-object \"ws2_32.dll\")]" (cons " [else (load-shared-object \"libc.so\")]" (cons (DataC-45String-fastUnlines (PreludeC-45Types-u--C-62C-62C-61_Monad_List arg-0 (lambda (u--lib) (PreludeC-45Types-u--pure_Applicative_List (PreludeC-45TypesC-45String-C-43C-43 " (load-shared-object \"" (PreludeC-45TypesC-45String-C-43C-43 (LibrariesC-45UtilsC-45String-escapeStringChez u--lib) "\")")))))) (cons ")" '()))))))))))))
(define CompilerC-45SchemeC-45ChezSep-schFooter (lambda () "(collect 4)\xa;(blodwen-run-finalisers)\xa;")) (define CompilerC-45SchemeC-45ChezSep-schFooter (lambda () "(collect 4)\xa;(blodwen-run-finalisers)\xa;"))
(define CompilerC-45SchemeC-45ChezSep-makeShWindows (lambda (arg-0 arg-1 arg-2 arg-3) (let ((u--cmdFile (PreludeC-45TypesC-45String-C-43C-43 arg-1 ".cmd"))) (lambda (eta-0) (let ((act-24 (CoreC-45Core-writeFile u--cmdFile (CompilerC-45SchemeC-45ChezSep-startChezCmd arg-0 arg-2 arg-3) eta-0))) (case (vector-ref act-24 0) ((0) (let ((e-2 (vector-ref act-24 1))) (vector 0 e-2))) (else (CoreC-45Core-writeFile arg-1 (CompilerC-45SchemeC-45ChezSep-startChezWinSh arg-0 arg-2 arg-3) eta-0)))))))) (define CompilerC-45SchemeC-45ChezSep-makeShWindows (lambda (arg-0 arg-1 arg-2 arg-3) (let ((u--cmdFile (PreludeC-45TypesC-45String-C-43C-43 arg-1 ".cmd"))) (lambda (eta-0) (let ((act-24 (CoreC-45Core-writeFile u--cmdFile (CompilerC-45SchemeC-45ChezSep-startChezCmd arg-0 arg-2 arg-3) eta-0))) (case (vector-ref act-24 0) ((0) (let ((e-2 (vector-ref act-24 1))) (vector 0 e-2))) (else (CoreC-45Core-writeFile arg-1 (CompilerC-45SchemeC-45ChezSep-startChezWinSh arg-0 arg-2 arg-3) eta-0))))))))
(define CompilerC-45SchemeC-45ChezSep-makeSh (lambda (arg-0 arg-1 arg-2 arg-3 ext-0) (CoreC-45Core-writeFile arg-1 (CompilerC-45SchemeC-45ChezSep-startChez arg-0 arg-2 arg-3) ext-0))) (define CompilerC-45SchemeC-45ChezSep-makeSh (lambda (arg-0 arg-1 arg-2 arg-3 ext-0) (CoreC-45Core-writeFile arg-1 (CompilerC-45SchemeC-45ChezSep-startChez arg-0 arg-2 arg-3) ext-0)))
@ -6186,7 +6186,7 @@
(define CompilerC-45SchemeC-45Chez-showChezString (lambda (arg-0) (lambda (clam-0) (if (null? arg-0) clam-0 (let ((e-2 (car arg-0))) (let ((e-3 (cdr arg-0))) (cond ((equal? e-2 #\") (PreludeC-45TypesC-45String-C-43C-43 "\\\"" ((CompilerC-45SchemeC-45Chez-showChezString e-3) clam-0)))(else ((CompilerC-45SchemeC-45Chez-showChezChar e-2) ((CompilerC-45SchemeC-45Chez-showChezString e-3) clam-0)))))))))) (define CompilerC-45SchemeC-45Chez-showChezString (lambda (arg-0) (lambda (clam-0) (if (null? arg-0) clam-0 (let ((e-2 (car arg-0))) (let ((e-3 (cdr arg-0))) (cond ((equal? e-2 #\") (PreludeC-45TypesC-45String-C-43C-43 "\\\"" ((CompilerC-45SchemeC-45Chez-showChezString e-3) clam-0)))(else ((CompilerC-45SchemeC-45Chez-showChezChar e-2) ((CompilerC-45SchemeC-45Chez-showChezString e-3) clam-0))))))))))
(define CompilerC-45SchemeC-45Chez-showChezChar (lambda (arg-0) (lambda (clam-0) (cond ((equal? arg-0 #\\) (PreludeC-45TypesC-45String-C-43C-43 "\\\\" clam-0))(else (let ((sc0 (let ((sc1 (PreludeC-45EqOrd-u--C-60_Ord_Char arg-0 (PreludeC-45Types-chr 32)))) (cond ((equal? sc1 1) 1) (else (PreludeC-45EqOrd-u--C-62_Ord_Char arg-0 (PreludeC-45Types-chr (blodwen-toSignedInt 126 63)))))))) (cond ((equal? sc0 1) (PreludeC-45TypesC-45String-C-43C-43 (PreludeC-45TypesC-45String-C-43C-43 "\\x" (PreludeC-45TypesC-45String-C-43C-43 (LibrariesC-45UtilsC-45Hex-asHex (PreludeC-45Cast-u--cast_Cast_Char_Int arg-0)) ";")) clam-0)) (else (PreludeC-45Types-strCons arg-0 clam-0))))))))) (define CompilerC-45SchemeC-45Chez-showChezChar (lambda (arg-0) (lambda (clam-0) (cond ((equal? arg-0 #\\) (PreludeC-45TypesC-45String-C-43C-43 "\\\\" clam-0))(else (let ((sc0 (let ((sc1 (PreludeC-45EqOrd-u--C-60_Ord_Char arg-0 (PreludeC-45Types-chr 32)))) (cond ((equal? sc1 1) 1) (else (PreludeC-45EqOrd-u--C-62_Ord_Char arg-0 (PreludeC-45Types-chr (blodwen-toSignedInt 126 63)))))))) (cond ((equal? sc0 1) (PreludeC-45TypesC-45String-C-43C-43 (PreludeC-45TypesC-45String-C-43C-43 "\\x" (PreludeC-45TypesC-45String-C-43C-43 (LibrariesC-45UtilsC-45Hex-asHex (PreludeC-45Cast-u--cast_Cast_Char_Int arg-0)) ";")) clam-0)) (else (PreludeC-45Types-strCons arg-0 clam-0)))))))))
(define CompilerC-45SchemeC-45Chez-schemeCall (lambda (arg-0 arg-1 arg-2 arg-3) (let ((u--call (PreludeC-45TypesC-45String-C-43C-43 "(" (PreludeC-45TypesC-45String-C-43C-43 arg-1 (PreludeC-45TypesC-45String-C-43C-43 " " (PreludeC-45TypesC-45String-C-43C-43 (CoreC-45NameC-45Namespace-showSep " " (PreludeC-45Types-u--map_Functor_List (lambda (eta-0) (CompilerC-45SchemeC-45Common-schName eta-0)) arg-2)) ")")))))) (lambda (clam-0) (case (vector-ref arg-3 0) ((18) (vector 1 (CompilerC-45SchemeC-45Common-mkWorld u--call)))(else (vector 1 u--call))))))) (define CompilerC-45SchemeC-45Chez-schemeCall (lambda (arg-0 arg-1 arg-2 arg-3) (let ((u--call (PreludeC-45TypesC-45String-C-43C-43 "(" (PreludeC-45TypesC-45String-C-43C-43 arg-1 (PreludeC-45TypesC-45String-C-43C-43 " " (PreludeC-45TypesC-45String-C-43C-43 (CoreC-45NameC-45Namespace-showSep " " (PreludeC-45Types-u--map_Functor_List (lambda (eta-0) (CompilerC-45SchemeC-45Common-schName eta-0)) arg-2)) ")")))))) (lambda (clam-0) (case (vector-ref arg-3 0) ((18) (vector 1 (CompilerC-45SchemeC-45Common-mkWorld u--call)))(else (vector 1 u--call)))))))
(define CompilerC-45SchemeC-45Chez-schHeader (lambda (arg-0 arg-1 arg-2) (PreludeC-45TypesC-45String-C-43C-43 (let ((sc0 (PreludeC-45EqOrd-u--C-47C-61_Eq_String (SystemC-45Info-os) "windows"))) (cond ((equal? sc0 1) (PreludeC-45TypesC-45String-C-43C-43 "#!" (PreludeC-45TypesC-45String-C-43C-43 arg-0 (cond ((equal? arg-2 1) " --program\xa;\xa;") (else " --script\xa;\xa;"))))) (else ""))) (PreludeC-45TypesC-45String-C-43C-43 "; " (PreludeC-45TypesC-45String-C-43C-43 (CompilerC-45Generated-generatedString "Chez") (PreludeC-45TypesC-45String-C-43C-43 "\xa;" (PreludeC-45TypesC-45String-C-43C-43 "(import (chezscheme))\xa;" (PreludeC-45TypesC-45String-C-43C-43 "(case (machine-type)\xa;" (PreludeC-45TypesC-45String-C-43C-43 " [(i3fb ti3fb a6fb ta6fb) #f]\xa;" (PreludeC-45TypesC-45String-C-43C-43 " [(i3le ti3le a6le ta6le) (load-shared-object \"libc.so.6\")]\xa;" (PreludeC-45TypesC-45String-C-43C-43 " [(i3osx ti3osx a6osx ta6osx) (load-shared-object \"libc.dylib\")]\xa;" (PreludeC-45TypesC-45String-C-43C-43 " [(i3nt ti3nt a6nt ta6nt) (load-shared-object \"msvcrt.dll\")" (PreludeC-45TypesC-45String-C-43C-43 " (load-shared-object \"ws2_32.dll\")]\xa;" (PreludeC-45TypesC-45String-C-43C-43 " [else (load-shared-object \"libc.so\")])\xa;\xa;" (PreludeC-45TypesC-45String-C-43C-43 (CoreC-45NameC-45Namespace-showSep "\xa;" (PreludeC-45Types-u--map_Functor_List (lambda (u--x) (PreludeC-45TypesC-45String-C-43C-43 "(load-shared-object \"" (PreludeC-45TypesC-45String-C-43C-43 (LibrariesC-45UtilsC-45String-escapeStringChez u--x) "\")"))) arg-1)) (PreludeC-45TypesC-45String-C-43C-43 "\xa;\xa;" (cond ((equal? arg-2 1) "(let ()\xa;") (else "(source-directories (cons (getenv \"IDRIS2_INC_SRC\") (source-directories)))\xa;")))))))))))))))))) (define CompilerC-45SchemeC-45Chez-schHeader (lambda (arg-0 arg-1 arg-2) (PreludeC-45TypesC-45String-C-43C-43 (let ((sc0 (PreludeC-45EqOrd-u--C-47C-61_Eq_String (SystemC-45Info-os) "windows"))) (cond ((equal? sc0 1) (PreludeC-45TypesC-45String-C-43C-43 "#!" (PreludeC-45TypesC-45String-C-43C-43 arg-0 (cond ((equal? arg-2 1) " --program\xa;\xa;") (else " --script\xa;\xa;"))))) (else ""))) (PreludeC-45TypesC-45String-C-43C-43 "; " (PreludeC-45TypesC-45String-C-43C-43 (CompilerC-45Generated-generatedString "Chez") (PreludeC-45TypesC-45String-C-43C-43 "\xa;" (PreludeC-45TypesC-45String-C-43C-43 "(import (chezscheme))\xa;" (PreludeC-45TypesC-45String-C-43C-43 "(case (machine-type)\xa;" (PreludeC-45TypesC-45String-C-43C-43 " [(i3fb ti3fb a6fb ta6fb) #f]\xa;" (PreludeC-45TypesC-45String-C-43C-43 " [(i3le ti3le a6le ta6le tarm64le) (load-shared-object \"libc.so.6\")]\xa;" (PreludeC-45TypesC-45String-C-43C-43 " [(i3osx ti3osx a6osx ta6osx) (load-shared-object \"libc.dylib\")]\xa;" (PreludeC-45TypesC-45String-C-43C-43 " [(i3nt ti3nt a6nt ta6nt) (load-shared-object \"msvcrt.dll\")" (PreludeC-45TypesC-45String-C-43C-43 " (load-shared-object \"ws2_32.dll\")]\xa;" (PreludeC-45TypesC-45String-C-43C-43 " [else (load-shared-object \"libc.so\")])\xa;\xa;" (PreludeC-45TypesC-45String-C-43C-43 (CoreC-45NameC-45Namespace-showSep "\xa;" (PreludeC-45Types-u--map_Functor_List (lambda (u--x) (PreludeC-45TypesC-45String-C-43C-43 "(load-shared-object \"" (PreludeC-45TypesC-45String-C-43C-43 (LibrariesC-45UtilsC-45String-escapeStringChez u--x) "\")"))) arg-1)) (PreludeC-45TypesC-45String-C-43C-43 "\xa;\xa;" (cond ((equal? arg-2 1) "(let ()\xa;") (else "(source-directories (cons (getenv \"IDRIS2_INC_SRC\") (source-directories)))\xa;"))))))))))))))))))
(define CompilerC-45SchemeC-45Chez-schFooter (lambda (arg-0 arg-1) (PreludeC-45TypesC-45String-C-43C-43 "(collect 4)\xa;(blodwen-run-finalisers)\xa;" (PreludeC-45TypesC-45String-C-43C-43 (cond ((equal? arg-0 1) "(profile-dump-html)") (else "")) (cond ((equal? arg-1 1) ")\xa;") (else "\xa;")))))) (define CompilerC-45SchemeC-45Chez-schFooter (lambda (arg-0 arg-1) (PreludeC-45TypesC-45String-C-43C-43 "(collect 4)\xa;(blodwen-run-finalisers)\xa;" (PreludeC-45TypesC-45String-C-43C-43 (cond ((equal? arg-0 1) "(profile-dump-html)") (else "")) (cond ((equal? arg-1 1) ")\xa;") (else "\xa;"))))))
(define CompilerC-45SchemeC-45Chez-schFgnDef (lambda (arg-0 arg-1 arg-2 arg-3 arg-4 arg-5 arg-6) (case (vector-ref arg-5 0) ((2) (let ((e-0 (vector-ref arg-5 1))) (let ((e-1 (vector-ref arg-5 2))) (let ((e-2 (vector-ref arg-5 3))) (let ((u--argns (CompilerC-45SchemeC-45Chez-mkArgs 0 e-1))) (let ((u--allargns (PreludeC-45Types-u--map_Functor_List (lambda (eta-0) (Builtin-fst eta-0)) u--argns))) (let ((u--useargns (PreludeC-45Types-u--map_Functor_List (lambda (eta-0) (Builtin-fst eta-0)) (DataC-45List-filter (lambda (eta-0) (Builtin-snd eta-0)) u--argns)))) (lambda (eta-0) (let ((act-24 (CoreC-45Core-traverseC-39 (lambda (eta-1) (CompilerC-45SchemeC-45Chez-mkStruct arg-2 eta-1)) e-1 '() eta-0))) (case (vector-ref act-24 0) ((0) (let ((e-3 (vector-ref act-24 1))) (vector 0 e-3))) (else (let ((e-5 (vector-ref act-24 1))) (let ((act-25 ((CompilerC-45SchemeC-45Chez-mkStruct arg-2 e-2) eta-0))) (case (vector-ref act-25 0) ((0) (let ((e-3 (vector-ref act-25 1))) (vector 0 e-3))) (else (let ((e-6 (vector-ref act-25 1))) (let ((act-26 ((CompilerC-45SchemeC-45Chez-useCC arg-0 arg-1 arg-3 e-0 (DataC-45List-u--zip_Zippable_List u--useargns e-1) e-2 arg-6) eta-0))) (case (vector-ref act-26 0) ((0) (let ((e-3 (vector-ref act-26 1))) (vector 0 e-3))) (else (let ((e-7 (vector-ref act-26 1))) (let ((e-4 (car e-7))) (let ((e-3 (cdr e-7))) (let ((act-27 (let ((act-27 (unbox arg-0))) (vector 1 act-27)))) (case (vector-ref act-27 0) ((0) (let ((e-8 (vector-ref act-27 1))) (vector 0 e-8))) (else (let ((e-8 (vector-ref act-27 1))) (let ((act-28 (CoreC-45Context-u--full_HasNames_Name (let ((e-39 (vector-ref e-8 0))) e-39) arg-4 eta-0))) (case (vector-ref act-28 0) ((0) (let ((e-9 (vector-ref act-28 1))) (vector 0 e-9))) (else (let ((e-9 (vector-ref act-28 1))) (vector 1 (cons e-4 (PreludeC-45TypesC-45String-C-43C-43 (PreludeC-45Interfaces-concat (cons (vector (lambda (u--acc) (lambda (u--elem) (lambda (u--func) (lambda (u--init) (lambda (u--input) (PreludeC-45Types-u--foldr_Foldable_List u--func u--init u--input)))))) (lambda (u--elem) (lambda (u--acc) (lambda (u--func) (lambda (u--init) (lambda (u--input) (PreludeC-45Types-u--foldl_Foldable_List u--func u--init u--input)))))) (lambda (u--elem) (lambda (arg-1094) (PreludeC-45Types-u--null_Foldable_List arg-1094))) (lambda (u--elem) (lambda (u--acc) (lambda (u--m) (lambda (i_con-0) (lambda (u--funcM) (lambda (u--init) (lambda (u--input) (PreludeC-45Types-u--foldlM_Foldable_List i_con-0 u--funcM u--init u--input)))))))) (lambda (u--elem) (lambda (arg-1098) (PreludeC-45Types-u--toList_Foldable_List arg-1098))) (lambda (u--a) (lambda (u--m) (lambda (i_con-0) (lambda (u--f) (lambda (arg-1100) (PreludeC-45Types-u--foldMap_Foldable_List i_con-0 u--f arg-1100))))))) (cons (lambda (arg-7) (lambda (arg-8) (PreludeC-45Types-u--C-60C-43C-62_Semigroup_String arg-7 arg-8))) (PreludeC-45Types-u--neutral_Monoid_String))) e-5) (PreludeC-45TypesC-45String-C-43C-43 e-6 (PreludeC-45TypesC-45String-C-43C-43 "(define " (PreludeC-45TypesC-45String-C-43C-43 (CompilerC-45SchemeC-45Common-schName e-9) (PreludeC-45TypesC-45String-C-43C-43 " (lambda (" (PreludeC-45TypesC-45String-C-43C-43 (CoreC-45NameC-45Namespace-showSep " " (PreludeC-45Types-u--map_Functor_List (lambda (eta-1) (CompilerC-45SchemeC-45Common-schName eta-1)) u--allargns)) (PreludeC-45TypesC-45String-C-43C-43 ") " (PreludeC-45TypesC-45String-C-43C-43 e-3 "))\xa;"))))))))))))))))))))))))))))))))))))))))(else (lambda (eta-0) (vector 1 (cons '() ""))))))) (define CompilerC-45SchemeC-45Chez-schFgnDef (lambda (arg-0 arg-1 arg-2 arg-3 arg-4 arg-5 arg-6) (case (vector-ref arg-5 0) ((2) (let ((e-0 (vector-ref arg-5 1))) (let ((e-1 (vector-ref arg-5 2))) (let ((e-2 (vector-ref arg-5 3))) (let ((u--argns (CompilerC-45SchemeC-45Chez-mkArgs 0 e-1))) (let ((u--allargns (PreludeC-45Types-u--map_Functor_List (lambda (eta-0) (Builtin-fst eta-0)) u--argns))) (let ((u--useargns (PreludeC-45Types-u--map_Functor_List (lambda (eta-0) (Builtin-fst eta-0)) (DataC-45List-filter (lambda (eta-0) (Builtin-snd eta-0)) u--argns)))) (lambda (eta-0) (let ((act-24 (CoreC-45Core-traverseC-39 (lambda (eta-1) (CompilerC-45SchemeC-45Chez-mkStruct arg-2 eta-1)) e-1 '() eta-0))) (case (vector-ref act-24 0) ((0) (let ((e-3 (vector-ref act-24 1))) (vector 0 e-3))) (else (let ((e-5 (vector-ref act-24 1))) (let ((act-25 ((CompilerC-45SchemeC-45Chez-mkStruct arg-2 e-2) eta-0))) (case (vector-ref act-25 0) ((0) (let ((e-3 (vector-ref act-25 1))) (vector 0 e-3))) (else (let ((e-6 (vector-ref act-25 1))) (let ((act-26 ((CompilerC-45SchemeC-45Chez-useCC arg-0 arg-1 arg-3 e-0 (DataC-45List-u--zip_Zippable_List u--useargns e-1) e-2 arg-6) eta-0))) (case (vector-ref act-26 0) ((0) (let ((e-3 (vector-ref act-26 1))) (vector 0 e-3))) (else (let ((e-7 (vector-ref act-26 1))) (let ((e-4 (car e-7))) (let ((e-3 (cdr e-7))) (let ((act-27 (let ((act-27 (unbox arg-0))) (vector 1 act-27)))) (case (vector-ref act-27 0) ((0) (let ((e-8 (vector-ref act-27 1))) (vector 0 e-8))) (else (let ((e-8 (vector-ref act-27 1))) (let ((act-28 (CoreC-45Context-u--full_HasNames_Name (let ((e-39 (vector-ref e-8 0))) e-39) arg-4 eta-0))) (case (vector-ref act-28 0) ((0) (let ((e-9 (vector-ref act-28 1))) (vector 0 e-9))) (else (let ((e-9 (vector-ref act-28 1))) (vector 1 (cons e-4 (PreludeC-45TypesC-45String-C-43C-43 (PreludeC-45Interfaces-concat (cons (vector (lambda (u--acc) (lambda (u--elem) (lambda (u--func) (lambda (u--init) (lambda (u--input) (PreludeC-45Types-u--foldr_Foldable_List u--func u--init u--input)))))) (lambda (u--elem) (lambda (u--acc) (lambda (u--func) (lambda (u--init) (lambda (u--input) (PreludeC-45Types-u--foldl_Foldable_List u--func u--init u--input)))))) (lambda (u--elem) (lambda (arg-1094) (PreludeC-45Types-u--null_Foldable_List arg-1094))) (lambda (u--elem) (lambda (u--acc) (lambda (u--m) (lambda (i_con-0) (lambda (u--funcM) (lambda (u--init) (lambda (u--input) (PreludeC-45Types-u--foldlM_Foldable_List i_con-0 u--funcM u--init u--input)))))))) (lambda (u--elem) (lambda (arg-1098) (PreludeC-45Types-u--toList_Foldable_List arg-1098))) (lambda (u--a) (lambda (u--m) (lambda (i_con-0) (lambda (u--f) (lambda (arg-1100) (PreludeC-45Types-u--foldMap_Foldable_List i_con-0 u--f arg-1100))))))) (cons (lambda (arg-7) (lambda (arg-8) (PreludeC-45Types-u--C-60C-43C-62_Semigroup_String arg-7 arg-8))) (PreludeC-45Types-u--neutral_Monoid_String))) e-5) (PreludeC-45TypesC-45String-C-43C-43 e-6 (PreludeC-45TypesC-45String-C-43C-43 "(define " (PreludeC-45TypesC-45String-C-43C-43 (CompilerC-45SchemeC-45Common-schName e-9) (PreludeC-45TypesC-45String-C-43C-43 " (lambda (" (PreludeC-45TypesC-45String-C-43C-43 (CoreC-45NameC-45Namespace-showSep " " (PreludeC-45Types-u--map_Functor_List (lambda (eta-1) (CompilerC-45SchemeC-45Common-schName eta-1)) u--allargns)) (PreludeC-45TypesC-45String-C-43C-43 ") " (PreludeC-45TypesC-45String-C-43C-43 e-3 "))\xa;"))))))))))))))))))))))))))))))))))))))))(else (lambda (eta-0) (vector 1 (cons '() "")))))))
(define CompilerC-45SchemeC-45Chez-mkStruct (lambda (arg-0 arg-1) (case (vector-ref arg-1 0) ((19) (let ((e-0 (vector-ref arg-1 1))) (let ((e-1 (vector-ref arg-1 2))) (lambda (eta-0) (let ((act-24 (CoreC-45Core-traverseC-39 (lambda (eta-1) (CompilerC-45SchemeC-45Chez-mkStruct arg-0 eta-1)) (PreludeC-45Types-u--map_Functor_List (lambda (eta-1) (Builtin-snd eta-1)) e-1) '() eta-0))) (case (vector-ref act-24 0) ((0) (let ((e-2 (vector-ref act-24 1))) (vector 0 e-2))) (else (let ((e-5 (vector-ref act-24 1))) (let ((act-25 (let ((act-25 (unbox arg-0))) (vector 1 act-25)))) (case (vector-ref act-25 0) ((0) (let ((e-2 (vector-ref act-25 1))) (vector 0 e-2))) (else (let ((e-6 (vector-ref act-25 1))) (let ((sc3 (PreludeC-45Types-elem (cons (lambda (arg-2) (lambda (arg-3) (PreludeC-45EqOrd-u--C-61C-61_Eq_String arg-2 arg-3))) (lambda (arg-4) (lambda (arg-5) (PreludeC-45EqOrd-u--C-47C-61_Eq_String arg-4 arg-5)))) e-0 e-6))) (cond ((equal? sc3 1) (vector 1 (PreludeC-45Interfaces-concat (cons (vector (lambda (u--acc) (lambda (u--elem) (lambda (u--func) (lambda (u--init) (lambda (u--input) (PreludeC-45Types-u--foldr_Foldable_List u--func u--init u--input)))))) (lambda (u--elem) (lambda (u--acc) (lambda (u--func) (lambda (u--init) (lambda (u--input) (PreludeC-45Types-u--foldl_Foldable_List u--func u--init u--input)))))) (lambda (u--elem) (lambda (arg-1094) (PreludeC-45Types-u--null_Foldable_List arg-1094))) (lambda (u--elem) (lambda (u--acc) (lambda (u--m) (lambda (i_con-0) (lambda (u--funcM) (lambda (u--init) (lambda (u--input) (PreludeC-45Types-u--foldlM_Foldable_List i_con-0 u--funcM u--init u--input)))))))) (lambda (u--elem) (lambda (arg-1098) (PreludeC-45Types-u--toList_Foldable_List arg-1098))) (lambda (u--a) (lambda (u--m) (lambda (i_con-0) (lambda (u--f) (lambda (arg-1100) (PreludeC-45Types-u--foldMap_Foldable_List i_con-0 u--f arg-1100))))))) (cons (lambda (arg-2) (lambda (arg-3) (PreludeC-45Types-u--C-60C-43C-62_Semigroup_String arg-2 arg-3))) (PreludeC-45Types-u--neutral_Monoid_String))) e-5))) (else (let ((act-26 (let ((act-26 (set-box! arg-0 (cons e-0 e-6)))) (vector 1 act-26)))) (case (vector-ref act-26 0) ((0) (let ((e-2 (vector-ref act-26 1))) (vector 0 e-2))) (else (let ((act-27 (CoreC-45Core-traverseC-39 (lambda (eta-1) (lambda (eta-2) (CompilerC-45SchemeC-45Chez-n--10724-2442-u--showFld e-1 e-0 arg-0 eta-1 eta-2))) e-1 '() eta-0))) (case (vector-ref act-27 0) ((0) (let ((e-2 (vector-ref act-27 1))) (vector 0 e-2))) (else (let ((e-8 (vector-ref act-27 1))) (vector 1 (PreludeC-45TypesC-45String-C-43C-43 (PreludeC-45Interfaces-concat (cons (vector (lambda (u--acc) (lambda (u--elem) (lambda (u--func) (lambda (u--init) (lambda (u--input) (PreludeC-45Types-u--foldr_Foldable_List u--func u--init u--input)))))) (lambda (u--elem) (lambda (u--acc) (lambda (u--func) (lambda (u--init) (lambda (u--input) (PreludeC-45Types-u--foldl_Foldable_List u--func u--init u--input)))))) (lambda (u--elem) (lambda (arg-1094) (PreludeC-45Types-u--null_Foldable_List arg-1094))) (lambda (u--elem) (lambda (u--acc) (lambda (u--m) (lambda (i_con-0) (lambda (u--funcM) (lambda (u--init) (lambda (u--input) (PreludeC-45Types-u--foldlM_Foldable_List i_con-0 u--funcM u--init u--input)))))))) (lambda (u--elem) (lambda (arg-1098) (PreludeC-45Types-u--toList_Foldable_List arg-1098))) (lambda (u--a) (lambda (u--m) (lambda (i_con-0) (lambda (u--f) (lambda (arg-1100) (PreludeC-45Types-u--foldMap_Foldable_List i_con-0 u--f arg-1100))))))) (cons (lambda (arg-2) (lambda (arg-3) (PreludeC-45Types-u--C-60C-43C-62_Semigroup_String arg-2 arg-3))) (PreludeC-45Types-u--neutral_Monoid_String))) e-5) (PreludeC-45TypesC-45String-C-43C-43 "(define-ftype " (PreludeC-45TypesC-45String-C-43C-43 e-0 (PreludeC-45TypesC-45String-C-43C-43 " (struct\xa;\x9;" (PreludeC-45TypesC-45String-C-43C-43 (CoreC-45NameC-45Namespace-showSep "\xa;\x9;" e-8) "))\xa;")))))))))))))))))))))))))))) ((18) (let ((e-2 (vector-ref arg-1 1))) (CompilerC-45SchemeC-45Chez-mkStruct arg-0 e-2))) ((17) (let ((e-3 (vector-ref arg-1 1))) (let ((e-4 (vector-ref arg-1 2))) (lambda (eta-0) (let ((act-24 (PreludeC-45IO-u--map_Functor_IO (lambda (eta-1) (case (vector-ref eta-1 0) ((0) (let ((e-2 (vector-ref eta-1 1))) (vector 0 e-2))) (else (vector 1 0)))) (CompilerC-45SchemeC-45Chez-mkStruct arg-0 e-3) eta-0))) (case (vector-ref act-24 0) ((0) (let ((e-2 (vector-ref act-24 1))) (vector 0 e-2))) (else ((CompilerC-45SchemeC-45Chez-mkStruct arg-0 e-4) eta-0))))))))(else (lambda (eta-0) (vector 1 "")))))) (define CompilerC-45SchemeC-45Chez-mkStruct (lambda (arg-0 arg-1) (case (vector-ref arg-1 0) ((19) (let ((e-0 (vector-ref arg-1 1))) (let ((e-1 (vector-ref arg-1 2))) (lambda (eta-0) (let ((act-24 (CoreC-45Core-traverseC-39 (lambda (eta-1) (CompilerC-45SchemeC-45Chez-mkStruct arg-0 eta-1)) (PreludeC-45Types-u--map_Functor_List (lambda (eta-1) (Builtin-snd eta-1)) e-1) '() eta-0))) (case (vector-ref act-24 0) ((0) (let ((e-2 (vector-ref act-24 1))) (vector 0 e-2))) (else (let ((e-5 (vector-ref act-24 1))) (let ((act-25 (let ((act-25 (unbox arg-0))) (vector 1 act-25)))) (case (vector-ref act-25 0) ((0) (let ((e-2 (vector-ref act-25 1))) (vector 0 e-2))) (else (let ((e-6 (vector-ref act-25 1))) (let ((sc3 (PreludeC-45Types-elem (cons (lambda (arg-2) (lambda (arg-3) (PreludeC-45EqOrd-u--C-61C-61_Eq_String arg-2 arg-3))) (lambda (arg-4) (lambda (arg-5) (PreludeC-45EqOrd-u--C-47C-61_Eq_String arg-4 arg-5)))) e-0 e-6))) (cond ((equal? sc3 1) (vector 1 (PreludeC-45Interfaces-concat (cons (vector (lambda (u--acc) (lambda (u--elem) (lambda (u--func) (lambda (u--init) (lambda (u--input) (PreludeC-45Types-u--foldr_Foldable_List u--func u--init u--input)))))) (lambda (u--elem) (lambda (u--acc) (lambda (u--func) (lambda (u--init) (lambda (u--input) (PreludeC-45Types-u--foldl_Foldable_List u--func u--init u--input)))))) (lambda (u--elem) (lambda (arg-1094) (PreludeC-45Types-u--null_Foldable_List arg-1094))) (lambda (u--elem) (lambda (u--acc) (lambda (u--m) (lambda (i_con-0) (lambda (u--funcM) (lambda (u--init) (lambda (u--input) (PreludeC-45Types-u--foldlM_Foldable_List i_con-0 u--funcM u--init u--input)))))))) (lambda (u--elem) (lambda (arg-1098) (PreludeC-45Types-u--toList_Foldable_List arg-1098))) (lambda (u--a) (lambda (u--m) (lambda (i_con-0) (lambda (u--f) (lambda (arg-1100) (PreludeC-45Types-u--foldMap_Foldable_List i_con-0 u--f arg-1100))))))) (cons (lambda (arg-2) (lambda (arg-3) (PreludeC-45Types-u--C-60C-43C-62_Semigroup_String arg-2 arg-3))) (PreludeC-45Types-u--neutral_Monoid_String))) e-5))) (else (let ((act-26 (let ((act-26 (set-box! arg-0 (cons e-0 e-6)))) (vector 1 act-26)))) (case (vector-ref act-26 0) ((0) (let ((e-2 (vector-ref act-26 1))) (vector 0 e-2))) (else (let ((act-27 (CoreC-45Core-traverseC-39 (lambda (eta-1) (lambda (eta-2) (CompilerC-45SchemeC-45Chez-n--10724-2442-u--showFld e-1 e-0 arg-0 eta-1 eta-2))) e-1 '() eta-0))) (case (vector-ref act-27 0) ((0) (let ((e-2 (vector-ref act-27 1))) (vector 0 e-2))) (else (let ((e-8 (vector-ref act-27 1))) (vector 1 (PreludeC-45TypesC-45String-C-43C-43 (PreludeC-45Interfaces-concat (cons (vector (lambda (u--acc) (lambda (u--elem) (lambda (u--func) (lambda (u--init) (lambda (u--input) (PreludeC-45Types-u--foldr_Foldable_List u--func u--init u--input)))))) (lambda (u--elem) (lambda (u--acc) (lambda (u--func) (lambda (u--init) (lambda (u--input) (PreludeC-45Types-u--foldl_Foldable_List u--func u--init u--input)))))) (lambda (u--elem) (lambda (arg-1094) (PreludeC-45Types-u--null_Foldable_List arg-1094))) (lambda (u--elem) (lambda (u--acc) (lambda (u--m) (lambda (i_con-0) (lambda (u--funcM) (lambda (u--init) (lambda (u--input) (PreludeC-45Types-u--foldlM_Foldable_List i_con-0 u--funcM u--init u--input)))))))) (lambda (u--elem) (lambda (arg-1098) (PreludeC-45Types-u--toList_Foldable_List arg-1098))) (lambda (u--a) (lambda (u--m) (lambda (i_con-0) (lambda (u--f) (lambda (arg-1100) (PreludeC-45Types-u--foldMap_Foldable_List i_con-0 u--f arg-1100))))))) (cons (lambda (arg-2) (lambda (arg-3) (PreludeC-45Types-u--C-60C-43C-62_Semigroup_String arg-2 arg-3))) (PreludeC-45Types-u--neutral_Monoid_String))) e-5) (PreludeC-45TypesC-45String-C-43C-43 "(define-ftype " (PreludeC-45TypesC-45String-C-43C-43 e-0 (PreludeC-45TypesC-45String-C-43C-43 " (struct\xa;\x9;" (PreludeC-45TypesC-45String-C-43C-43 (CoreC-45NameC-45Namespace-showSep "\xa;\x9;" e-8) "))\xa;")))))))))))))))))))))))))))) ((18) (let ((e-2 (vector-ref arg-1 1))) (CompilerC-45SchemeC-45Chez-mkStruct arg-0 e-2))) ((17) (let ((e-3 (vector-ref arg-1 1))) (let ((e-4 (vector-ref arg-1 2))) (lambda (eta-0) (let ((act-24 (PreludeC-45IO-u--map_Functor_IO (lambda (eta-1) (case (vector-ref eta-1 0) ((0) (let ((e-2 (vector-ref eta-1 1))) (vector 0 e-2))) (else (vector 1 0)))) (CompilerC-45SchemeC-45Chez-mkStruct arg-0 e-3) eta-0))) (case (vector-ref act-24 0) ((0) (let ((e-2 (vector-ref act-24 1))) (vector 0 e-2))) (else ((CompilerC-45SchemeC-45Chez-mkStruct arg-0 e-4) eta-0))))))))(else (lambda (eta-0) (vector 1 ""))))))

View File

@ -45,11 +45,28 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs-chez-racket": {
"locked": {
"lastModified": 1627484694,
"narHash": "sha256-UsEb5G0ZJ8l/2y9u9FNj2akXx2PC5QAan24U3t32cfI=",
"owner": "L-as",
"repo": "nixpkgs",
"rev": "9b3c4bee8cee477ac03b0cfd4ebca40954c66106",
"type": "github"
},
"original": {
"owner": "L-as",
"ref": "chez-racket",
"repo": "nixpkgs",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"idris-emacs-src": "idris-emacs-src", "idris-emacs-src": "idris-emacs-src",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs",
"nixpkgs-chez-racket": "nixpkgs-chez-racket"
} }
} }
}, },

View File

@ -6,8 +6,10 @@
url = "github:redfish64/idris2-mode"; url = "github:redfish64/idris2-mode";
flake = false; flake = false;
}; };
# FIXME: Remove this when https://github.com/NixOS/nixpkgs/pull/131833 gets merged
inputs.nixpkgs-chez-racket.url = "github:L-as/nixpkgs?ref=chez-racket";
outputs = { self, nixpkgs, flake-utils, idris-emacs-src }: outputs = { self, nixpkgs, nixpkgs-chez-racket, flake-utils, idris-emacs-src }:
let let
idris2-version = "0.4.0"; idris2-version = "0.4.0";
lib = import ./nix/lib.nix; lib = import ./nix/lib.nix;
@ -26,15 +28,17 @@
per-system = { config ? { }, overlays ? [ ] }: system: per-system = { config ? { }, overlays ? [ ] }: system:
let let
pkgs = import nixpkgs { inherit config system overlays; }; pkgs = import nixpkgs { inherit config system overlays; };
chez = if system == "x86_64-linux"
then pkgs.chez
else pkgs.callPackage "${nixpkgs-chez-racket}/pkgs/development/compilers/chez-racket" { inherit (pkgs.darwin) cctools; };
idris2Pkg = pkgs.callPackage ./nix/package.nix { idris2Pkg = pkgs.callPackage ./nix/package.nix {
inherit idris2-version; inherit idris2-version chez;
srcRev = self.shortRev or "dirty"; srcRev = self.shortRev or "dirty";
}; };
buildIdris = { projectName, src, idrisLibraries }: buildIdris = { projectName, src, idrisLibraries }:
pkgs.callPackage ./nix/buildIdris.nix pkgs.callPackage ./nix/buildIdris.nix
{ inherit src projectName idrisLibraries idris2-version; idris2 = idris2Pkg; }; { inherit src projectName idrisLibraries idris2-version; idris2 = idris2Pkg; };
in in rec {
if system != "aarch64-linux" then rec {
checks = import ./nix/test.nix { checks = import ./nix/test.nix {
inherit (pkgs) system stdenv runCommand lib; inherit (pkgs) system stdenv runCommand lib;
inherit nixpkgs flake-utils; inherit nixpkgs flake-utils;
@ -45,7 +49,7 @@
// (import ./nix/text-editor.nix { inherit pkgs idris-emacs-src idris2Pkg; }); // (import ./nix/text-editor.nix { inherit pkgs idris-emacs-src idris2Pkg; });
inherit buildIdris; inherit buildIdris;
defaultPackage = packages.idris2; defaultPackage = packages.idris2;
} else { }; };
in in
lib.mkOvrOptsFlake (opts: flake-utils.lib.eachDefaultSystem (per-system opts) // sys-agnostic); lib.mkOvrOptsFlake (opts: flake-utils.lib.eachDefaultSystem (per-system opts) // sys-agnostic);
} }

View File

@ -7,7 +7,6 @@
, makeWrapper , makeWrapper
, idris2-version , idris2-version
, srcRev , srcRev
, racket
, gambit , gambit
, nodejs , nodejs
, zsh , zsh

View File

@ -92,7 +92,7 @@ schHeader chez libs whole
"(import (chezscheme))\n" ++ "(import (chezscheme))\n" ++
"(case (machine-type)\n" ++ "(case (machine-type)\n" ++
" [(i3fb ti3fb a6fb ta6fb) #f]\n" ++ " [(i3fb ti3fb a6fb ta6fb) #f]\n" ++
" [(i3le ti3le a6le ta6le) (load-shared-object \"libc.so.6\")]\n" ++ " [(i3le ti3le a6le ta6le tarm64le) (load-shared-object \"libc.so.6\")]\n" ++
" [(i3osx ti3osx a6osx ta6osx) (load-shared-object \"libc.dylib\")]\n" ++ " [(i3osx ti3osx a6osx ta6osx) (load-shared-object \"libc.dylib\")]\n" ++
" [(i3nt ti3nt a6nt ta6nt) (load-shared-object \"msvcrt.dll\")]\n" ++ " [(i3nt ti3nt a6nt ta6nt) (load-shared-object \"msvcrt.dll\")]\n" ++
" [else (load-shared-object \"libc.so\")])\n\n" ++ " [else (load-shared-object \"libc.so\")])\n\n" ++

View File

@ -44,7 +44,7 @@ schHeader libs compilationUnits = unlines
++ unwords ["(" ++ cu ++ ")" | cu <- compilationUnits] ++ unwords ["(" ++ cu ++ ")" | cu <- compilationUnits]
++ ")" ++ ")"
, "(case (machine-type)" , "(case (machine-type)"
, " [(i3le ti3le a6le ta6le) (load-shared-object \"libc.so.6\")]" , " [(i3le ti3le a6le ta6le tarm64le) (load-shared-object \"libc.so.6\")]"
, " [(i3osx ti3osx a6osx ta6osx) (load-shared-object \"libc.dylib\")]" , " [(i3osx ti3osx a6osx ta6osx) (load-shared-object \"libc.dylib\")]"
, " [(i3nt ti3nt a6nt ta6nt) (load-shared-object \"msvcrt.dll\")" , " [(i3nt ti3nt a6nt ta6nt) (load-shared-object \"msvcrt.dll\")"
, " (load-shared-object \"ws2_32.dll\")]" , " (load-shared-object \"ws2_32.dll\")]"