Skip to content

Instantly share code, notes, and snippets.

@novodinia
Created January 9, 2014 03:22
Show Gist options
  • Save novodinia/8328902 to your computer and use it in GitHub Desktop.
Save novodinia/8328902 to your computer and use it in GitHub Desktop.
Prelude Web.Scotty Data.Monoid> :{
Prelude Web.Scotty Data.Monoid| scotty 3000 $ do {
Prelude Web.Scotty Data.Monoid| get "/:word" $ do {
Prelude Web.Scotty Data.Monoid| beam <- param "word"
Prelude Web.Scotty Data.Monoid| html $ mconcat ["<h1>Scotty, ", beam, "me up!</h1>"]
Prelude Web.Scotty Data.Monoid| }
Prelude Web.Scotty Data.Monoid| }
Prelude Web.Scotty Data.Monoid| :}
<interactive>:19:5:
The last statement in a 'do' block must be an expression
beam <- param "word" html
$ mconcat ["<h1>Scotty, ", beam, "me up!</h1>"]
<interactive>:20:37: Not in scope: `beam'
Prelude Web.Scotty Data.Monoid>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment