Skip to content

Instantly share code, notes, and snippets.

View jeffreyrosenbluth's full-sized avatar

Jeffrey Rosenbluth jeffreyrosenbluth

View GitHub Profile
{-# Language InstanceSigs #-}
{-# Language MultiWayIf #-}
{-# Language RankNTypes #-}
import Control.Applicative
import Data.Char
import Data.Bifunctor (first)
type Parser' a = String -> a
{-# LANGUAGE TypeApplications #-}
module Main where
import Codec.Picture (PixelRGBA8( .. ), writePng, Image)
import Control.Arrow
import Control.Monad.Random
import Control.Monad.Reader
import Data.Colour.RGBSpace
import Data.Colour.RGBSpace.HSV
@jeffreyrosenbluth
jeffreyrosenbluth / typing.md
Created November 20, 2016 13:46 — forked from chrisdone/typing.md
Typing Haskell in Haskell

Typing Haskell in Haskell

MARK P. JONES

Pacific Software Research Center

Department of Computer Science and Engineering

Oregon Graduate Institute of Science and Technology

{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
import Control.Monad (replicateM)
import Control.Monad.Random
import Data.Colour.Palette.ColorSet
import Data.List (zipWith, zipWith3)
import Diagrams.Prelude
import Diagrams.Backend.SVG.CmdLine
@jeffreyrosenbluth
jeffreyrosenbluth / global-local
Created July 3, 2015 02:54
A Reflex app with both global and local state
{-# LANGUAGE RecursiveDo #-}
-- | A simple example of a Reflex application that uses both elm style "global"
-- state and component level "local" state. The global state is a counter that
-- can be incremented and decremented by buttons that remember how many times
-- they have been clicked.
module Main where
import Control.Applicative