Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import sys
import subprocess
import re
msg_file = sys.argv[1]
lines = list(open(msg_file))
if lines[0].startswith('TODO update'):
del lines[0]
@zyla
zyla / gist:19bbe3f58f97bbb2bbc9956b8c4dc7ce
Created July 13, 2017 11:30
type errors from monad-classes
With import list
• Could not deduce (Control.Monad.Classes.Writer.MonadWriterN
(Control.Monad.Classes.Core.FindTrue
(Control.Monad.Classes.Core.MapCanDo
(Control.Monad.Classes.Effects.EffWriter [Bool]) m))
[Bool]
m)
arising from a use of ‘tell’
from the context: Monad m
diff --git a/src/Jack/Seed.purs b/src/Jack/Seed.purs
index db308ac..73db0a3 100644
--- a/src/Jack/Seed.purs
+++ b/src/Jack/Seed.purs
@@ -19,20 +19,24 @@ module Jack.Seed (
, splitSeed
) where
+import Prelude
+
-- | Failed experiment in generically deriving a `Functor` instance.
-- | Requires PureScript HEAD (what will be 0.12), and still doesn't compile :/
module Data.Generic.Rep.Functor
( class GenericMap
, genericMap'
) where
import Prelude
import Data.Generic.Rep (class Generic, Argument(..), Constructor(..), Field(..), NoArguments(..), Product(..), Rec(..), Sum(..), from, to)
{-# LANGUAGE NamedFieldPuns #-}
module FixImports where
import Data.Functor (void)
import Data.List (span, isPrefixOf, intercalate)
import qualified Text.Parsec as P
import qualified
Text.Parsec.String as P
import Data.Char as DC (isSpace)
import Debug.Trace as
module Main where
import Prelude
import Data.Maybe
import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Console (CONSOLE, log)
import Data.Argonaut (stringify)
import Data.Argonaut.Generic.Aeson as GenericAeson
import Data.Argonaut.Generic.Argonaut as GenericArgonaut
// Binary ddrescue_extract reads finished blocks from a ddrescue-produced image.
package main
import (
"bufio"
"fmt"
"io"
"log"
"os"
)
#!/bin/sh
# Bump PureScript dependencies in `bower.json` to `#compiler/0.12`.
set -e
awk '
{
if (/ "purescript-*/ && ! /#compiler\/0.12/) {
if(/#/) {
gsub(/#.*"/, "#compiler/0.12\"");
#!/bin/sh
# Try to `bower info` all dependencies and print out the ones which failed.
set -e
node -e '
var package = require("./bower.json");
dump(package.dependencies);
dump(package.devDependencies);
showBoard initBoard `shouldBe` ".H.H.H.H\n........\n........\n........\n........\n........\n........\nF.......\n"
showBoard initBoard `shouldBe`
unlines
[ ".H.H.H.H"
, "........"
, "........"
, "........"
, "........"