I hereby claim:
- I am jtobin on github.
- I am jtobin (https://keybase.io/jtobin) on keybase.
- I have a public key whose fingerprint is 3422 6DCF 974D 5AF1 2114 488A 710A 5FDA E32D 77E7
To claim this, I am signing this object:
module Ordered where | |
import Data.Function (on) | |
import Data.List (sort, maximumBy) | |
longestOrdered :: Ord a => [[a]] -> Maybe [a] | |
longestOrdered dict = safeMaximumBy (compare `on` length) | |
[word | word <- dict, sort word == word] | |
safeMaximumBy :: (a -> a -> Ordering) -> [a] -> Maybe a |
I hereby claim:
To claim this, I am signing this object:
{-# OPTIONS_GHC -Wall #-} | |
{-# OPTIONS_GHC -fno-warn-missing-methods #-} | |
{-# LANGUAGE PatternGuards #-} | |
import Control.Applicative | |
import Data.HashMap.Strict (HashMap) | |
import qualified Data.HashMap.Strict as HashMap | |
import Data.Monoid | |
import Data.Traversable | |
import System.Exit |
{-# OPTIONS_GHC -fno-warn-missing-methods #-} | |
{-# OPTIONS_GHC -fno-warn-missing-signatures #-} | |
{-# OPTIONS_GHC -fno-warn-type-defaults #-} | |
{-# LANGUAGE RankNTypes #-} | |
module PHOAS where | |
data Expr a = | |
Lit Int | |
| Var a |
{-# OPTIONS_GHC -fno-warn-missing-methods #-} | |
module HOAS where | |
data Expr = | |
Lit Int | |
| Add Expr Expr | |
| Let Expr (Expr -> Expr) | |
instance Num Expr where |
{-# OPTIONS_GHC -fno-warn-missing-methods #-} | |
{-# OPTIONS_GHC -fno-warn-missing-signatures #-} | |
{-# OPTIONS_GHC -fno-warn-type-defaults #-} | |
{-# LANGUAGE DeriveFunctor #-} | |
{-# LANGUAGE TypeFamilies #-} | |
module Minimal where | |
import Control.Applicative | |
import Data.Graph |
module Main where | |
import Control.Monad | |
import Control.Monad.Primitive | |
import System.Environment | |
import System.Random.MWC | |
data Child = Boy | Girl deriving (Eq, Show) | |
instance Variate Child where |
{-# LANGUAGE BangPatterns #-} | |
import Control.DeepSeq | |
import qualified Data.Vector.Unboxed as U | |
import System.Random.MWC | |
import Control.Monad | |
import Criterion.Main | |
import Criterion.Config | |
newtype AffineTransform = AffineTransform { |
{-# OPTIONS_GHC -Wall #-} | |
import Data.Function | |
import Data.List | |
main :: IO () | |
main = print $ minimumBy (compare `on` sumDiffs) portfolios | |
-- Data ------------------------------------------------------------------------ |
=== prop_i0ResultElementsAreInBoth from ui.hs:64 === | |
+++ OK, passed 1000 tests. | |
=== prop_i1ResultElementsAreInBoth from ui.hs:68 === | |
+++ OK, passed 1000 tests. | |
=== prop_i2ResultElementsAreInBoth from ui.hs:72 === | |
+++ OK, passed 1000 tests. | |
=== prop_u0ResultElementsInAtLeastOne from ui.hs:77 === |