0

I am trying to make some simple graphics applications in Haskell with the blank-canvas package, and I want to be able to upload these applications on itch.io. However, I don't know how as there are no .html files in the application, just Haskell files. I feel like I'm missing something really obvious here.

There are static html and JavaScript files in the GitHub for blank-canvas, but I have no idea how to use them, or even if those are what I'm supposed to use.

3
  • It might help if you give some example of a simple grahic that you want to upload to itch.io. Commented Jul 17, 2022 at 21:13
  • A program like the tic-tac-toe example in the blank-canvas GitHub page would be a pretty good example: github.com/ku-fpg/blank-canvas/tree/master/examples/tictactoe Commented Jul 17, 2022 at 22:23
  • There are no static HTML or JS sites for you to upload. blank-canvas starts a Webserver, and what’s executing is your Haskell code. It’s not built to be a static site generator. Commented Jul 20, 2022 at 5:27

1 Answer 1

1

(Disclaimer: I don't know this package and have never used it. But I've used cabal a bunch.) From the top level directory, you can build the examples like this:

cabal build blank-canvas-example-tictactoe

(You can see the list of available executable names here.) This creates an executable named blank-canvas-example-tictactoe... somewhere. The details are a bit involved, but you can ask cabal where it put the thing with

cabal list-bin blank-canvas-example-tictactoe

Presumably you could then upload that executable to itch.io, though you may want to do a bit of testing to see whether there's some other things you're expected to bundle with it -- e.g. dynamically-linked libraries or resource files like jquery or whatever.

Sign up to request clarification or add additional context in comments.

2 Comments

I have an executable that opens a localhost with the HTML stuff I would expect. I want the actual HTML file and/or JavaScript files, so I can make it run within itch.io without requiring a download.
@lonelyfloat That's probably not possible unless you're willing to put in rather a lot of work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.