This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE RankNTypes, ScopedTypeVariables #-} | |
import Control.Monad.ST | |
import Data.Foldable as F | |
import Data.Array.ST | |
import Data.Sequence (Seq) | |
import qualified Data.Sequence as Seq | |
import Criterion.Main | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE ViewPatterns, GeneralizedNewtypeDeriving, DeriveDataTypeable#-} | |
import Diagrams.Prelude | |
import Diagrams.Backend.Cairo.CmdLine | |
import Diagrams.TwoD.Vector | |
import Diagrams.Core.Types | |
import qualified Data.Monoid.MList | |
import Data.Monoid.Coproduct | |
import Data.Typeable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Theorem insert_perm: forall k l, Permutation (k :: l) (insert k l). | |
Proof. | |
intros. induction l. | |
- reflexivity. | |
- simpl. destruct (ble_nat k a). | |
+ reflexivity. | |
+ transitivity (a :: k :: l). | |
* apply perm_swap. | |
* constructor; assumption. | |
Qed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TupleSections #-} | |
module SeqCP where | |
import Data.Sequence | |
import Prelude hiding (drop, take, length, splitAt) | |
import Test.QuickCheck ((===), (==>), Property, Positive(..)) | |
data CPs x y = | |
Empty | | |
SingleCP x (Seq y) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.IO | |
import Control.Monad | |
import qualified Data.Map.Strict as M | |
import qualified Data.Set as S | |
import Text.Printf | |
import Data.List | |
type Node = (Int,Int) | |
type Link = (Node, Node) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
291212 Rule fired: unpack | |
290940 Rule fired: unpack-list | |
180247 Rule fired: tagToEnum# | |
147567 Rule fired: Class op return | |
128770 Rule fired: ++ | |
125196 Rule fired: Class op >>= | |
108321 Rule fired: foldr/app | |
86067 Rule fired: Class op >> | |
62107 Rule fired: Class op == | |
61679 Rule fired: Class op showsPrec |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while read -u 3 line | |
do | |
if [ "$line" == "====" ] | |
then | |
read -n 0 | |
clear | |
else | |
echo $line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE RecursiveDo #-} | |
import Reflex.Dom | |
import qualified Data.Map as M | |
import Data.Monoid | |
import Control.Applicative | |
main = mainWidget $ el "div" $ do | |
(svg, ()) <- buildElementNS mns "svg" ("width" =: "300" <> "height" =: "300") $ mdo | |
circle <- wrapElement =<< buildEmptyElementNS mns "circle" | |
("cx" =: "100" <> "cy" =: "100" <> "r" =: "100" <> "fill" =: "red") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-> case (compare a1_acXB b1_acXJ) of { | |
LT -> LT | |
EQ | |
-> case (compare a2_acXC b2_acXK) of { | |
LT -> LT | |
EQ | |
-> case (compare a3_acXD b3_acXL) of { | |
LT -> LT | |
EQ | |
-> case (compare a4_acXE b4_acXM) of { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- go [Occ=LoopBreaker] :: Integer -> Int -> [Integer] | |
- [LclId, Arity=1, Str=DmdType <L,U>] | |
- go = | |
- \ (x :: Integer) -> | |
- let { | |
- xs [Dmd=<L,C(U)>] :: Int -> [Integer] | |
- [LclId, Str=DmdType] | |
- xs = | |
- go | |
- (case eqInteger# w2 lvl3 of wild4 { __DEFAULT -> |
OlderNewer