This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE QuasiQuotes #-} | |
{-# LANGUAGE RecordWildCards #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
{- AngularJS and Yesod integration. | |
- | |
- This example is taken from https://github.com/snoyberg/yesod-js | |
- and updated to work with Yesod 1.2.5. | |
- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE FlexibleInstances #-} | |
module Handler.JSRoutes where | |
import Import | |
import qualified Data.Text as T | |
import Database.Persist.Sql (toSqlKey) | |
import Control.Monad.Random | |
jsRoutes :: (MonadRandom m, Applicative m) => [m Text] | |
jsRoutes = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Yesod Makefile | |
# yesod init --bare && make | |
# Running `make` in a fresh scaffold will build the sandbox and dependencies | |
# `yesod-devel` will be executed on each call to `make` assuming all the | |
# dependencies have been installed correctly. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/yesod-websockets/Game-Example/Fm.hs b/yesod-websockets/Game-Example/Fm.hs | |
index cf31bef..a799eca 100755 | |
--- a/yesod-websockets/Game-Example/Fm.hs | |
+++ b/yesod-websockets/Game-Example/Fm.hs | |
@@ -1,21 +1,27 @@ | |
{-# LANGUAGE OverloadedStrings #-} | |
module Fm where | |
-import Data.List | |
-import Text.Julius |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
module SimpleThings where | |
import Control.Applicative ((<$>), (<*>)) | |
import Control.Monad (mzero) | |
import Data.Aeson | |
import qualified Data.Aeson as A | |
-- | sum type containing all possible payloads |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
module Main where | |
import Control.Monad.IO.Class (liftIO) | |
import Network.HTTP.Types | |
import Network.Wai.Middleware.RequestLogger | |
import Network.Wai.Middleware.Static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
import Data.HashMap.Strict as M | |
import Data.Maybe | |
import Data.Text (Text) | |
import Data.Yaml | |
import Database.Persist.Postgresql | |
import Database.Persist.Sql hiding (Active) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"{" | |
'(:eval (propertize (projectile-project-name) | |
'face 'font-lock-preprocessor-face)) | |
;; branch | |
":" | |
'(:eval (propertize (magit-get-current-branch) | |
'face 'font-lock-preprocessor-face)) | |
;; branch | |
"} " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; org schedule first monday of every month | |
;; SCHEDULED: <%%(diary-float t 1 1)> | |
(diary-float t 1 1) | |
;; org schedule mon-fri | |
;; SCHEDULED: <%%(memq (calendar-day-of-week date) '(1 2 3 4 5))> | |
(memq (calendar-day-of-week date) '(1 2 3 4 5)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- An example Shakefile originally written by Brent Yorgey | |
-- for the CIS 194 class. | |
{-# LANGUAGE DeriveDataTypeable #-} | |
import Control.Monad (forM_, replicateM_, when) | |
import Data.Functor ((<$>)) | |
import Data.List (find, isPrefixOf) | |
import Data.Monoid ((<>)) |
OlderNewer