Skip to content

Instantly share code, notes, and snippets.

View facundominguez's full-sized avatar

Facundo Domínguez facundominguez

  • Tweag
  • Montevideo, Uruguay
View GitHub Profile
@facundominguez
facundominguez / AbstractVariadic.hs
Created November 25, 2019 16:19
Variadic operations over an abstract monad
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE IncoherentInstances #-}
import Control.Monad.IO.Class
import GHC.TypeLits
@facundominguez
facundominguez / nofib-comparison.txt
Last active November 11, 2019 16:00
Linear-types enabled GHC 184e5e6 -- without vs with af6a16be
nofib-analyse/nofib-analyse ../nofib-log-opt-enabled.log ../nofib-log-opt-disabled.log
NoFib Results
--------------------------------------------------------------------------------
Program Size Allocs Runtime Elapsed TotalMem
--------------------------------------------------------------------------------
CS 0.0% 0.0% 0.085 0.085 0.0%
CSD 0.0% 0.0% 0.0% -0.0% 0.0%
FS 0.0% 0.0% -0.2% -0.3% 0.0%
S 0.0% 0.0% -0.1% -0.2% 0.0%
@facundominguez
facundominguez / after_splices.hs
Last active August 19, 2017 02:13
Make available at runtime the result of computing in all splices of a module.
-- This example shows how to make available at runtime the result of
-- processing all the splices in a module. Needs ghc-8.2.1.
--
-- Related to https://ghc.haskell.org/trac/ghc/ticket/14090#comment:13
{-# LANGUAGE TemplateHaskell #-}
import Language.Haskell.TH
import Language.Haskell.TH.Syntax
f :: IO ()
@facundominguez
facundominguez / sort.patch
Last active August 17, 2017 14:29
Bounded memory sorting of events in an eventlog file
diff --git a/ghc-events.cabal b/ghc-events.cabal
index 7fc2c1c..ece7861 100644
--- a/ghc-events.cabal
+++ b/ghc-events.cabal
@@ -63,6 +63,8 @@ library
binary >= 0.7 && < 0.10,
bytestring >= 0.10.4,
array >= 0.2 && < 0.6,
+ filepath >= 1.4.1.1,
+ temporary >= 1.2.0.4,
### Keybase proof
I hereby claim:
* I am facundominguez on github.
* I am facundo (https://keybase.io/facundo) on keybase.
* I have a public key whose fingerprint is 7EBF 3A6C E561 B3C0 2E9C BB0C 39CC 45B2 E39E D2F0
To claim this, I am signing this object: