Questions tagged [yesod]

Yesod is a Haskell web framework for productive development of type-safe, RESTful, high performance web applications.

Yesod is a Haskell web framework for productive development of type-safe, RESTful, high performance web applications.

Yesod leverages Haskell's type system to turn runtime bugs into compule-time errors, for example to avoid XSS attacks or character encoding issues. Yesod contains several DSLs for templating ( for HTML, for Javascript, and or for CSS), to store data (Persistent), for routing, etc.

1334 questions
0
votes
1 answer

Migrating Postgresql from yesod persistent

I created a pg_dump on one computer and load it into a separate database on another computer. I try to run my yesod executable but it fails on migration. Migrating: CREATE TABLE "email"("id" SERIAL PRIMARY KEY UNIQUE,"email" VARCHAR NOT NULL,"user"…
MetaMemoryT
  • 174
  • 1
  • 11
0
votes
1 answer

Read lines of a file, sort and return middle element

I am kind of new to IO with Haskell and although I read through it a lot, my code still won't work. What I want the app to do: Read all lines of a file (file1.txt, file2.txt, ...), where all contain numbers each line (floats like 1.12345) Sort all…
sibbl
  • 3,203
  • 26
  • 38
0
votes
2 answers

Forcing Julius to regenerate for each request

I am trying to post a form using Ajax and I generate the URL string in the request based on the route. Like so: $.ajax ({ type: "POST", url: "@{MyHandlerR objectId}", headers: { Accept: "application/json;…
Ecognium
  • 2,046
  • 1
  • 19
  • 35
0
votes
1 answer

Need user to pick from a list to connect two users in YESOD

I need general guidance on how to structure a YESOD app. I would like to keep the app as "RESTful" in design as possible. The user searches all the other users to find one to connect with. I show the possible connections using Hamlet: $forall…
Tim Perry
  • 3,066
  • 1
  • 24
  • 40
0
votes
1 answer

Pagination: Error While Converting Parameter Value into Integer

I know there is a Paginator package for Yesod but I prefer a simpler UI so I was creating a simple pagination logic for my app. However, I couldn't figure out a way to convert the parameter value to Integer. import Data.Text (unpack,…
Ecognium
  • 2,046
  • 1
  • 19
  • 35
0
votes
2 answers

Styling not loading when implemented on server

When running my website locally (via yesod devel) the styling loads up and all is good. CSS files are loaded correctly. Using this method But when uploaded onto my amazon ec2 server styling is not loaded correctly. I'm using nginx that listens to…
HHC
  • 2,513
  • 2
  • 18
  • 26
0
votes
2 answers

Yesod generateFormPost - No instance for (RenderMessage master0 FormMessage)

I tried to follow this screencast by Michael Snoyman http://vimeo.com/39646807. However, it seems changes to the i18n causes that code to fail. I can't find any information on how to solve this problem on a scaffolded site and I can't quite make…
Joar Leth
  • 691
  • 9
  • 27
0
votes
1 answer

Yesod handlers, content of POSTed files

while the following code: postImportR = do fi <- lookupFiles "file" fc <- lift $ fileSource (fi !! 0) $$ consume seems to work (at least can I "liftIO $ print fc), splitting it off to a function for iterating doesn't: process :: [FileInfo]…
0
votes
1 answer

Breaking POST request into parts in Yesod

I'm struggling to split a POST response (multipart) apart, what should be used to put the contents of some files sent to the Yesod server into a database (after some further processing). My current code: import qualified Data.ByteString.Lazy as…
0
votes
1 answer

Yesod ghc.exe not responding when doing "yesod devel" Windows

I was starting to read about Yesod on Yesod website, and I tried to install it on Windows. I followed the following steps : I installed Haskell-Platform from their website for Windows. I added C:...\AppData\Roaming\cabal\bin on my Path (where "..."…
0
votes
1 answer

Form validation based on values in database

I have a form where a user can update its username. A username should be unique. I thought of using the standard validation as mentioned in the Yesod book: Forms, but I don't get my head around it... Relevant database definition: Profile …
davidbe
  • 840
  • 1
  • 6
  • 16
0
votes
1 answer

JSON parsing befuddlement

I'm working on the I/O aspect of my json server, and there's a method I just can't get right. First, I'll give the error, then the code and datatypes involved and some commentary about the problem afterwards. ("X-Response-Body-Start","
user1198582
0
votes
1 answer

submitting a form with ajax and retaining session

I have a page on domain A which includes a javascript from from domain B. The script loads a form from domain A with Ajax and posts it back to A. The form got rejected by Yesod because of missing session variable which resides in a cookie and isn't…
Dmitry Vyal
  • 2,347
  • 2
  • 24
  • 24
0
votes
3 answers

Haskell: Preferred linux distro for web development

Is there a preferred linux distribution for Haskell development on the web? In particular, I am doing a lot of Yesod development locally, however my web server is running RHEL (CentOS 5.8 i686) and it has not been the most seamless experience. This…
grep
  • 3,986
  • 7
  • 45
  • 67
0
votes
1 answer

Can't connect to yesod server

I followed this tutorial, and I've tried it on Windows 8, a clean install of Windows 7, and Ubuntu (all on the same computer and router). It works on Ubuntu, but the browser fails to ever connect to localhost:3000 (or any port I specify in the code)…
joshj
  • 473
  • 5
  • 11
1 2 3
88
89