Skip to content

Instantly share code, notes, and snippets.

Avatar

Sandy Maguire isovector

View GitHub Profile
View cofreepress-jonathan.txt
Jonathan:
My thought process was that like, "Everybody's doing the same
thing. Everybody's reading Cracking the Coding Interview.
Everybody's reading books, doing Udemy courses, what is something
different that I can do to accelerate myself?"
Sandy:
Hello and welcome to the very first episode of the Cofree Cast.
I'm your host, Sandy Maguire, and today, I'm joined by Jonathan
Lorimer. Jonathan is a software developer based in Toronto, who's
View wordle.hs
import qualified Data.Set as S
import Data.Set (Set)
import Data.Char (isLower)
import Data.Ord (comparing, Down (Down))
import Data.List (sortBy, subsequences, minimumBy, maximumBy)
import Control.Monad.Trans.Writer.CPS
import Data.Monoid
import Data.Foldable (traverse_)
wordFilter :: String -> Bool
View polysemy-commutative.hs
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
View equiv.hs
prepropEquivInterpreters
:: forall effs x r1 r2
. (Eq x, Show x, Inject effs r1, Inject effs r2, Members effs effs)
=> (forall a. Sem r1 a -> IO a)
-> (forall a. Sem r2 a -> IO a)
-> (forall r. Members effs r => Gen (Sem r x))
-> Property
prepropEquivInterpreters int1 int2 mksem = property $ do
SomeSem sem <- liftGen @effs @x mksem
pure $ ioProperty $ do
View settings.json
{
"haskell.serverExecutablePath": "/home/sandy/prj/hls/.stack-work/install/x86_64-linux-tinfo6/95210f202fcc608b16b9b498dd9af8f1b8d43ff153fe428a250346ccc0cf33e5/8.8.4/bin/haskell-language-server",
"haskell.formatOnImportOn": false,
"haskell.plugin.tactics.config.features": "QrfgehpgNyy/HfrQngnPba/ErsvarUbyr/XabjaZbabvq/RzcglPnfr/QrfgehpgCha/Zrgncebtenz",
"window.zoomLevel": 1,
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
View SlowTypecheck.hs
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
-- typechecking goes really fast if you uncomment this line
-- {-# OPTIONS_GHC -fmax-valid-hole-fits=0 #-}
module SlowTypecheck where
import HsExpr
@isovector
isovector / StateChart.hs
Last active May 9, 2021
statechart2.hs
View StateChart.hs
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeApplications #-}
{-# OPTIONS_GHC -Wno-orphans #-}
View statechart.hs
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE ViewPatterns #-}
module StateChart
( SC(SC)
View wtf.hs
test =
DifferenceR3 0.0
( UnionR3 0.0
[ Translate3 (0.0, 0.0, -6.0) (Translate3 (-7.0, -7.0, -6.0) (CubeR 0.0 (14.0, 14.0, 12.0)))
, UnionR3 0.0
[ UnionR3 0.0
[ Translate3 (0.0, 0.0, -5.0) (Translate3 (-5.0, -5.0, -5.0) (UnionR3 0.0 []))
, UnionR3 0.0 [UnionR3 0.0 [], UnionR3 0.0 []]
]
@isovector
isovector / Main.hs
Last active Jun 24, 2020
eta reduction repro
View Main.hs
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE PatternSynonyms #-}
module Main where
import GHC.Generics
import Data.Void
import Control.Applicative
import Control.Arrow
import Control.Monad.Trans.State