Skip to content

Instantly share code, notes, and snippets.

View emilaxelsson's full-sized avatar

Emil Axelsson emilaxelsson

View GitHub Profile
@phadej
phadej / overlap.hs
Created July 1, 2016 09:56
OverlappingInstance workarounds
{-# LANGUAGE CPP #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleInstances, FlexibleContexts #-}
{-# LANGUAGE DataKinds, GADTs, KindSignatures, TypeOperators, UndecidableInstances #-}
#if __GLASGOW_HASKELL__ < 708
#error "requires GHC 7.10 or newer"
#endif
module Main (main) where
@llelf
llelf / ip1.hs
Last active March 14, 2020 18:30
{-# LANGUAGE GADTs, ConstraintKinds, Rank2Types, ImplicitParams #-}
data Rec fields where
Rec :: fields => Rec fields
infixr 1 ?
(?) :: Rec fields -> (fields => r) -> r
Rec ? e = e
record :: Rec (?a :: Int, ?b :: String)
@satnam6502
satnam6502 / ListApps.go
Created January 8, 2016 08:43
Go program for listing apps on an Android device
package main
import (
"fmt"
"io/ioutil"
"log"
"path/filepath"
"strings"
"github.com/lunny/axmlParser"