mirror of
https://github.com/sdiehl/wiwinwlh.git
synced 2024-08-16 23:40:41 +03:00
Write more
This commit is contained in:
parent
f1f9731daf
commit
350e62cd21
@ -21,10 +21,15 @@
|
||||
\usepackage{xcolor}
|
||||
\usepackage{tikz}
|
||||
\usepackage{hyperref}
|
||||
|
||||
\hypersetup{%
|
||||
colorlinks=false, % hyperlinks will be black
|
||||
linkcolor=black,
|
||||
pdfborderstyle={0 0 0}
|
||||
pdfborderstyle={0 0 0},
|
||||
pdfauthor={Stephen Diehl},
|
||||
pdfsubject={Haskell Programming},
|
||||
pdftitle={What I Wish I Knew When Learning Haskell},
|
||||
pdfkeywords={LaTeX, PDF, hyperlinks}
|
||||
}
|
||||
|
||||
\newif\ifprint
|
||||
|
27
tutorial.md
27
tutorial.md
@ -8740,25 +8740,25 @@ data instance Sing (a :: Bool) where
|
||||
|
||||
**Promoted Naturals**
|
||||
|
||||
Value-level Type-level Models
|
||||
----------- ------------ -------
|
||||
SZ Sing 'Z 0
|
||||
SS SZ Sing ('S 'Z) 1
|
||||
SS (SS SZ) Sing ('S ('S 'Z)) 2
|
||||
Value-level Type-level Models
|
||||
----------- ------------------- -------
|
||||
`SZ` `Sing 'Z` `0`
|
||||
`SS SZ` `Sing ('S 'Z)` `1`
|
||||
`SS (SS SZ)` `Sing ('S ('S 'Z))` `2`
|
||||
|
||||
**Promoted Booleans**
|
||||
|
||||
Value-level Type-level Models
|
||||
----------- --------------- -------
|
||||
SFalse Sing 'False False
|
||||
STrue Sing 'True True
|
||||
Value-level Type-level Models
|
||||
----------- --------------- -------
|
||||
`SFalse` `Sing 'False` `False`
|
||||
`STrue` `Sing 'True` `True`
|
||||
|
||||
**Promoted Maybe**
|
||||
|
||||
Value-level Type-level Models
|
||||
----------- --------------- -------
|
||||
SJust a Sing (SJust 'a) Just a
|
||||
SNothing Sing Nothing Nothing
|
||||
----------- ----------------- -------
|
||||
`SJust a` `Sing (SJust 'a)` `Just a`
|
||||
`SNothing` `Sing Nothing` `Nothing`
|
||||
|
||||
Singleton types are an integral part of the small cottage industry of faking
|
||||
dependent types in Haskell, i.e. constructing types with terms predicated upon
|
||||
@ -14802,7 +14802,8 @@ int driver(float* x, float* y)
|
||||
}
|
||||
```
|
||||
|
||||
Run the resulting output through ``nvcc -ptx -c`` to get the PTX associated with the outputted code.
|
||||
Pipe the resulting output through NVidia CUDA Compiler with ``nvcc -ptx -c`` to
|
||||
get the PTX associated with the outputted code.
|
||||
|
||||
Template Haskell
|
||||
----------------
|
||||
|
Loading…
Reference in New Issue
Block a user