This file contains hidden or 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, TemplateHaskell, EmptyDataDecls, TypeFamilies #-} | |
module Main where | |
import Debug.Trace (trace) | |
import Happstack.Server | |
import Web.Routes.Site | |
import Web.Routes.PathInfo (PathInfo (..), parseSegments) | |
import Web.Routes.Happstack |
This file contains hidden or 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 TypeSynonymInstances #-} | |
module Blaze ( | |
module Text.Blaze.Renderer.String | |
, module Text.Blaze | |
) where | |
import qualified Data.ByteString.Char8 as B | |
import qualified Data.ByteString.Lazy.UTF8 as LU (toString, fromString) | |
import Text.Blaze |
This file contains hidden or 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
GHCi, version 6.12.1: http://www.haskell.org/ghc/ :? for help | |
Loading package ghc-prim ... linking ... done. | |
Loading package integer-gmp ... linking ... done. | |
Loading package base ... linking ... done. | |
[ 1 of 25] Compiling Feedback.Addresses ( Feedback/Addresses.hs, interpreted ) | |
[ 2 of 25] Compiling Feedback.UID ( Feedback/UID.hs, interpreted ) | |
[ 3 of 25] Compiling Results ( Results.hs, interpreted ) | |
[ 4 of 25] Compiling Build ( Build.hs, interpreted ) | |
[ 5 of 25] Compiling BinReloc.BinReloc ( BinReloc/BinReloc.hs, interpreted ) |
This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
int countOnes (int n) | |
{ | |
int r = 0; | |
while (n > 0) { | |
if (n % 10 == 1) { |
This file contains hidden or 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 Enumerator where | |
import Prelude hiding (init, unwords, words) | |
import Data.Enumerator hiding (map) | |
import qualified Data.Enumerator.Text as ET | |
import qualified Data.Enumerator.List as EL | |
import Data.Text hiding (reverse, take, map) | |
import Data.List (sort) |
This file contains hidden or 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
class Documentation m where | |
doc :: String -> m | |
-- M1 and M2 are monads. | |
instance Documentation (M1 ()) where | |
doc = ... | |
instance Documentation (M2 ()) where | |
doc = ... |
This file contains hidden or 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 TypeSynonymInstances #-} | |
{-# Language FlexibleInstances #-} | |
{-# Language FlexibleContexts #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
module Main where | |
import Control.Monad.Except | |
import Control.Monad.Trans.State | |
import Data.Sequence as S |