MARK P. JONES
Pacific Software Research Center
Department of Computer Science and Engineering
Oregon Graduate Institute of Science and Technology
It is seductive to imagine that effect handlers in an algebraic effect system are not part of the program itself but metalanguage-level folds over the program tree. And in traditional free-like formulations, this is in fact the case. The Eff
monad represents the program tree, which has only two cases:
data Eff effs a where
Pure :: a -> Eff effs a
Op :: Op effs a -> (a -> Eff effs b) -> Eff effs b
data Op effs a where
DCPU-16 Specification | |
Copyright 1985 Mojang | |
Version 1.7 | |
=== SUMMARY ==================================================================== | |
* 16 bit words | |
* 0x10000 words of ram |
newtype Fn a = Fn {unFn :: a -> a} | |
instance Semigroup (Fn a) where | |
(<>) (Fn a) (Fn b) = Fn (b . a) | |
import Control.Monad | |
import Data.Foldable (fold) | |
import Data.Monoid (appEndo) | |
import Hedgehog |
image: nixpkgs/cachix-flakes:nixos-20.03 | |
build: | |
before_script: | |
- mkdir -p /etc/nix | |
- echo "experimental-features = nix-command flakes ca-references recursive-nix" >> /etc/nix/nix.conf | |
- cachix use numtide | |
- nix path-info --all > /tmp/store-path-pre-build | |
script: | |
- nix flake check |
import Data.Function ( fix ) | |
import Optics | |
{- Given a binary tree, produce the sums of all | |
the paths from the root to each of the leaves. | |
NeoVim with HLS (Haskell Language Server) | |
$> ghcid -W -a -c 'cabal repl lib:graph-mach-core' |
{ lib, config, pkgs, ... }: | |
with lib; | |
{ | |
options.v4l2 = mkEnableOption "Enable the confguration to use the reflex as a webcam"; | |
config = mkIf config.v4l2 { | |
# 20.03: v4l2loopback 0.12.5 is required for kernel >= 5.5 | |
# https://github.com/umlaeute/v4l2loopback/issues/257 |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
-- | | |
module Arithmetic.Expr where | |
import Data.Char (chr) | |
import GHC.Real (RealFrac (truncate)) |
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs). | |
# So here's a minimal Gist which worked for me as an install on a new M1 Pro. | |
# Inspired by https://github.com/malob/nixpkgs I highly recommend looking at malob's repo for a more thorough configuration | |
# | |
# Let's get started | |
# | |
# Let's install nix (at the time of writing this is version 2.5.1 | |
curl -L https://nixos.org/nix/install | sh | |
# I might not have needed to, but I rebooted |