Skip to content

Instantly share code, notes, and snippets.

Tony Morris tonymorris

Block or report user

Report or block tonymorris

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
View html.hs
{-
<p>
<span>
abc
</span>
<a href="http://thelink">
<span>
def
View x.hs
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE RankNTypes #-}
module PrettyPrint {- (
PrettyPrint(..)
View ?.hs
newtype ReaderT r f a = ReaderT { runReaderT :: r -> f a }
(?) :: (x -> ReaderT r f a) -> r -> ReaderT x f a
(?) k r = ReaderT (\x -> runReaderT (k x) r)
View waargo.hs
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
module Wargo where
import Prelude
import Data.Functor.Identity
import qualified Data.Text.Lazy.IO as TI(writeFile)
View script.hs
#!/usr/bin/env runhaskell
-- chmod +x script.hs
module Main where
import System.Environment
main :: IO ()
main =
do p <- getProgName
View th-lens.hs
occName ::
HasName a =>
Lens' a OccName
occName =
name . (\k (Name o x) -> fmap (\o' -> Name o' x) (k o))
occNameWrapped ::
Iso'
OccName
String
View Bye.hs
{-# LANGUAGE TemplateHaskell #-}
module Bye where
import Hi
data Hi =
Hi1 Int
| Hi2 String
| Hi3 [Int] Int
View th-example.hs
data Hi =
Hi1 Int
| Hi2 String
| Hi3 [Int]
deriving (Eq, Show)
-- generate this:
class AsHi a where
_Hi ::
a
View 20190204-facebook-survey-thingo.md
  1. As a pilot have you ever faced any hazards with glare:
  • On a take off? If yes, please elaborate

    Yes. In a high-traffic class D airport with east/west runway orientation in the afternoon. I was mostly concerned with other traffic in the area.

    This has occurred on numerous occasions, but most hazardous during the airport's CTAF hours.

  • On landing? If yes, please elaborate

    Yes. On arriving to the same airport from the east during late afternoon, sun glare caused me to have no visibility of the field at all, though I knew I was quite close. It was towered at the time. I chose to make a turn orthogonal to the sun so that I could sight the field and regain better situational awareness, then subsequently regain normal positioning.

View catalans.hs
{-# OPTIONS_GHC -Wall #-}
import Control.Monad(join)
import Data.List(foldl', permutations, sort)
import System.Environment(getArgs)
factorial ::
Integer
-> Integer
factorial n =
You can’t perform that action at this time.