My response to https://docs.google.com/forms/d/1Rffj60hZXcg6zfu1dSGttHLTTsEcqXj8D66qIn9Grno/viewform?c=0&w=1
Mark Hibberd, Ambiata
trait λ { | |
type α | |
} | |
trait Functor extends λ { | |
type α <: λ | |
def map[A,B](x: α { type α = A })(f: A => B): α { type α = B } | |
} |
-- Matthew Brecknell @mbrcknl | |
-- BFPG.org, March 2015 | |
open import Agda.Primitive using (_⊔_) | |
postulate | |
String : Set | |
{-# BUILTIN STRING String #-} |
if ENV['COVERAGE'] | |
require 'simplecov' | |
require 'simplecov-rcov' | |
SimpleCov.merge_timeout 3600 | |
SimpleCov.formatters = [ | |
SimpleCov::Formatter::HTMLFormatter, | |
SimpleCov::Formatter::RcovFormatter | |
] | |
SimpleCov.start 'rails' | |
end |
(* -*- mode: ocaml; -*- *) | |
module type FUNCTOR = sig | |
type 'a t | |
val map : ('a -> 'b) -> 'a t -> 'b t | |
end | |
type 'a monoid = {unit : 'a ; join : 'a -> 'a -> 'a} | |
type var = string |
My response to https://docs.google.com/forms/d/1Rffj60hZXcg6zfu1dSGttHLTTsEcqXj8D66qIn9Grno/viewform?c=0&w=1
Mark Hibberd, Ambiata
-- Consider the function type constructor "->" in infix form: | |
-- e.g. "a -> b" is the same as "(->) a b" | |
-- Partially applied, "(->) a" is the "reader" type, | |
-- i.e. functions that "read" an 'a'. "(->) a" is a Monad - the Reader Monad. | |
-- Consider the join function: | |
join :: Monad m => m (m a) -> m a |
# This template will give you a prompt with: | |
# - ghc | |
# - cabal | |
# - ghc-mod | |
# - the libraries: free, mtl, transformers | |
# | |
# to run: nix-shell haskell-project.nix | |
# | |
# to specify specific version of haskell, you can: | |
# nix-shell --arg haskellPackages 'with import <nixpkgs> {}; haskellPackages_ghc783_profiling' |
This blog post series has moved here.
You might also be interested in the 2016 version.
Authors: | Merijn Verstraaten |
---|---|
Date: | 2014/11/22 |
So you have a pet peeve/bug/feature request that you'd like to see added to GHC. You made sure there was a Trac_ ticket for it, but despite your patient waiting no one is solving your problem. Those selfish GHC hackers!
At DICOM Grid, we recently made the decision to use Haskell for some of our newer projects, mostly small, independent web services. This isn't the first time I've had the opportunity to use Haskell at work - I had previously used Haskell to write tools to automate some processes like generation of documentation for TypeScript code - but this is the first time we will be deploying Haskell code into production.
Over the past few months, I have been working on two Haskell services:
I will write here mostly about the first project, since it is a self-contained project which provides a good example of the power of Haskell. Moreover, the proces