Skip to content

Commit

Permalink
core: reading memory footprints
Browse files Browse the repository at this point in the history
- and add wrapped sphinx script
  • Loading branch information
doyougnu committed Sep 26, 2024
1 parent bede317 commit 9c2cdf5
Show file tree
Hide file tree
Showing 21 changed files with 2,289 additions and 62 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ _build
# nix stuff
.direnv/
result
_result
4 changes: 3 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,11 @@ To rebuild the book everytime any ``*.rst*`` file changes do:
or use the ``autobuild.sh`` script in the scripts directory:

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

.. code-block:: bash
firefox result/html/index.html
or use the ``sphinx-autobuild-wrapped.sh`` script in the scripts directory.
10 changes: 10 additions & 0 deletions bib/book.bib
Original file line number Diff line number Diff line change
Expand Up @@ -338,3 +338,13 @@ @inproceedings{historyOfHaskell
location = {San Diego, California},
series = {HOPL III}
}

@book{TAPL,
author = {Pierce, Benjamin C.},
title = {Types and Programming Languages},
year = {2002},
isbn = {0262162091},
publisher = {The MIT Press},
edition = {1st},
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.}
}
13 changes: 11 additions & 2 deletions code/lethargy/app/Main.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{-# OPTIONS_GHC -ddump-asm #-}
{-# OPTIONS_GHC -O2 -ddump-asm -ddump-cmm -ddump-to-file #-}

module Main where

import Data.Int

data Foo = Foo !Int16 !Int16

{-# NOINLINE my_foo #-}
my_foo :: Foo
my_foo = Foo 123 321

main :: IO ()
main = putStrLn "Hello, Haskell!"
main = return ()
Loading

0 comments on commit 9c2cdf5

Please sign in to comment.