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
1
vote
1 answer

Cannot install lens with haste-inst

I'm trying to install the lens package to work with haskell. $ haste-inst install lens I get the following error: Resolving dependencies... cabal: Could not resolve dependencies: trying: base-4.6.0.1/installed-4.6... (user goal) trying:…
worldsayshi
  • 1,788
  • 15
  • 31
1
vote
1 answer

How to remove attribute with Haste

Module Haste.DOM contains function setAttr for setting attribute of HTML-element: setAttr (fromJust createProfileButton) "form" "registerNewUserForm" It works fine, but how can I remove attribute? For example, I have a button with attribute…
Denis Shevchenko
  • 1,342
  • 2
  • 10
  • 23
1
vote
0 answers

Trouble booting Haste

I'm having trouble running haste-boot --force --local (though the same thing also happens when booting the latest cabal version with plain haste-boot). It makes some progress, then fails out with cabal: Error: some packages failed to…
Inaimathi
  • 13,853
  • 9
  • 49
  • 93
1
vote
1 answer

Sleeping with pipes in Haste and Haskell

I'm working on a Haskell program that makes heavy use of the Pipes library. I'm porting part of the library to Haste. The one place where I've hit a stumbling block is in the odd way that javascript handles sleeping. What I wanted to write was a…
rprospero
  • 913
  • 11
  • 26
1
vote
1 answer

Haste Haskell->JS compiler does not work on OSX, displaying specific error message when calling hastec

I've tried setting up Haste using the official installation guide. Trying to compile a Hello World produces the following error: Compiling Main into . Linking haste-compiler/test.js Linking Main Linking GHC.Types Linking GHC.IO.Handle.Text hastec:…
MaiaVictor
  • 51,090
  • 44
  • 144
  • 286
0
votes
2 answers

How to I run in nodejs a javascript file produced by haste?

If I have a file, hello.hs: main = putStrLn "Hello, World!" I can compile it to hello.js using haste command: hastec hello.hs How do I run the result hello.js file under nodejs?
zumalifeguard
  • 8,648
  • 5
  • 43
  • 56
0
votes
1 answer

Making my canvas dispaly the graph correctly

I am trying to create a graph calculator and making it display the graph correctly on a "canvas". When I load the HTML file and write x e.g it starts from the upper left corner and goes down to the lower right corner. So the problem is that it…
EL-
  • 15
  • 4
0
votes
2 answers

Working with local storage in Haste

I would like to read and write an integer from and to local storage. My code looks like this (just trying to make this compile so far): loadFromStorage = do mr <- getItem "budget" case mr of Left _ -> return (0 :: Integer) …
rogergl
  • 3,501
  • 2
  • 30
  • 49
-1
votes
1 answer

how to get a random number with Haste

I write a simple Haskell program using Haste ( https://www.haste-lang.org/ ). I need to get a random number from range 1-100. How can I do this?
user983447
  • 1,598
  • 4
  • 19
  • 36
1
2