Skip to content

Commit 9c2cdf5

Browse files
committed
core: reading memory footprints
- and add wrapped sphinx script
1 parent bede317 commit 9c2cdf5

File tree

21 files changed

+2289
-62
lines changed

21 files changed

+2289
-62
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ _build
1313
# nix stuff
1414
.direnv/
1515
result
16+
_result

README.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,11 @@ To rebuild the book everytime any ``*.rst*`` file changes do:
101101
102102
or use the ``autobuild.sh`` script in the scripts directory:
103103

104-
You can then check the output in ``result/indexhtml`` or load that directory into whatever
104+
You can then check the output in ``result/index.html`` or load that directory into whatever
105105
browser you'd like:
106106

107107
.. code-block:: bash
108108
109109
firefox result/html/index.html
110+
111+
or use the ``sphinx-autobuild-wrapped.sh`` script in the scripts directory.

bib/book.bib

+10
Original file line numberDiff line numberDiff line change
@@ -338,3 +338,13 @@ @inproceedings{historyOfHaskell
338338
location = {San Diego, California},
339339
series = {HOPL III}
340340
}
341+
342+
@book{TAPL,
343+
author = {Pierce, Benjamin C.},
344+
title = {Types and Programming Languages},
345+
year = {2002},
346+
isbn = {0262162091},
347+
publisher = {The MIT Press},
348+
edition = {1st},
349+
abstract = {A type system is a syntactic method for automatically checking the absence of certain erroneous behaviors by classifying program phrases according to the kinds of values they compute. The study of type systems -- and of programming languages from a type-theoretic perspective -- has important applications in software engineering, language design, high-performance compilers, and security.This text provides a comprehensive introduction both to type systems in computer science and to the basic theory of programming languages. The approach is pragmatic and operational; each new concept is motivated by programming examples and the more theoretical sections are driven by the needs of implementations. Each chapter is accompanied by numerous exercises and solutions, as well as a running implementation, available via the Web. Dependencies between chapters are explicitly identified, allowing readers to choose a variety of paths through the material.The core topics include the untyped lambda-calculus, simple type systems, type reconstruction, universal and existential polymorphism, subtyping, bounded quantification, recursive types, kinds, and type operators. Extended case studies develop a variety of approaches to modeling the features of object-oriented languages.}
350+
}

code/lethargy/app/Main.hs

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1-
{-# OPTIONS_GHC -ddump-asm #-}
1+
{-# OPTIONS_GHC -O2 -ddump-asm -ddump-cmm -ddump-to-file #-}
2+
23
module Main where
34

5+
import Data.Int
6+
7+
data Foo = Foo !Int16 !Int16
8+
9+
{-# NOINLINE my_foo #-}
10+
my_foo :: Foo
11+
my_foo = Foo 123 321
12+
413
main :: IO ()
5-
main = putStrLn "Hello, Haskell!"
14+
main = return ()

0 commit comments

Comments
 (0)