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 DeriveGeneric #-} | |
{-# LANGUAGE EmptyCase #-} | |
{-# LANGUAGE GADTs #-} | |
module Ops where | |
import Control.Applicative | |
import GHC.Generics | |
import Data.Void |
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 DeriveGeneric #-} | |
{-# LANGUAGE EmptyCase #-} | |
{-# LANGUAGE GADTs #-} | |
module Ops where | |
import Data.Void | |
import Data.Functor.Contravariant | |
import Data.Functor.Contravariant.Divisible hiding (lost) | |
import Generics.Eot |
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
Title: | |
A tasting plate of nifty things from the land of functional programming. | |
Abstract: | |
There are plenty of talks that introduce the basics of functional programming, and there are quite a few talks that try to explain some complex conceptual or theoretical piece of the puzzle. | |
This is not either of those talks. Instead, we'll be taking a series of shallow dives into a handful of libraries and tools in the functional programming space that are particular good at getting people excited. | |
The main theme will be showing off the nice things you can unearth if you have a community of motivated and curious folks from a lot of different domains and have them dig in a lot of different directions. |
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
nixpkgs.config.packageOverrides = super: { | |
hydra = super.hydra.overrideDerivation (old : { | |
version = "2017-09-14"; | |
src = pkgs.fetchFromGitHub { | |
owner = "NixOS"; | |
repo = "hydra"; | |
rev = "b828224fee451ad26e87cfe4eeb9c0704ee1062b"; | |
sha256 = "05xv10ldsa1rahxbbgh5kwvl1dv4yvc8idczpifgb55fgqj8zazm"; | |
}; | |
}); |
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
scroller :: (MonadWidget t m, PerformEvent t m, MonadIO (Performable m), DomBuilder t m, DomBuilderSpace m ~ GhcjsDomSpace) => T.Text -> m (Event t ()) -> m () | |
scroller height content = do | |
let | |
m = M.fromList [ | |
("class", "list-group") | |
, ("style", T.concat ["position : relative; height : ", height, "; overflow : auto; "]) | |
] | |
(s, e) <- elAttr' "div" m $ do | |
content |
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
def writeFile(filename, contents): | |
with open(filename, "w") as f: | |
f.write(contents) | |
def readFile(filename): | |
contents = "" | |
with open(filename, "r") as f: | |
contents = f.read() | |
return contents | |
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
{ config, pkgs, lib ? pkgs.lib, ... }: | |
with lib; | |
let | |
cfg = config.services.blog-updater; | |
in | |
{ | |
# interface | |
options = { |
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 TemplateHaskell #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE DeriveFunctor #-} | |
{-# LANGUAGE DeriveFoldable #-} | |
{-# LANGUAGE DeriveTraversable #-} | |
{-# LANGUAGE StandaloneDeriving #-} | |
module Demo 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
trackLines :: (Reflex t, MonadHold t m) | |
=> Event t Point | |
-> Event t Point | |
-> Event t Point | |
-> m (Behavior t [Maybe Point]) | |
trackLines eUp eDown eMove = do | |
-- track whether the mouse is up or down in a Behavior | |
bState <- hold False . leftmost $ [ | |
False <$ eUp |
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
Error (figuring out linker information): user error (invalid --version output, or linker is unsupported) | |
<no location info>: error: | |
Warning: Couldn't figure out linker information! | |
Make sure you're using GNU ld, GNU gold or the built in OS X linker, etc. | |
*** Linker: | |
/nix/store/xzhv124j2cp9h7wk2p5c6syz3myj1jrh-wasm32-unknown-unknown-wasm-clang-cross-wrapper/bin/wasm32-unknown-unknown-wasm-cc -fno-stack-protector -DNO_REGS -DUSE_MINIINTERPRETER -o ../test -lm -no-pie ../Main.o -L/home/dave/work/github.com/WebGHC/ghc/libraries/base/dist-install/build -L/home/dave/work/github.com/WebGHC/ghc/libraries/integer-simple/dist-install/build -L/home/dave/work/github.com/WebGHC/ghc/libraries/ghc-prim/dist-install/build -L/home/dave/work/github.com/WebGHC/wasm-cross/ghc/rts/dist/build /run/user/1000/ghc5661_0/ghc_2.o -Wl,-allow-undefined-file,rts.wasm.syms -lHSbase-4.11.0.0 -lHSinteger-simple-0.1.1.1 -lHSghc-prim-0.5.2.0 -liconv -lm -lrt -ldl | |
clang-6.0: warning: argument unused during compilation: '-nopie |