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
struct SampleData { | |
Container<float> totalradiance; | |
Container<int> lightcutSize; | |
template <class T> | |
struct decl_sampledata_from_container {}; | |
template <template <class, class...> class C, class T> | |
struct decl_sampledata_from_container<C<T>> { | |
typedef SampleData<C> type; |
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
#include <QQmlEngine> | |
#include <QObject> | |
#include <QGuiApplication> | |
#include <QQmlComponent> | |
#include <QQmlContext> | |
#include <QQuickWindow> | |
#include <QDebug> | |
class App : public QObject | |
{ |
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
$ nix-instantiate haskell-rethinkdb.nix --indirect --add-root $PWD/shell.drv --show-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
# This is a function: we take `haskellPackages` as an argument so that it can be overriden, | |
# but supply `nixpkgs.haskellPackages` as a default value if no value is explictly given. | |
{ haskellPackages ? (import <nixpkgs> {}).haskellPackages }: | |
let | |
# Build our own haskell package set with all the packages added that we want | |
myHaskellPackages = haskellPackages.override { | |
# super refers to the "previous" haskell package set (the one we extend) | |
# self refers to the final haskell package set, after our customizations have been |
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
let | |
# First, let's get a haskellPackages set to play around with | |
haskellPackages = (import <nixpkgs> {}).haskellPackages; | |
# Change the default mtl | |
haskellPackagesMtl = haskellPackages.override { | |
overrides = self: super: { | |
mtl = super.mtl_2_1_3_1; | |
}; | |
}; |
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
{ mkDerivation, base, stdenv, time }: | |
mkDerivation { | |
pname = "acme-year"; | |
version = "2014"; | |
sha256 = "0zml370s8zv9y60hggv0hlwb3rhmixhdp37cz496dbpffdkw70my"; | |
libraryHaskellDepends = [ base ]; | |
testHaskellDepends = [ base time ]; | |
homepage = "http://github.com/joeyadams/hs-acme-year"; | |
description = "Get the current year"; | |
license = stdenv.lib.licenses.publicDomain; |
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 Main where | |
import Control.Monad | |
import Data.List (find) | |
import Data.Maybe | |
import Data.Text.Encoding | |
import Data.ByteString (ByteString) | |
import Data.Maybe | |
import Network.URI (parseURI, URI) | |
import Network.HTTP |
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
ghci -ddump-splices test2.hs 12:17:44 | |
GHCi, version 7.6.3: 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 2] Compiling THTest ( THTest.hs, interpreted ) | |
[2 of 2] Compiling Test ( test2.hs, interpreted ) | |
Loading package array-0.4.0.1 ... linking ... done. | |
Loading package deepseq-1.3.0.1 ... linking ... done. | |
Loading package containers-0.5.0.0 ... linking ... done. |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; environment | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(load "auctex.el" nil t t) | |
(load "preview-latex.el" nil t t) | |
(add-to-list 'load-path "~/.emacs.d/plugins") | |
(require 'sticky-windows) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |