Skip to content

Instantly share code, notes, and snippets.

Jonathan Daugherty jtdaugherty

Block or report user

Report or block jtdaugherty

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jtdaugherty
jtdaugherty / ListDemo.hs
Created Dec 25, 2017
Multi-selection list demo
View ListDemo.hs
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Lens.Micro.Platform ((^.), _1, (%~), (&), ix)
import Control.Monad (void)
import Data.Monoid
import Data.Maybe (fromMaybe)
import qualified Graphics.Vty as V
@jtdaugherty
jtdaugherty / RLE.hs
Created Oct 5, 2012
Text editor zipper
View RLE.hs
module RLE where
import Control.Applicative
import Data.Monoid
newtype RLE a = RLE [(Int, a)]
instance Monoid (RLE a) where
mempty = RLE []
mappend (RLE as) (RLE bs) = RLE (as `mappend` bs)
@jtdaugherty
jtdaugherty / test.hs
Created Mar 27, 2012
Parsec + Haskell stuff
View test.hs
module Main where
import Text.ParserCombinators.Parsec
( Parser
, parse
, string
@jtdaugherty
jtdaugherty / Rules.hs
Created Jan 8, 2012
Experimenting with structured data validation with validated "residues"
View Rules.hs
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE GADTs #-}
module Rules
( Rule(Rule)
, foreach
, failRule
, apply
, ruleDoc
)
where
You can’t perform that action at this time.