Questions tagged [happstack]

Happstack is a fast and flexible Haskell web framework.

Happstack is a fast and flexible Haskell web framework.

111 questions
2
votes
3 answers

Haskell Web Framework

I'm creating simple web application using haskell. First I used Snap in front and I was able to run the application, but I want to add user input to the application. I couldn't find a way to get user input parameters to the function. How might I do…
123Ex
  • 906
  • 2
  • 21
  • 34
2
votes
1 answer

How to deal with a Haskell package's configured dependency range being out-of-date?

When attempting to install happstack via $ stack install happstack I get the following error: Run from outside a project, using implicit global project config Using resolver: lts-7.2 from implicit global project's config file:…
mherzl
  • 5,624
  • 6
  • 34
  • 75
2
votes
1 answer

How to apply a function on each element in a list in Haskell?

I have a list of tuples here, and I want to apply function dir..on the first element in each tuple. How can I do that? Thanks a lot in advance! [ ("grid", gridResponse), ("graph", graphResponse), ("image", graphImageResponse), ("timetable-image",…
Mia.M
  • 97
  • 1
  • 1
  • 8
2
votes
2 answers

Catching exceptions from pure functions in happstack

I can't find true way to catch exceptions throwed by pure functions in happstack application. I've tried this solution. It works well when exception throwed by IO function. But when pure function throw exception it can't handle it. My code: {-#…
2
votes
3 answers

How do I serve MathJax from a local Happstack server?

I'm not a developer/programmer. I'm just someone trying to use Gitit to take notes. I've got it to the point where it runs on Windows, but the math looks best using MathJax. I don't want to rely on a remote CDN to get the MathJax working (power cuts…
Anonymous
  • 63
  • 6
2
votes
2 answers

Is there a good way to QuickCheck Happstack.State methods?

I have a set of Happstack.State MACID methods that I want to test using QuickCheck, but I'm having trouble figuring out the most elegant way to accomplish that. The problems I'm running into are: The only way to evaluate an Ev monad computation is…
Paul Kuliniewicz
  • 2,711
  • 18
  • 24
2
votes
1 answer

Type names prefixed with package name and version

I'm pretty new to Haskell, and I'm trying to follow along with the Happstack Crash Course. I've done some of the examples, but when I tried the happstack-heist example, I got a strange compilation error. The file that I'm compiling looks like…
Rose Kunkel
  • 3,102
  • 2
  • 27
  • 53
2
votes
1 answer

Secure websockets with Happstack

Is there a way to use secure websockets (wss://) in Haskell server-side (preferably with Happstack)? I tried to search Cabal for websocket server implementations, I get websockets and its multiple wrappers for different frameworks. Search inside…
Dmytro Sirenko
  • 5,003
  • 21
  • 26
2
votes
3 answers

Haskell, String vs ...String?

I'm currently following the Happstack lite tutorial from their website. http://happstack.com/page/view-page-slug/9/happstack-lite-tutorial Right now, I'm implementing the echo function, and the compiler is giving me an error message that I don't…
aspyct
  • 3,625
  • 7
  • 36
  • 61
2
votes
2 answers

Problems trying out happstack-tutorial

I've been reading about Happstack and decided to give it a shot. I'm running xubuntu 9.10 and got to this page in the tutorial which told me to do cabal install in the tutorial folder. When I did this, I got the following errors: $ cabal…
me2
  • 3,069
  • 2
  • 26
  • 33
2
votes
1 answer

cryptopp foreign library dependency

I tried to install happstack-server-tls package via cabal on Arch Linux (3.12.9), but got this error: Resolving dependencies... Configuring happstack-server-tls-7.1.0... Failed to install happstack-server-tls-7.1.0 Last 10 lines of the build log (…
d12frosted
  • 1,280
  • 12
  • 33
2
votes
2 answers

What is MACID?

I've recently found the HAppS and Happstack projects, and the latter notes that one of its missions is to "leverage use of MACID". What exactly is MACID ?
csl
  • 10,937
  • 5
  • 57
  • 89
2
votes
1 answer

Happstack middleware lack?

I have usual happstack case in which we have ServerPart Response MonadPlus in list and. Then msum Chooses the one that does not fail and response generated and returned. I have opinion that some actions - like cheking cookies - preparing connection…
Vasiliy Stavenko
  • 1,174
  • 1
  • 12
  • 29
2
votes
1 answer

GHCi sees Happstack.Server, but GHC doesn't. What's going on?

I want to install, and use Happstack, and what should of taken 10 minutes, has been bugging me all day. First off, I had to wrestle with Cabal, and eventually gutted it out, and installed a fresh copy, and updated it: # I use Fedora 16... yum…
Miguel
  • 1,966
  • 2
  • 18
  • 32
2
votes
1 answer

HSP with bytestrings

I switched to HSP in my home project - I like that it compiles to Haskell code. But my server uses ByteString for output. Is there a good way to make HSP generate ByteString output? As I can see output and the HSP' source code, there is hardcoded…
demi
  • 5,384
  • 6
  • 37
  • 57