main = simpleHTTP nullConf $ ok "Hello, World!"
i am a newbie trying out haskell with happstack-server. In this hello world program, i got these doubts:
1) Server's default configuration, nullConf, where is it defined? at least it is not there in…
I am trying to install Happstack using the following command:
cabal install happstack
Specifications:
Mac OS X 10.10 (Yosemite)
GHC 7.8.3
cabal 1.20.0.2
Error Messages:
ld: library not found for -lHSstm-2.4.3-ghc7.8.3
clang: error: linker…
I'm parsing a form in happstack but I don't know of a more concise way to gather the form variables on the server.
Does anyone know if there are any tricks to reduce the amount of code needed here?
formHandler = do
method POST
delA1 …
I have a simple and incomplete Happstack application, that consists of a digestive-functors form defined as follows:
setRecFormSpec :: Monad m => Form Text m Reminder
setRecFormSpec = Reminder
<$> "progname" .: string Nothing
<*> "channel"…
I don't understand why I can't decompose a (let's say IO) monad. Like IO a -> a?
My question originated when using happstack and wanting to get the Text out of ServerPart (Maybe Text) which is returned by (optional $ lookText "domain").
Then I…
I'm following the tutorial for the reform library. I currently have a form with two required fields and its set up so the error message for each field shows up right next to it.
postForm :: MyForm MyRequest
postForm =
MyRequest <$> name <*> msg…
OK, so yesterday I tried to actually use Happstack for real.
OK, so my actual question. I've got this so far:
data LambdaURL =
URL_CSS |
URL_Input |
URL_Output
instance PathInfo LambdaURL where
toPathSegments url =
case url of
…
I have a simple little Happstack application that shows a form with an email field and a random question field to help combat spam. To get a random number I use getStdGen in my main function and pass it along to my function which creates the html.…
I started developing an application (some boring accounting software for inhouse use) and decided to make it web-based as this would solve a couple of problems in one go.
Now with a couple of webframeworks for Haskell to choose from (happstack,…
I'm using HStringTemplate to render a very simple template using a data structure to fill in the "holes". The result of the template rendering is just a String I fed toResponse with.
Even though this rendered template is valid html happstack uses…
I'm using Windows 7 with cygwin too.
I'd installed happstack-hsp fine with the Haskell Platform from February.
I just installed the Haskell Platform from April. I tried installing happstack-hsp package, through cabal and get the following…
How would I go about getting the Request data from the happstack-lite API? I'm trying to get the client's IP address. From what I can tell it's in Request::rqPeer, and I get confused trying to dive into the monadic-layers of the happstack API.
Currently, when building with happstack, I have to recompile my project, relaunch my .exe binary (in windows) every time I make a change to my template or source code.
Is there some tools that can automate this, like what Yesod or Snap has?
P.S.:…
I am reading the web-routes tutorial in Happstack, and I have no idea what this is doing:
$(derivePathInfo ''Sitemap)
class PathInfo a where
toPathSegments :: a -> [String]
fromPathSegments :: URLParser a
The doc simply says:
we use…
I'm trying on a Happstack-build website to read out "user submitted" plain text files. The main functionallity should be to get the file content, for further usage a server side storage of the file isn't needed.
What would be the way to realize…