Skip to content

Instantly share code, notes, and snippets.

View emilypi's full-sized avatar
🥝
hot girl summer

Emily Pillmore emilypi

🥝
hot girl summer
View GitHub Profile
{-# language ConstraintKinds #-}
{-# language GADTs #-}
{-# language KindSignatures #-}
{-# language MultiParamTypeClasses #-}
{-# language PatternSynonyms #-}
{-# language PolyKinds #-}
{-# language RankNTypes #-}
{-# language RoleAnnotations #-}
{-# language StandaloneKindSignatures #-}
{-# language TypeFamilies #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RankNTypes #-}
module Main where
main :: IO ()
main = return ()
-- -------------------------------------------------------------------- --
-- An initial encoding of an untyped LC

On PVP + Restrictive Bounds

The prompt came from a tweet (later found out to be ranting into the void and not to be considered real advice) by a Stackage trustee:

Hey Haskell developers! STOP 👏 USING 👏 RESTRICTIVE 👏 UPPER 👏 BOUNDS! 👏 At least stop using them by default!

Part I

C: What do people consider the best practices on upper bounds in packages?

L: No build failures / No restrictive upper bounds. Pick one. (And stackage only works as a third alternative as long as you can afford to stay within it.)

Yaml (Tweag Fellowship Proposal Annex)


This proposal represents the current understanding of the intent and implementation schedule for a new YAML library called Yaml that is YAML 1.2 spec-compliant, purely Haskell, and released under the BSD-3 clause license. In addition to the core library, we will implement a range of dependent libraries that will implement streaming, optic, and stream-transducer support in a modular way, with a minimal dependency footprint.

Introduction

YAML (YAML Ain't Markup Language) Haskell has two existing YAML 1.2 implementations publicly available through the Hackage ecosystem: yaml, and HsYaml. Both of these packages represents years of work and value for Haskell developers and businesses alike, and have developed into small ecosystems unto themselves in terms of downstream dependencies. Both libraries, unfortunately, also have irreconciliable flaws that w

Rule 110 problem Post-Mortem + Tuning

Here's a small, unordered bullet list of things I'd immediately change:

In Main.hs:

  • Unused MultiWayIf pragma
  • I forgot to enable -Wall, which would have shown spurious and unused imports. My bad.
  • Probably could have done better error handling for the parser
@emilypi
emilypi / ghci.conf
Last active July 9, 2021 16:49
My modest ghci.conf
-- -------------------------------------------------------------------- --
-- Default Extensions
:set -XRankNTypes
:set -XGADTs
:set -XTypeFamilies
:set -XTypeApplications
:set -XBangPatterns
:set -XMagicHash
:set -XMultiParamTypeClasses
@emilypi
emilypi / optics.hs
Last active February 26, 2021 13:39
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeInType #-}
{-# LANGUAGE GADTs #-}
module Data.Optics where
class Profunctor p where
{-# language RankNTypes #-}
{-# language GADTs #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeInType #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
module Data.Optics where
@emilypi
emilypi / lazy.hs
Created January 9, 2019 21:21
Tony's problem
reverse'' :: Int -> [a] -> [a] -> [a]
reverse'' n [] rs = drop n rs
reverse'' n as rs = h : t
where
h = case as of (a : as) -> head $ reverse'' n as (a : rs)
t = case as of (a : as) -> reverse'' (n + 1) as (a : rs)
reverse' :: [a] -> [a]
reverse' x = reverse'' 0 x []
@emilypi
emilypi / haskell.el
Created November 29, 2018 18:36
haskell.el
(use-package haskell-process
:config
(custom-set-variables
'(haskell-process-suggest-remove-import-lines t)
'(haskell-process-auto-import-loaded-modules t)
'(haskell-process-log t)
'(haskell-process-type 'stack-ghci)))
(use-package haskell-interactive-mode
:hook haskell