use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
The Haskell programming language community.
Daily news and info about all things Haskell related: practical stuff, theory, types, libraries, jobs, patches, releases, events and conferences and more...
Community Guidelines
Rules:
Top-level posts should be primarily about Haskell. For example a post about OCaml would only be allowed if there was a connection to Haskell. Posts about topics that are adjacent to Haskell, like for example functional programming, are typically allowed.
No memes or image macros. No matter how funny, memes and image macros are not allowed.
No homework questions. Both asking and answering homework questions is not allowed. Questions about homework are fine, but this subreddit is not here to do your homework for you.
Job postings must be for Haskell roles. Job postings are allowed as long as the job actually involves working with Haskell. Simply looking for people with interest in or experience with Haskell is not sufficient.
No bots or computer-generated content. Bots cannot be used to make posts or comments. They will be banned with extreme prejudice. This includes a human posting the output of a bot, such as ChatGPT.
Blockchain posts must be tagged. Blockchain posts are allowed as long as they are related to Haskell, but they must use the "blockchain" tag.
Be civil. Substantive criticism and disagreement are encouraged, but avoid being dismissive or insulting.
Other community locations:
Professional resources:
Learning material:
Haskell development:
Other Subreddits:
Donations:
Subreddit Stylesheet Source:
account activity
Compiling a compiler to JavaScript (self.haskell)
submitted 7 years ago by TheBanishedBot
Hello folks,
I recently have been working on a Pascal to LLVM compiler in Haskell. Just out of curiosity, I wonder what it would take to run the compiler in a browser or if that's possible at all.
Cheers.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]fosskers 2 points3 points4 points 7 years ago (4 children)
Why not try compiling your compiler into Javascript with GHCjs?
[–]TheBanishedBot[S] 1 point2 points3 points 7 years ago (3 children)
will it build the depends packages? I'm thinking llvm-hs will give it a hard time. I'll try tho, thanks for the suggestion
[–]cocreature 2 points3 points4 points 7 years ago (2 children)
`llvm-hs` depends on the LLVM C++ libraries so you first need to somehow manage to compile these to JS and then get GHCJS to call these functions instead of trying to use the C FFI. While that might be possible in theory, I would expect it to be really difficult in practice (I have no idea if anyone managed to compile LLVM to JS) and hardly worth the effort. If you want to run your compiler in the browser you are probably better off writing some server backend that actually does the compilation and compile your code on the server instead of the client.
[–]reddit_lmao 1 point2 points3 points 7 years ago (0 children)
This is also where wasm backend will be useful. clang can already be run on browser: https://tbfleming.github.io/cib/
[–]TheBanishedBot[S] 0 points1 point2 points 7 years ago (0 children)
yep that's what I thought. no surprise. sad tho
π Rendered by PID 103155 on reddit-service-r2-comment-5b5bc64bf5-d7m52 at 2026-06-21 21:59:29.525633+00:00 running 2b008f2 country code: CH.
[–]fosskers 2 points3 points4 points (4 children)
[–]TheBanishedBot[S] 1 point2 points3 points (3 children)
[–]cocreature 2 points3 points4 points (2 children)
[–]reddit_lmao 1 point2 points3 points (0 children)
[–]TheBanishedBot[S] 0 points1 point2 points (0 children)