Skip to content

Instantly share code, notes, and snippets.

import Control.Arrow
main = return ()
printFile = readFile >>> putStr
{ pkgs }: {
ryantmEnv = pkgs.buildEnv {
name = "ryantm";
paths = [
firefox
chromium-stable
thunderbird
];
};
{ pkgs }: {
packageOverrides = pkgs: rec {
ryantmEnv = pkgs.buildEnv {
name = "ryantm";
paths = with pkgs; [
firefox
chromium
thunderbird
];
pkgs: {
firefox = {
enableGnash = true;
};
packageOverrides = pkgs: {
ryantm = pkgs.buildEnv {
name = "ryantm";
paths = with pkgs; [
firefox
chromium
@ryantm
ryantm / newtype FizzBuzz
Last active August 29, 2015 14:05
Haskell Fizzbuzz
newtype FizzBuzz = FizzBuzz Int
instance Show FizzBuzz where
show (FizzBuzz i)
| iDivisibleBy 15 = "Fizz Buzz"
| iDivisibleBy 5 = "Buzz"
| iDivisibleBy 3 = "Fizz"
| otherwise = show i
where
iDivisibleBy n = i `rem` n == 0
$ cabal install --only-dep --reinstall
Resolving dependencies...
All the requested packages are already installed:
Use --reinstall if you want to reinstall anyway.
test/Spec.hs:5:8:
Could not find module ‘Test.Hspec’
It is a member of the hidden package ‘hspec2-0.4.2’.
Use -v to see a list of the files searched for.
test/Talklibre/StoreSpec.hs:8:8:
Could not find module ‘Test.Hspec.QuickCheck’
It is a member of the hidden package ‘hspec2-0.4.2’.
Use -v to see a list of the files searched for.
@ryantm
ryantm / a.hs
Last active August 29, 2015 14:08
f :: a -> String
f a = "Cool"
g :: (a -> String) -> String
g h = h 1
main = do
putStrLn (f 1)
putStrLn (g f)
@ryantm
ryantm / gist:d786d3cfaca3c72d93f5
Created January 3, 2015 05:44
nixos env variable expansion question
[root@rtmnix:/etc/nixos]# NIX_PATH="m=blah" nix-instantiate --eval -E '<m>'
error: file ‘m’ was not found in the Nix search path (add it using $NIX_PATH or -I)
ryantm@ryantm0j132 ~/sandbox/simple-shared (master)$ ./build.sh
+ set -e
+ cd library
+ mkdir build
+ cd build
+ cmake ../ -DCMAKE_INSTALL_PREFIX=../../executable -Wno-dev
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works