Questions tagged [haste]

Haste is a Haskell-to-JavaScript compiler, aimed at the web.

Haste (http://haste-lang.org/) is a Haskell-to-JavaScript compiler that is gaining ground rapidly.

24 questions
12
votes
1 answer

Can GHCJS/Haste compile themselves?

If so, then I could let people play around with a project of mine by changing its (Haskell) configuration: recompiling it in the browser, and then rerunning it in the browser. I don't care about speed. I just want to be able to demo a hard-to-setup…
sam boosalis
  • 1,997
  • 4
  • 20
  • 32
8
votes
2 answers

Is it possible to server-side render Haskell frontend with Ghcjs, Haste, Elm, etc?

I think that Haskell offers fantastic features. Also suited for Web development. However, one feature I miss. Server-side rendering. The reasons are Google indexing crawlers and pre-rendering to increase performance on mobile devices. Is it possible…
Jakub Kříž
  • 89
  • 1
  • 6
6
votes
2 answers

How to use haste / hplayground with stack

I have some familiarity with Haskell, the language, but not so much with the toolchain. (I played around with Haskell before cabal and stack existed.) I'm told that stack is the tool I should be using to manage Haskell projects. I'm trying to learn…
5
votes
4 answers

Unable to resolve module...does not exist in the haste module map

I am a beginner on ReactNative, I am creating a Twitter clone to practice. I had already developed a first application and I had no problem. But since I started the new project, after adding custom modules in the project I have this error…
FoxaLiveJS
  • 243
  • 3
  • 7
  • 14
5
votes
1 answer

Integrating Haste into Stack tool chain

I am using Haskell Stack for a project and I want to include Haste it compile client side logic. I like the fact that Stack abstracts away the different build and install issues among environments and if it builds on my machine, it will build on…
John F. Miller
  • 26,961
  • 10
  • 71
  • 121
4
votes
1 answer

In Haste, is it possible to call into client side code with RPC from the server?

In Haste, is it possible to call into client side code with RPC from the server just like it is possible to call into the server side code from the client side? E.g. to broadcast a message that someone has entered in a chatroom to all…
Wizek
  • 4,854
  • 2
  • 25
  • 52
4
votes
1 answer

Installing Haskell packages through Nix

Specifically, I'm trying to install Haste through nix. I can see a hasteCompiler entry in nixpkgs/pkgs/top-level/haskell-packages.nix, and the appropriate .nix file in nixpkgs/pkgs/development/libraries/haskell/haste-compiler/ but I'm not sure how…
Inaimathi
  • 13,853
  • 9
  • 49
  • 93
2
votes
1 answer

"Too much recursion" error with basic Haste use

I'm trying to put together a little front-end application with haste, and I'm running into errors on Firefox. Here's the minimal example of the error: My Haskell: module Main where import Haste main :: IO () main = writeLog "Testing..." My…
Inaimathi
  • 13,853
  • 9
  • 49
  • 93
2
votes
1 answer

Haskell cabal compile .js during build

Let's say I'm building a web application with haskell as both server-side and client-side code. During the build phase, I want to compile server-side code with ghc and client-side code with some haskell to js transpiler. The haskell transpiler…
ryskajakub
  • 6,351
  • 8
  • 45
  • 75
1
vote
1 answer

jest-haste-map: watch error complaining that it can't find a file in the jest-haste-map node_modules folder

I just upgraded to RN 0.56.0 and am using jest version: 22.4.3 (updating the jest version doesn't help) When I try to run my test suite, I get the following error in the terminal: jest-haste-map: watch error: Error: ENOENT: no such file or…
1
vote
1 answer

How to produce a .js file from a haskell source file with haste?

So I noticed, while answering this question, that the one who asked the question appears to be a javascript developer. And as the code I wrote in haskell is easy enough, I thought I give haste a try and try to compile it to javascript. So, I…
BitTickler
  • 10,905
  • 5
  • 32
  • 53
1
vote
0 answers

how to install haste-compiler using cabal

I'm trying to install haste-compiler using cabal..the instalation was ok, but when I run the command "haste boot" I face an error: Anyone knows how to fix this error? Thanks.
Caroso
  • 111
  • 3
  • 12
1
vote
1 answer

Write interval function for the StateT monad in Haste

So I wrote my own implementation of StateT because I couldn't get transformers to compile correctly in Haste. I think wanted to get the javascript setInterval working inside my state monad. Here is the ffi call to setInterval. jsInterval :: Int ->…
DiegoNolan
  • 3,766
  • 1
  • 22
  • 26
1
vote
1 answer

Raycaster displays phantom perpendicular wall faces

The output looks like this: You should just see a flat, continuous red wall on one side, blue wall on another, green on another, yellow on another (see the definition of the map, testMapTiles, it's just a map with four walls). Yet there are these…
Andrea
  • 19,134
  • 4
  • 43
  • 65
1
vote
2 answers

Different server and client dependencies with haste

I'm building a small haste project where I want to use Elasticsearch. However, bloodhound which seems like the library to go for for elasticsearch in haskell depends indirectly on template-haskell - which isn't supported by haste. Now, I don't need…
worldsayshi
  • 1,788
  • 15
  • 31
1
2