Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

{-# OPTIONS_GHC -ddump-simpl -ddump-asm -ddump-to-file -ddump-hi #-}
{-# LANGUAGE BangPatterns, CPP, MagicHash, Rank2Types, UnboxedTuples, ScopedTypeVariables #-}
module Main (main, firstFuuzetsu, firstTreeOwl) where
import GHC.Exts (SmallArray#, newSmallArray#, readSmallArray#, writeSmallArray#,
indexSmallArray#, unsafeFreezeSmallArray#, unsafeThawSmallArray#,
SmallMutableArray#, sizeofSmallArray#, copySmallArray#, thawSmallArray#,
sizeofSmallMutableArray#, copySmallMutableArray#, cloneSmallMutableArray#)
import GHC.Exts(Int(..), Int#, reallyUnsafePtrEquality#, tagToEnum#, unsafeCoerce#, State#)
import Gauge.Main
This file has been truncated, but you can view the full file.
Thu Sep 4 23:29 2014 Time and Allocation Profiling Report (Final)
yi +RTS -p -RTS --as=emacs -y /tmp -fpango src/library/Yi/Keymap/Vim/NormalMap.hs
total time = 5.76 secs (5761 ticks @ 1000 us, 1 processor)
total alloc = 1,477,624,720 bytes (excludes profiling overheads)
COST CENTRE MODULE %time %alloc
render.\ Yi.UI.Pango 74.7 2.1
This file has been truncated, but you can view the full file.
Thu Sep 4 23:27 2014 Time and Allocation Profiling Report (Final)
yi +RTS -p -RTS --as=emacs -y /tmp -fvty src/library/Yi/Keymap/Vim/NormalMap.hs
total time = 8.19 secs (8191 ticks @ 1000 us, 1 processor)
total alloc = 12,915,401,768 bytes (excludes profiling overheads)
COST CENTRE MODULE %time %alloc
refresh Yi.UI.Vty 34.6 38.6
@Fuuzetsu
Fuuzetsu / default.nix
Created May 11, 2014 07:51
GHC default
let
pkgs = import <nixpkgs> {};
inherit (pkgs) stdenv fetchurl ghc perl gmp ncurses haskellPackages
automake autoconf git dblatex docbook2x
docbook_xml_xslt docbook_xml_dtd_45;
in
stdenv.mkDerivation rec {
name = "ghcDev-${version}";
version = "7.9.20140511";
@Fuuzetsu
Fuuzetsu / yi-proposal
Last active August 29, 2015 13:57
Yi GSOC proposal
Yi concurrency, usability and hackability
------------------------------------------
* What is the goal of the project you propose to do?
There are two main goals of the project: the first is to implement
concurrency in the Yi text editor. The second aim is to start
bringing Yi into the territory of usable and hackable editors.
* In what ways will this project benefit the wider Haskell community?
@Fuuzetsu
Fuuzetsu / H.hs
Created January 6, 2014 01:05
Scrapes most-recent versions of all Hackage packages for the status of their documentation. Note that if you want to use this, you'll have to change the file path to save to at the top of the program.
{-# LANGUAGE LambdaCase #-}
module Main where
import Control.Monad ((>=>))
import Data.Either (rights, lefts)
import Data.Tree.NTree.TypeDefs (NTree)
import Data.List (isPrefixOf, isInfixOf)
import Network.HTTP (simpleHTTP, getRequest, rspBody)
import Network.Stream (ConnError)
import Text.XML.HXT.Core hiding (mkName)
@Fuuzetsu
Fuuzetsu / hackagedocs
Last active December 13, 2022 22:40
Script for generating and uploading missing documentation for your Hackage packages. Now with fixed package links and contents page.
#!/usr/bin/env bash
cabal configure && cabal build && cabal haddock --hyperlink-source \
--html-location='/package/$pkg-$version/docs' \
--contents-location='/package/$pkg'
S=$?
if [ "${S}" -eq "0" ]; then
cd "dist/doc/html"
DDIR="${1}-${2}-docs"
cp -r "${1}" "${DDIR}" && tar -c -v -z --format=ustar -f "${DDIR}.tar.gz" "${DDIR}"
CS=$?
# -*- mode: snippet -*-
# name: plant
# key: pfile
# --
@startuml
$0
@enduml
@Fuuzetsu
Fuuzetsu / haskell-types.el
Created November 29, 2013 01:08
insert type of Haskell functions
(defun haskell-insert-type ()
"Insert the type of the function on the previous line.
You have to be be on the first line of the function.
Use `haskell-insert-type-infix' for infix functions.
It uses the Haskell inferior process in order to get the class constraints
as well"
(interactive)
(save-excursion
(beginning-of-line)
(zap-up-to-char 1 ?\s)
@Fuuzetsu
Fuuzetsu / extractLeadingSpaces
Created July 12, 2013 17:06
equivalence proofs for header parser
module break2 where
open import Function using (id)
open import Data.Bool using (Bool; true; false)
open import Data.Char using (Char)
open import Data.List using (List; []; _∷_; span)
open import Data.Product as P using (_×_; _,_; map)
open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong)
open import Data.Char.Classifier