- http://bitemyapp.com/posts/2017-09-23-please-stop-using-typed-holes.html
- http://vaibhavsagar.com/blog/2017/05/22/discovering-continuations/
- http://matthew.brecknell.net/post/hole-driven-haskell/
- https://www.youtube.com/watch?v=52VsgyexS8Q
- https://wiki.haskell.org/GHC/Typed_holes
- https://github.com/maddogdavis/holey
- https://ghc.haskell.org/trac/ghc/wiki/Holes
- https://www.shimweasel.com/2015/02/17/typed-holes-for-beginners
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
| #include <assert.h> | |
| #include <stdio.h> | |
| #include <stdint.h> | |
| #include <stdlib.h> | |
| int ack_recursive(int m, int n) { | |
| if (m == 0) { | |
| return n + 1; | |
| } |
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 python | |
| import time | |
| """ | |
| Utility Functions and decorators for internal use | |
| """ | |
| def timeit(method): | |
| def timed(*args, **kw): | |
| ts = time.time() |
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
| -- Define acpi power logger | |
| acpi_power :: String -> [String] -> Logger | |
| acpi_power dev attr = | |
| io $ do | |
| attrOut <- mapM (\x -> liftIO $ readFile $ sysFsPath ++ x) attr | |
| return $ Just $ filter (/= '\n') (intercalate " " attrOut) | |
| where | |
| sysFsPath = "/sys/class/power_supply/" ++ dev ++ "/" | |
| file_reader :: String -> Logger |
Continuation of Encoding Overlapping, Extensible Isomorphisms: encoding "open kinds" to better express some awkward type classes.
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 bash | |
| sudo mkdir -p /run/nix/current-load | |
| sudo launchctl unload /Library/LaunchDaemons/org.nixos.nix-daemon.plist | |
| sudo rm /Library/LaunchDaemons/org.nixos.nix-daemon.plist | |
| sudo curl -fsSL -o /Library/LaunchDaemons/org.nixos.nix-daemon.plist https://gist.github.com/LnL7/ba2eac19e77cd6b4bb02c8de03bf5f4e/raw/69722c2b13c4eb022a1312cd6891838b413e1f96/org.nixos.nix-daemon.plist | |
| sudo launchctl load /Library/LaunchDaemons/org.nixos.nix-daemon.plist | |
| # Configure /etc/nix/machines | |
| # Make sure root can ssh to the builder (known_hosts etc.) |
A guide to setting up the Haskell tooling for Emacs in a Nix environment.
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 DataKinds #-} | |
| {-# LANGUAGE PolyKinds #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| {-# LANGUAGE UndecidableInstances #-} | |
| {-# LANGUAGE UnsaturatedTypeFamilies #-} | |
| import GHC.TypeLits | |
| import Prelude hiding (Functor, Semigroup) | |
| type Main = (Fizz <> Buzz) <$> (0 `To` 100) |
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
| *.tar.gz | |
| .sentinel.* |
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 #-} | |
| {-# LANGUAGE InstanceSigs #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| module SemiRepresentable where | |
| import qualified Data.Map as M | |
| import Numeric.Natural | |
| import qualified Data.Set as S | |
| import Data.These |
OlderNewer