Books I want to purchase hard copies of
If you are starting your Haskell journey I implore you to focus on the type system.
Types are the roots from which your Haskell knowledge grows.
Haskell has algebraic data types. This is a fancy way of saying that we can create types which are composites of other types. Intuitively we can think of types as sets of values.
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
let | |
pkgs = import <nixpkgs> {}; | |
overridez = fetchTarball { | |
patchFlags = [ "--binary" ]; | |
url = "https://github.com/adetokunbo/haskell-overridez/archive/v0.10.3.0.tar.gz"; | |
sha256 = "1mfnjksb0n3jbbsqi7g7jd3qn0c10s5q4dg1lqx3fhqw46yvr7j7"; | |
}; | |
in | |
import overridez { inherit pkgs; } |
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
{ system ? builtins.currentSystem, compiler ? "ghc844" } : | |
let | |
overridez = import ./nix/haskell-overridez.nix; | |
overlays = [ | |
(newPkgs: oldPkgs: { | |
haskellPackages = oldPkgs.haskellPackages.override { | |
overrides = overridez.allIn ./nix; | |
patchFlags = [ "--binary" ]; | |
}; |
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
setting SOURCE_DATE_EPOCH to timestamp 1465036472 of file authenticate-oauth-1.6/Web/Authenticate/OAuth/IO.hs | |
patching sources | |
Replace Cabal file with edited version from http://hackage.haskell.org/package/authenticate-oauth-1.6/revision/1.cabal. | |
compileBuildDriverPhase | |
setupCompileFlags: -package-db=/build/setup-package.conf.d -j4 -threaded | |
[1 of 1] Compiling Main ( Setup.lhs, /build/Main.o ) | |
unpacking sources | |
unpacking source archive /nix/store/vnan6xar42hf2pabl7apwscqnd9w75zr-beam-core-0.7.2.3.tar.gz | |
source root is beam-core-0.7.2.3 | |
setting SOURCE_DATE_EPOCH to timestamp 1549648350 of file beam-core-0.7.2.3/test/Database/Beam/Test/Schema.hs |
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 DataKinds #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeInType #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE StandaloneDeriving #-} | |
{-# LANGUAGE KindSignatures #-} |
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 DataKinds #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE StandaloneDeriving #-} | |
{-# LANGUAGE KindSignatures #-} | |
import GHC.TypeLits (Symbol) |
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 LambdaCase #-} | |
{-# LANGUAGE DeriveAnyClass #-} | |
{-# LANGUAGE DeriveFunctor #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE StandaloneDeriving #-} | |
module Interpreter where | |
import Control.Monad |
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
(module | |
;; Requires that we have at least 1 page of memory available (64kb) | |
(import "env" "memory" (memory $mem 1)) | |
;; Declare a global variable representing a pointer initalised to index 0 - | |
;; each element is a 32bit integer and thus 4 bytes wide | |
(global $ptr (mut i32) (i32.const 0)) | |
(func $get_ptr (result i32) | |
get_global $ptr |