Skip to content

Instantly share code, notes, and snippets.

View goolord's full-sized avatar
👹

Zachary Churchill goolord

👹
View GitHub Profile
%NOTIFY: Added "/home/zachchurchill/meow.hs" 2018-11-28 21:22:02.749463309 UTC False
%NOTIFY: Modified "/home/zachchurchill/meow.hs" 2018-11-28 21:22:02.749475835 UTC False
%NOTIFY: Modified "/home/zachchurchill/meow.hs" 2018-11-28 21:22:02.7494781 UTC False
%STDIN: :reload
%NOTIFY: Removed "/home/zachchurchill/meow.hs~" 2018-11-28 21:22:02.751100936 UTC False
%STDIN: INTERNAL_GHCID.putStrLn ['#','~','G','H','C','I','D','-','F','I','N','I','S','H','-','5','~','#']
INTERNAL_GHCID.hPutStrLn INTERNAL_GHCID.stderr ['#','~','G','H','C','I','D','-','F','I','N','I','S','H','-','5','~','#']
%STDERR:
%STDERR: meow.hs:10:0: error:
%STDERR: error: macro names must be identifiers
# zachchurchill @ developer1 in ~/Documents/grove/backend/service on git:master x [10:15:21]
> nix-shell --run 'ghcid -c cabal new-repl'
these derivations will be built:
/nix/store/wl7s679ap53p8nv7fgk3x3dk81zb4mj3-beam-migrate-0.3.2.1.drv
/nix/store/5c2lwzjcqr7cd5kgdb3d5n8i89g763wk-beam-postgres-0.3.2.2.drv
/nix/store/jy3q1q1wqvprq6dv7yf65fqnp2i6kk8l-beam-0.3.2.0.drv
/nix/store/n7f4pxmlilmdylqj00pp2six53rc1zjp-ghc-8.4.4-with-packages.drv
building '/nix/store/jy3q1q1wqvprq6dv7yf65fqnp2i6kk8l-beam-0.3.2.0.drv'...
setupCompilerEnvironmentPhase
Build with /nix/store/s9a8h6qqdmignsqphir5jyllr5ivf0p3-ghc-8.4.4.
This file has been truncated, but you can view the full file.
171.25.193.25
188.92.77.235
60.191.82.92
92.62.139.103
51.159.57.28
185.100.87.41
178.73.215.171
185.220.101.3
121.142.165.111
185.220.101.46
171.25.193.25
188.92.77.235
60.191.82.92
92.62.139.103
51.159.57.28
185.100.87.41
178.73.215.171
185.220.101.3
121.142.165.111
185.220.101.46
app :: Connection -> IO (Event t a)
app conn = do
(event, triggerEvent) <- newTriggerEvent
forever $ do
msg <- receiveData conn
let m = parseSocketData msg
triggerEvent m
pure event
{-# LANGUAGE TemplateHaskell, LambdaCase, FlexibleContexts #-}
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}
module Main where
import Polysemy
import Polysemy.State
import Polysemy.Reader
import Polysemy.Error
import Polysemy.NonDet
@goolord
goolord / index.html
Created August 11, 2020 05:45
zYqxXvg
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="https://unpkg.com/sakura.css/css/sakura.css" type="text/css">
<style>
button {
width:50px;
height:50px;
border-radius: 50%;
}
@goolord
goolord / debug.hs
Created May 13, 2021 15:51
useful debugging stuff
showBits :: FiniteBits a => a -> String
showBits = fmap (bool '0' '1') . bitList
traceWith :: Show b => (a -> b) -> a -> a
traceWith f x = traceShow (f x) x
bitList :: FiniteBits a => a -> [Bool]
bitList x = let size = finiteBitSize x
in [testBit x i | i <- enumFromThenTo size (size - 1) 0]
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{- cabal:
build-depends: