Skip to content

Instantly share code, notes, and snippets.

View hvr's full-sized avatar
🕶️
functional lazy

Herbert Valerio Riedel hvr

🕶️
functional lazy
  • Vienna, Austria, Europe, Earth, Solar System, Milky Way, ...
  • X @hvrgnu
View GitHub Profile

Cabal 3.2 Release & Recent Hackage/Cabal3 Server Update

Cabal 3.2 has finally been released, including new bug fixes, features, and a Hackage Server update. You can find the project Changelog on github if you want the rest of the changeset between this version and Cabal 3.0.

In this post, we'll go over some of the highlights in this release, as well as detail some upcomings line items and milestones for future planned work on the library.

Highlights & Bugfixes

The 3.2 changeset features the following:

@hvr
hvr / Setup.hs
Created October 31, 2010 15:44
Example CABAL Setup.hs file for automatic package versioning via `git describe`
import Control.Exception
import Control.Monad
import Data.Maybe
import Data.Version
import Distribution.PackageDescription (PackageDescription(..), HookedBuildInfo, GenericPackageDescription(..))
import Distribution.Package (PackageIdentifier(..))
import Distribution.Simple (defaultMainWithHooks, simpleUserHooks, UserHooks(..))
import Distribution.Simple.LocalBuildInfo (LocalBuildInfo(..))
import Distribution.Simple.Setup (BuildFlags(..), ConfigFlags(..))
import Distribution.Simple.Utils (die)
@hvr
hvr / gist:662196
Created November 4, 2010 07:02
Show key fingerprints of public keys in .ssh/authorized_keys file
#!/bin/bash
( while read L
do echo $L > /tmp/pubkey
printf "%-16s => " $(cut -f 3 -d ' ' /tmp/pubkey)
ssh-keygen -l -f /tmp/pubkey
done
rm /tmp/pubkey
) < .ssh/authorized_keys
@hvr
hvr / link_cabal_exe.py
Last active February 27, 2017 07:59
Quick'n'dirty cabal new-build exe-symlink script
#!/usr/bin/env runghc
import Data.Char
import Data.List
import Control.Monad
import Control.Applicative
import Data.Monoid
import Data.Version
import Text.ParserCombinators.ReadP (readP_to_S)
module Main where
import Foreign.C
import Foreign.Marshal.Alloc
import Foreign.Ptr
import Foreign.Storable
import System.Posix.Internals
-- import System.Environment (getExecutablePath)
@hvr
hvr / -
Created June 21, 2016 12:40
mentions of `String` in haskell2010
Control.Monad: fail :: String -> m a
Data.Char:type String = [Char]
Data.Char:lexLitChar :: ReadS String
Data.List:lines :: String -> [String]
Data.List:unlines :: [String] -> String
Data.List:unwords :: [String] -> String
Data.List:words :: String -> [String]
Foreign:throwIf :: (a -> Bool) -> (a -> String) -> IO a -> IO a
Foreign:throwIfNeg :: (Ord a, Num a) => (a -> String) -> IO a -> IO a
Foreign:throwIfNeg_ :: (Ord a, Num a) => (a -> String) -> IO a -> IO ()
@hvr
hvr / ManDev.hs
Last active February 27, 2016 21:20
module GenDev where
data Foo = Foo
{ foo :: String
, bar :: Maybe [Int]
, baz :: [Int]
} -- deriving Generic
instance Monoid Foo where
mempty = Foo mempty mempty mempty
@hvr
hvr / report.html
Last active December 27, 2015 11:59
tests & benchmarks for new integer-gmp import/export primitives
{-# LANGUAGE CPP, BangPatterns, MagicHash, UnliftedFFITypes, UnboxedTuples, ScopedTypeVariables #-}
-- | Tests/Benchmarks for new GHC.Integer.GMP.Internals.{import,export}Integer primitives
import Control.Monad
import Criterion.Main
import Data.Bits
import Data.ByteString.Short.Internal (ShortByteString(SBS))
import qualified Data.ByteString.Short.Internal as SBS
import Data.List
@hvr
hvr / base-4.6.0.1-vs-4.7.0.0.md
Created September 21, 2013 08:29
API deltas for `base`

API Delta Report for version 4.7.0.0

Modules removed from API version 4.7.0.0:

- Control.Concurrent.SampleVar
- Data.HashTable

Modules added in API version 4.7.0.0: