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
clock-0.7.2: configure | |
clock-0.7.2: build | |
network-2.6.3.2: configure | |
old-time-1.1.0.3: download | |
foundation-0.0.15: configure | |
foundation-0.0.15: build | |
old-time-1.1.0.3: configure | |
Progress: 4/84 | |
-- While building package old-time-1.1.0.3 using: | |
/tmp/stack13341/old-time-1.1.0.3/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/setup/setup --builddir=.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0 configure --with-ghc=/home/yuri/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/bin/ghc --with-ghc-pkg=/home/yuri/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/home/yuri/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.6/8.0.2/pkgdb --libdir=/home/yuri/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.6/8.0.2/lib --bindir=/home/yuri/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.6/8.0.2/bin --datadir=/home/yuri/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.6/8.0.2/share --libexecdir=/home/yuri/.stack/snapshots/ |
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
{ pkgs ? import <nixpkgs> {} }: | |
let | |
stdenv = pkgs.stdenv; | |
lib = stdenv.lib; | |
python = import ./requirements.nix { inherit pkgs; }; | |
# The filter function will be used bellow by filterSource | |
filter = path: type: let baseName = baseNameOf (toString path); in | |
!(lib.hasSuffix ".sqlite3" baseName) && | |
!(lib.hasSuffix ".log" baseName) && |
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
import React, { Component } from 'react'; | |
import Rx, { Subject, Observable } from 'rxjs'; | |
import { connect, combineProps } from 'rx-react-container'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
class AppComponent extends Component { | |
render() { | |
return ( | |
<div> |
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
user auctions; | |
worker_processes auto; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
} | |
http { |
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
type (_, _) wire = | |
| WArr: ('a -> 'b) -> ('a, 'b) wire | |
| WConst: 'b -> (_, 'b) wire | |
| WGen: ((unit -> float) -> 'a -> 'b * ('a, 'b) wire) -> ('a, 'b) wire | |
| WId: ('a, 'a) wire |
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
trilegals :: [Int] | |
trilegals = filter isTrilegal [100..1000] | |
isTrilegal :: Int -> Bool | |
isTrilegal n | |
| n < 100 || n > 999 = False | |
| otherwise = u - d == (d - c)*3 | |
where [c, d, u] = map (read . (:"")) (show n) :: [Int] | |
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
{ | |
allowUnfree = true; | |
packageOverrides = pkgs: with pkgs; { | |
idea = recurseIntoAttrs (callPackages <nixpkgs/pkgs/applications/editors/idea> { | |
jdk = oraclejdk8; | |
androidsdk = androidsdk_4_4; | |
}); | |
}; | |
} |
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
import Control.Monad.Except | |
import Control.Exception (Exception (..), try) | |
liftErrorIO :: (Exception e, MonadIO m, MonadError e m) => IO a -> m a | |
liftErrorIO = liftIO . try >=> either throwError return | |
liftedBracket :: (Exception e, MonadIO m, MonadError e m) => m a -> (a -> m b) -> (a -> m c) -> m c | |
liftedBracket acquire release comp = do | |
resource <- acquire | |
result <- catchError (comp resource) (\e -> release resource >> throwError e) |
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
import qualified Data.Set as S | |
import Data.Map (Map) | |
import qualified Data.Map as M | |
reconstructPath :: Ord a => Map a a -> a -> [a] | |
reconstructPath cameFrom end = helper end [end] | |
where helper current total = case M.lookup current cameFrom of | |
Just v -> helper v (v:total) | |
Nothing -> total |