Skip to content

Instantly share code, notes, and snippets.

View aljce's full-sized avatar
Is this facebook now?

Alice McKean aljce

Is this facebook now?
  • Portland, OR
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mckeankylej on github.
  • I am mckeankylej (https://keybase.io/mckeankylej) on keybase.
  • I have a public key ASBU2f_UjGI8XMEQtK4hxpbLtTLJSt2bcWL0pfUYB2inVgo

To claim this, I am signing this object:

{-# LANGUAGE EmptyCase #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeInType #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE UndecidableSuperClasses #-}
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
module TypedClient
# Using a specific checkout of nixpkgs makes it easy to debug as you know exactly what the deps are.
# This being said in production you should pass the global nixpkgs to this file.
let nixpkgs-src = builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/56d94c8c69f8cac518027d191e2f8de678b56088.tar.gz";
sha256 = "1c812ssgmnmh97sarmp8jcykk0g57m8rsbfjg9ql9996ig6crsmi";
};
in
{ pkgs ? (import nixpkgs-src {}) }:
with pkgs;
with stdenv.lib;
newtype Region s a = Region (IO a) deriving (Functor, Applicative, Monad)
liftIO :: IO a -> Region s a
liftIO = Region
runRegion :: (forall s. Region s a) -> IO a
runRegion (Region x) = x
newtype Ref s a = Ref (IORef a)
@aljce
aljce / Graph.hs
Last active December 30, 2018 23:01
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE DeriveTraversable #-}
{-# OPTIONS_GHC -Wall -Werror #-}
module Data.Graph
( Graph
, empty
, insert
, edge
, neighbors
, vertices
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeInType #-}
{-# OPTIONS_GHC -Wall -Werror -Wno-unticked-promoted-constructors #-}
-- | Conversion between unlifted and lifted datatypes
module Packed.Levity
( -- * Types
Rep
, Levity(..)
{ url # The Git revision of nixpkgs to fetch
, sha256 # The SHA256 of the downloaded .tar
, sha256unpacked # The SHA256 of the downloaded .nar
, system ? builtins.currentSystem # This is overridable if necessary
}:
with {
ifThenElse = { bool, thenValue, elseValue }: (
if bool then thenValue else elseValue);
};
Preprocessing library for kpf-0.1.0..
Building library for kpf-0.1.0..
[6 of 6] Compiling Hask.Functor.Compose ( Hask/Functor/Compose.hs, dist/build/Hask/Functor/Compose.o )
Hask/Functor/Compose.hs:21:10: error:
• solveWanteds: too many iterations (limit = 4)
Unsolved: WC {wc_simple =
[D] _ {0}:: Category s0 (CDictCan)
[D] _ {0}:: Category s0 (CDictCan)
[D] _ {0}:: Category s0 (CDictCan)
@aljce
aljce / Pokemon.hs
Last active April 13, 2018 23:26
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE EmptyCase #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeInType #-}
module Pokemon where
import Data.Kind (Type)
import Data.Void (Void)
import Type.Reflection ((:~:)(..))
@aljce
aljce / Co.agda
Last active December 21, 2017 02:10
module Co where
open import Level hiding (suc)
open import Size
open import Data.Empty
open import Data.Unit
open import Data.Bool
open import Data.Nat hiding (_⊔_)
open import Data.Vec using (Vec ; [] ; _∷_)
open import Data.List using (List ; [] ; _∷_)