Skip to content

Instantly share code, notes, and snippets.

data Action a where
AddUser :: Username -> Password -> Action UserId
DeleteUser :: UserId -> Action ()
deriving (Typeable)
data Action a where
AddUser :: Username -> Password -> Action UserId
DeleteUser :: UserId -> Action ()
deriving (Typeable)
Using a sandbox located at C:\Users\Christian\Desktop\test\.cabal-sandbox
Searching for ghc in path.
Found ghc at C:\Program Files (x86)\Haskell Platform\2013.2.0.0\bin\ghc.exe
("C:\\Program Files (x86)\\Haskell Platform\\2013.2.0.0\\bin\\ghc.exe",["--numeric-version"])
C:\Program Files (x86)\Haskell Platform\2013.2.0.0\bin\ghc.exe is version
7.6.3
looking for tool ghc-pkg near compiler in C:\Program Files (x86)\Haskell
Platform\2013.2.0.0\bin
found ghc-pkg in C:\Program Files (x86)\Haskell
Platform\2013.2.0.0\bin\ghc-pkg.exe
import System.Process
import GHC.IO.Handle
import Text.Blaze.Html (Html)
import Text.Blaze.Html.Renderer.Utf8 (renderHtml)
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
convertHtml :: Html -> IO B.ByteString
logic =
true:
4: ['3 Brights + Rain Man', 7]
5: ['5 Brights', 10]
false:
3: ['3 Brights', 5]
4: ['4 Brights', 8]
[@bright_type, @bright] = logic[has(captures, RAIN_MAN)][num_20pt_cards] or ['<none>', 0]
{-# LANGUAGE ScopedTypeVariables #-}
data Foo a = Foo {
fooInt :: Int,
fooA :: a
}
-- Foo has its own indexes as well as all the indexes of a.
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-}
import Data.Acid
import Data.SafeCopy
import Data.Typeable
import Control.Monad.State (get, put)
data Foo = Foo String
266730
266730
266730
266730
266730
266730
266730
266730
266730
266730
@reite
reite / gist:7753128
Last active December 30, 2015 00:59
import requests
import grequests
import json
url = r'http://hotell.difi.no/api/json/brreg/enhetsregisteret?query=Merisma%20Development%20AS'
def sync():
for _ in xrange(50):
root 2907 0.0 0.0 22376 1520 ? S Oct28 0:00 /usr/lib/ghc/lib/runghc -f /usr/lib/ghc/bin/ghc -i=/cube/cube/src -package-db=/cube/cube/cabal-dev/packages-7.6.2.conf /cube/cube/src/Server.hs
root 2908 5.1 37.0 1113172 626432 ? Sl Oct28 1688:32 /usr/lib/ghc/lib/ghc -B/usr/lib/ghc -ignore-dot-ghci -x hs -i=/cube/cube/src -package-db=/cube/cube/cabal-dev/packages-7.6.2.conf -e :set prog "/cube/cube/src/Server.hs" -e :main [] /cube/cube/src/Server.hs