This file contains 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 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 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 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 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 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 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 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 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 -> |
This file contains 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
$ for x in ghc-7.10-no-call-arity-no-oneshot-plain-foldl ghc-7.10-plain-foldl; do perf stat -r 5 -e cache-references,cache-misses,cycles,instructions,branches,faults,migrations ./$x/nofib/spectral/knights/knights 32 6 +RTS -I0 -V0 -t >/dev/null; done | |
<<ghc: 330477432 bytes, 632 GCs, 370333/982272 avg/max bytes residency (3 samples), 3M in use, 0.000 INIT (0.000 elapsed), 0.934 MUT (0.934 elapsed), 0.024 GC (0.024 elapsed) :ghc>> | |
<<ghc: 330477432 bytes, 632 GCs, 370333/982272 avg/max bytes residency (3 samples), 3M in use, 0.000 INIT (0.000 elapsed), 0.933 MUT (0.933 elapsed), 0.024 GC (0.024 elapsed) :ghc>> | |
<<ghc: 330477432 bytes, 632 GCs, 370333/982272 avg/max bytes residency (3 samples), 3M in use, 0.000 INIT (0.000 elapsed), 0.933 MUT (0.933 elapsed), 0.024 GC (0.024 elapsed) :ghc>> | |
<<ghc: 330477432 bytes, 632 GCs, 370333/982272 avg/max bytes residency (3 samples), 3M in use, 0.000 INIT (0.000 elapsed), 0.933 MUT (0.934 elapsed), 0.024 GC (0.024 elapsed) :ghc>> | |
<<ghc: 330477432 bytes, 632 GCs, 370333/98227 |
OlderNewer