
On Mon, Jun 01, 2020 at 11:37:12AM -0400, Chris Smith wrote:
https://github.com/google/codeworld/blob/master/codeworld-available-pkgs/cod...
Packages that fit here are:
1. No I/O, except for stdin/out/err. Since CodeWorld runs code in a web browser, there is no filesystem, for example.
I assume this also precludes network I/O?
2. Do not rely on native libraries, or have dependencies that do. This all depends on the library building with GHCJS.
I guess this also excludes `bytestring`, which uses memcpy(), memchr(), and writes directly allocated memory? -- | Wrapper of 'mallocForeignPtrBytes' with faster implementation for GHC -- mallocByteString :: Int -> IO (ForeignPtr a) mallocByteString = mallocPlainForeignPtrBytes and all of its dependencies?
3. Do not require use of Template Haskell by clients. It's okay if your package needs template Haskell to build, but people using your library via CodeWorld cannot yet use TH themselves.
Is it that Template Haskell features in modules are not available to users, or that modules that export even "inessential" TH features are precluded. For example, can the platform support a module that exports a convenience TH "splice", if the same can be done slightly less conveniently (e.g. run-time, rather than compile-time error checks) at runtime via alternative functions? [ My current project does network I/O, uses `bytestring`, and provides TH-splices for two types of compile-time validated literals, so I would assume is a non-starter on all three counts. ] -- Viktor.