Skip to content

Instantly share code, notes, and snippets.

$ 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
nix-build
error: cannot auto-call a function that has an argument without a default value (‘mkDerivation’)
output path ‘/nix/store/q7aq9f95rnybb1snsif9271139vgsjvg-git-export’ should have r:sha256 hash ‘1l4r55n1wzr817l225l6pm97li1mxg9icd8s51cpfihh91nkdz68’, instead has ‘0q7cjmz1fsrw3yfsr3h274qjamwnw01xgaqq3h5cjbqlrni4iq7k’
cannot build derivation ‘/nix/store/jax9rqzrp6aq8q5jjxdavagp7mqgcbgn-ruby-2.1.3-p0-bundler-HEAD.drv’: 1 dependencies couldn't be built
@ryantm
ryantm / this_file.rb
Last active August 29, 2015 14:18
Ruby comparison eats stack trace
#$ chruby ruby-2.2.0
#$ ruby this_file.rb
class A
def <=>(other)
nil
end
end
A.new <=> A.new #no error
@ryantm
ryantm / gist:b7ff72a299b0eed3bede
Last active August 29, 2015 14:21
rebuilding after ghc override
ryantm@rtmnix ~ (master)$ sudo nixos-rebuild switch --upgrade
[sudo] password for ryantm:
downloading Nix expressions from ‘https://nixos.org/releases/nixos/unstable/nixos-15.05pre61966.75ebc3c/nixexprs.tar.xz’...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
unpacking channels...
building Nix...
building the system configuration...
updating GRUB 2 menu...
spacefm
** (.spacefm-wrapped:6320): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
** (.spacefm-wrapped:6320): WARNING **: No root settings found in /etc/spacefm/ Setting a root editor in Preferences should remove this warning on startup. Otherwise commands run as root may present a security risk.
(.spacefm-wrapped:6320): Gtk-WARNING **: Could not find the icon 'spacefm'. The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from:
http://icon-theme.freedesktop.org/releases