packages feed

rallod (empty) → 0.0.1

raw patch · 5 files changed

+118/−0 lines, 5 filesdep +basedep +haskell98setup-changed

Dependencies added: base, haskell98

Files

+ LICENSE view
@@ -0,0 +1,30 @@+Copyright (c)2010, Matt Parker++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++    * Redistributions of source code must retain the above copyright+      notice, this list of conditions and the following disclaimer.++    * Redistributions in binary form must reproduce the above+      copyright notice, this list of conditions and the following+      disclaimer in the documentation and/or other materials provided+      with the distribution.++    * Neither the name of Matt Parker nor the names of other+      contributors may be used to endorse or promote products derived+      from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ rallod.cabal view
@@ -0,0 +1,19 @@+Name:                 rallod+Version:              0.0.1+Build-type:           Simple+Synopsis:             '$' in reverse. +Description:          A Simple package that exports '==>', which operates in the opposite direction of '$'.+License:              BSD3+License-file:         LICENSE+Author:               Parker, Matt+Maintainer:           Parker, Matt <moonmaster9000@gmail.com>+Build-Depends:        base+Cabal-version:        >= 1.2+category:             Web+homepage:             http://github.com/moonmaster9000/rallod+data-files:           readme.markdown++library+  build-depends: haskell98, base >= 4.0 && < 5 +  exposed-modules: Rallod+  hs-source-dirs: src/
+ readme.markdown view
@@ -0,0 +1,61 @@+# Bird++A sinatra-ish web framework written in haskell, riding on top of Hack. ++## Why?++Sinatra has a beautiful, simple, elegant syntax, but it's essentially an attempt to bring pattern matching to a language never intended for +pattern matching. Why not attempt something similar in a language with not just beautiful pattern matching, but with all the declarative +bells and whistles: lazy evaluation, first-class functions, currying, polymorphism?++## Install++    λ cabal update && cabal install bird++Note: make sure $HOME/.cabal/bin is in your PATH.++## Create an app++    λ bird MyApp ++## Compile your app++    λ cd MyApp+    λ bird nest ++## Start your app (runs on port 3000)++    λ bird fly++## Try it out+    +    λ curl http://localhost:3000+      404 Not Found++## Improvise!+    +    -- MyApp.hs+    module MyApp where+    import Bird+    import Data.String.Utils++    get, post, put, delete :: Request -> IO Reply+    get Request { path = ("howdy":xs) } +      = ok $ "Howdy " ++ (join ", " xs) ++ "!"++    get _ = return notFound_+    post _ = return notFound_+    put _ = return notFound_+    delete _ = return notFound_++now:++    λ curl http://localhost:3000/howdy/there/pardna+        Howdy there, pardna!++## Notes++This project is *still* in its infancy. Coming features:++* logging+* support for sending files
+ src/Rallod.hs view
@@ -0,0 +1,6 @@+module Rallod where++infixl 9 ==>++(==>) :: a -> (a -> b) -> b+x ==> f = f $ x