[FMFP] Typing introduction

This commit is contained in:
2026-03-05 14:12:06 +01:00
parent e83c64315a
commit 43352a0b10
3 changed files with 10 additions and 0 deletions

View File

@@ -2,3 +2,10 @@
This is a stripped down version of Haskell, used here to explore the type system Haskell uses
\subsubsection{Syntax}
Programs are terms, the core is the lambda-calculus, where $\cV$ is the set of variables and $\Z$ the set of integers:
\[
t :: = \cV \divider (\lambda x. t) \divider (t_1 t_2) \divider True \divider False \divider (\textbf{iszero } t) \divider \Z \divider (t_1 + t_2) \divider t_1 * t_2
\divider \textbf{if } t_0 \textbf{ then } t_1 \textbf{ else } t_2 \divider (t_1, t_2) \divider (\textbf{fst } t) \divider (\textbf{snd } t)
\]
It is easily possible to add additonal syntax and types and we employ syntactic sugar, such as omitting parenthesis.