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
compileEntity (SASSNestedRuleset (SASSRuleset selector rules)) = do | |
c <- compileEntities rules | |
return . SASSNestedRuleset $ SASSRuleset selector c |
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 BangPatterns #-} | |
module Main where | |
import Control.Applicative ((*>), (<*), (<$>)) | |
import Control.Monad (void) | |
import Data.List | |
import Data.List.Split | |
import Text.ParserCombinators.Parsec | |
import Debug.Trace |
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, TypeFamilies, TemplateHaskell, | |
QuasiQuotes, MultiParamTypeClasses #-} | |
import Yesod | |
data App = App | |
mkYesod "App" [parseRoutes| | |
/ RootR GET | |
/setname SetNameR GET POST |
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
Couldn't match type ‘Entity | |
(ProcessGeneric | |
(PersistMonadBackend (YesodPersistBackend App (HandlerT App IO))))’ | |
with ‘KeyBackend | |
persistent-1.3.1.1:Database.Persist.Sql.Types.SqlBackend | |
(ProcessGeneric | |
persistent-1.3.1.1:Database.Persist.Sql.Types.SqlBackend)’ | |
Expected type: HandlerT | |
App | |
IO |
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
module Handler.Processes where | |
import qualified Data.Text as T | |
import Data.Time hiding (parseTime) | |
import Database.Persist.Sql | |
import Import | |
utctimeField :: Field Handler UTCTime | |
utctimeField = Field | |
{ fieldParse = parseUtcInput |
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
module Phantoms where | |
data PrimaryKey a = PrimaryKey Int | |
data Entity a = Entity (PrimaryKey a) a | |
data User = User { name :: String } | |
data Post = Post { title :: String } | |
find :: PrimaryKey a -> a |
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
f :: (a -> Int) -> Int | |
f = undefined | |
g :: (forall a. a -> Int) -> Int | |
g = undefined | |
a = f (+1) -- ok | |
b = g (+1) -- type error | |
c :: (a -> Int) -> Int |
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
import Control.Concurrent | |
import Control.Concurrent.Async | |
import Data.List.Split | |
main = do | |
iter [0..1000000] (+1) | |
iter xs f = fmap concat $ c $ map (\x -> return $ map f x) $ chunksOf 15 xs | |
c = foldr conc (return []) |
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
$(function() { | |
console.log(JSON.parse(#{json})); | |
}); |
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
$ make master@2b76377 | |
[ 0%] Building CXX object example/CMakeFiles/example.type_list.type_list.dir/type_list/type_list.cpp.o | |
In file included from /Users/darth/projects/hana/include/boost/hana/core/typeclass.hpp:13:0, | |
from /Users/darth/projects/hana/include/boost/hana/constant/constant.hpp:13, | |
from /Users/darth/projects/hana/include/boost/hana/detail/assert.hpp:13, | |
from /Users/darth/projects/hana/example/type_list/type_list.cpp:7: | |
/Users/darth/projects/hana/include/boost/hana/core/datatype.hpp:48:20: error: template declaration of 'constexpr const bool boost::hana::is_valid' | |
constexpr bool is_valid = true; | |
^ | |
In file included from /Users/darth/projects/hana/include/boost/hana/detail/integral_fwd.hpp:17:0, |