1
1
mirror of https://github.com/sdiehl/wiwinwlh.git synced 2024-10-05 16:08:22 +03:00

Write more

This commit is contained in:
sdiehl 2020-02-05 09:20:41 +00:00
parent d4cefde9c7
commit f1f9731daf
4 changed files with 30 additions and 26 deletions

View File

@ -1,5 +1,5 @@
PANDOC = pandoc
IFORMAT = markdown+raw_tex+raw_attribute
IFORMAT = markdown+raw_tex+raw_attribute+auto_identifiers+implicit_header_references
GHC = ghc
HTEMPLATE = resources/template.html

View File

@ -1,3 +1,6 @@
% What I Wish I Knew When Learning Haskell
% Syntax Highliting using Solarized Light
\usepackage{xcolor}
\usepackage{xcolor-solarized}
\usepackage{textcomp}

View File

@ -22,10 +22,9 @@
\usepackage{tikz}
\usepackage{hyperref}
\hypersetup{%
colorlinks=true, % hyperlinks will be black
colorlinks=false, % hyperlinks will be black
linkcolor=black,
linkbordercolor=red, % hyperlink borders will be red
pdfborderstyle={/S/U/W 1} % border style will be underline of width 1pt
pdfborderstyle={0 0 0}
}
\newif\ifprint
@ -58,10 +57,13 @@
% Syntax Higlighting
\usepackage{listings}
% Haskell Syntax Highlighting
\usepackage{resources/haskell}
\lstset{
language=haskell,
basicstyle=\linespread{0.2}\small\sffamily,
breaklines=true,
frame=ltb,
framerule=0pt,
xleftmargin=15pt,
@ -82,7 +84,6 @@
showspaces=false,
keywordstyle=\bfseries\rmfamily,
columns=fullflexible,
basicstyle=\small\sffamily,
showstringspaces=false,
morecomment=[l]\%,
}

View File

@ -130,9 +130,10 @@ toward more complex topics in later chapters.
As there is no ordering after the first chapter I will refer to concepts
globally without introducing them first. If something doesn't make sense just
skip it and move on. I strongly encourage you to play around with the source
code modules for yourself. Haskell cannot be learned from an armchair, only from
writing tons of code and interacting with compiler. GHC may seem like a cruel
instructor at first, but in time most people grow to love it.
code modules for yourself. Haskell cannot be learned from an armchair, instead
it can only be mastered by writing a ton of code for yourself. GHC may initially
seem like a cruel instructor, but in time most people grow to see it as their
friend.
GHC
---
@ -3975,22 +3976,22 @@ The Benign
It's not obvious which extensions are the most common but it's fairly safe to
say that these extensions are benign and are safely used extensively:
* [NoImplicitPrelude](Custom Preludes)
* [NoImplicitPrelude](#custom-preludes)
* [OverloadedStrings]
* [LambdaCase]
* [FlexibleContexts]
* [FlexibleInstances]
* [GeneralizedNewtypeDeriving](Newtype Deriving)
* [GeneralizedNewtypeDeriving](#newtype-deriving)
* [TypeSynonymInstances]
* [MultiParamTypeClasses](MultiParam Typeclasses)
* [FunctionalDependencies](MultiParam Typeclasses)
* [NoMonomorphismRestriction](Monomorphism Restriction)
* [MultiParamTypeClasses](#multiParam-typeclasses)
* [FunctionalDependencies](#multiParam-typeclasses)
* [NoMonomorphismRestriction](#monomorphism-restriction)
* [GADTs]
* [BangPatterns]
* [DeriveGeneric]
* [DeriveAnyClass]
* [DerivingStrategies]
* [ScopedTypeVariables](Scoped Type Variables)
* [ScopedTypeVariables](#scoped-type-variables)
The Advanced
------------
@ -3999,16 +4000,16 @@ These extensions are typically used by advanced projects that push the limits of
what is possible with Haskell to enforce complex invariants and very type-safe
APIs.
* [PolyKinds](Promotion)
* [DataKinds](Promotion)
* DerivingVia
* [PolyKinds](#promotion)
* [DataKinds](#promotion)
* [DerivingVia]
* [GADTs]
* RankN
* ExistentialQuantification
* [TypeFamilies](Type Families)
* RankNTypes
* [ExistentialQuantification](#quantification)
* [TypeFamilies](#type-families)
* [TypeInType]
* TypeOperators
* TypeApplications
* [TypeOperators]
* [TypeApplications](#promoted-syntax)
* UndecidableInstances
The Lowlevel
@ -6749,9 +6750,6 @@ do-notation and if-then-else syntax by providing alternative definitions local t
~~~~ {.haskell include="src/10-advanced-monads/indexed.hs"}
~~~~
See: [Fun with Indexed monads](https://github.com/dorchard/effect-monad/raw/master/docs/ixmonad-fita14.pdf)
lifted-base
-------------
@ -8183,7 +8181,9 @@ on under the hood.
~~~~ {.haskell include="src/16-type-families/role_infer.hs"}
~~~~
```haskkell
With:
```haskell
coerce :: Coercible * a b => a -> b
class (~R#) k k a b => Coercible k a b
```