Skip to content

Instantly share code, notes, and snippets.

View dagit's full-sized avatar
💭
What's this?

Jason Dagit dagit

💭
What's this?
View GitHub Profile
module Utils where
import Data.Map (Map)
import qualified Data.Map as M
data Heap a = Heap
{ hNumObjs :: Int
, hUnused :: [Addr]
, hMap :: Map Addr a
}
{
{-# OPTIONS -w #-}
module CoreLexer
( Alex(..)
, AlexPosn(..)
, Token(..)
, alexMonadScan
, runAlex
, alexGetInput
) where
import Prelude hiding (log)
import Control.Monad ( (<$>) )
import Control.Monad.Trans ( liftIO, when, baz, Bar(..) ) -- some made up names
{- | Our very important FOO compilation option -}
#ifdef FOO
foo = 1
#endif
{- {- Nested comments aren't quite right -} nope... -}
<script>
jsMath.Process(document);
</SCRIPT>
<script SRC="../plugins/noImageFonts.js"></SCRIPT>
<script SRC="../jsMath.js"></SCRIPT>
@dagit
dagit / rc
Created March 30, 2012 18:36
#!/bin/bash
if test "$SSH_AUTH_SOCK" ; then
ln -sf $SSH_AUTH_SOCK ~/.ssh/ssh_auth_sock
fi
@dagit
dagit / .tmux.conf
Last active October 2, 2015 13:58
set -g update-environment "DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
set-environment -g 'SSH_AUTH_SOCK' ~/.ssh/ssh_auth_sock
dagit@flux:~/tmp$ cabal-dev install accelerate-cuda
Resolving dependencies...
Configuring accelerate-cuda-0.12.1.1...
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
checking for nvcc... nvcc
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/private/var/folders/wb/kzn7x2tj6db_g9qhwy3w1ss00000gp/T/accelerate-cuda-0.12.1.1-85898/accelerate-cuda-0.12.1.1':
configure: error: cannot run C++ compiled programs.
@dagit
dagit / gist:3806038
Created September 30, 2012 06:26
OverloadedStrings crash
{-# LANGUAGE OverloadedStrings #-}
import Data.String
newtype BadString = BS String deriving Show
instance IsString BadString where fromString = error
main = print ("Hello, World!" :: BadString)
{-