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
alert("boom") |
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
#!/bin/bash | |
echo "After installing a new version of GHC the system wide executable symbolic" | |
echo "links will be pointed directly to the installed version instead of the" | |
echo "very useful 'Current' link in /Library/Frameworks/GHC.framework/Versions." | |
echo "This is a problem because the 'switch-ghc' script will no longer work." | |
echo | |
echo "To fix this this script deletes the GHC related symlinks in both /usr/bin" | |
echo "(default installs) and /usr/local/bin (snapshot installs)." | |
echo |
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
#!/usr/bin/env python2 | |
""" | |
Uploads haddocks to Hackage. | |
Use it when Hackage can't build your documentation (e.g. missing libraries). | |
Inspired by: | |
http://fuuzetsu.co.uk/blog/posts/2014-01-06-Fix-your-Hackage-documentation.html | |
""" | |
import getpass |
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
{-# LANGUAGE TypeFamilies, FlexibleInstances #-} | |
import Control.Monad.Error | |
import Control.Monad.Reader | |
type family MappedMonad (m :: * -> *) e' :: * -> * | |
type instance MappedMonad (ErrorT e m) e' = ErrorT e' m | |
type instance MappedMonad (ReaderT r m) e' = ReaderT r (MappedMonad m e') | |
class MapError m where | |
type ErrorType m :: * |
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
{-# LANGUAGE Rank2Types #-} | |
import Control.Applicative | |
import Control.Arrow | |
import Control.Monad | |
import Control.Monad.Trans.Maybe | |
import Control.Monad.Trans.Reader | |
import Control.Monad.Trans.State | |
import Control.Monad.Trans.Writer | |
import Data.Monoid |
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
{-# LANGUAGE | |
GADTs | |
, KindSignatures | |
, DataKinds | |
, PolyKinds | |
, TypeOperators | |
, TypeFamilies | |
, MultiParamTypeClasses | |
, FlexibleInstances | |
, UndecidableInstances |
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
{-# LANGUAGE GADTs, KindSignatures #-} | |
import Prelude hiding (length, sum) | |
import Control.Applicative | |
import Control.Arrow | |
newtype Fix f = In { out :: f (Fix f) } | |
data Alg :: (* -> *) -> * -> * -> * where |
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
{-# LANGUAGE EmptyDataDecls | |
, TypeFamilies | |
, MultiParamTypeClasses | |
, FlexibleContexts | |
, FlexibleInstances | |
, UndecidableInstances | |
, ScopedTypeVariables | |
#-} | |
import Control.Applicative |
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
function f (x) | |
{ | |
var y = x; | |
Array.prototype.shift.call(arguments); | |
return x + y; | |
} | |
f(1, 2); // Returns 3, not 2. |