Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
ShenMian committed Nov 10, 2024
1 parent 7601684 commit bfe663b
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions docs/程序设计语言/Haskell/类型.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@

## 基本类型

- `Int`: 64 位整数.
- `Word`: 64 位无符号整数.
- `Integer`: 任意大小整数.
- `Float`: 32 位浮点数.
- `Double`: 64 位浮点数.
- `Char`: 一个 Unicode 字符.
- `Bool`.

聚合类型:

- 元组(Tuple).
- 列表(List).
| 类型 | 描述 |
| --------- | ------------------ |
| `Int` | 64 位整数. |
| `Word` | 64 位无符号整数. |
| `Integer` | 任意大小整数. |
| `Float` | 32 位浮点数. |
| `Double` | 64 位浮点数. |
| `Char` | 一个 Unicode 字符. |
| `Bool` | |

## 聚合类型

- 元组 (Tuple).
- 列表 (List).
- Tagged union.

在 GHCi 中, 可以使用 `:type``:t` 查看表达式的类型:

Expand Down

0 comments on commit bfe663b

Please sign in to comment.