# morangotangos-team/trabalho-haskell architecture

> Architecture diagram of the GitHub repository morangotangos-team/trabalho-haskell, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/morangotangos-team/trabalho-haskell
- Repository: https://github.com/morangotangos-team/trabalho-haskell

## Overview

This is a small academic-performance exercise with a Haskell implementation and a comparative C implementation. The principal workflow classifies students from their grades, aggregates the classifications into a class report, and displays results. Haskell also documents threshold-based student selection and immutable grade entry. The C excerpt shows its report path directly; the Haskell relationships below rely on README descriptions because Desempenho.hs was not excerpted, so internal details beyond those descriptions are omitted.

Main entry points: [`Desempenho.hs`](https://github.com/morangotangos-team/trabalho-haskell/blob/main/Desempenho.hs) (Haskell demo), [`relatorio.c`](https://github.com/morangotangos-team/trabalho-haskell/blob/main/relatorio.c) (C demo)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_haskell["Haskell implementation"]
  node_hs_main["Haskell demo<br/>[Desempenho.hs]"]
  node_hs_data["Sample class<br/>[Desempenho.hs]"]
  node_hs_media["Grade average<br/>[Desempenho.hs]"]
  node_hs_situation["Student classification<br/>[Desempenho.hs]"]
  node_hs_report["Class report<br/>[Desempenho.hs]"]
  node_hs_above["Threshold selection<br/>[Desempenho.hs]"]
  node_hs_add["Immutable grade entry<br/>[Desempenho.hs]"]
end

subgraph group_c["C comparison"]
  node_c_main["C demo<br/>[relatorio.c]"]
  node_c_data["Sample class<br/>[relatorio.c]"]
  node_c_media["Grade average<br/>[relatorio.c]"]
  node_c_situation["Student classification<br/>[relatorio.c]"]
  node_c_report["Class report<br/>[relatorio.c]"]
  node_c_print["Report display<br/>[relatorio.c]"]
end

node_user(("User"))

node_user -->|"runs"| node_hs_main
node_hs_data -->|"supplies examples"| node_hs_main
node_hs_main -->|"demonstrates"| node_hs_media
node_hs_main -->|"demonstrates"| node_hs_situation
node_hs_main -->|"demonstrates"| node_hs_report
node_hs_main -->|"demonstrates"| node_hs_above
node_hs_main -->|"demonstrates"| node_hs_add
node_hs_situation -->|"uses average"| node_hs_media
node_hs_report -->|"counts outcomes"| node_hs_situation
node_hs_above -->|"checks average"| node_hs_media
node_user -->|"runs"| node_c_main
node_c_data -->|"supplies examples"| node_c_main
node_c_main -->|"calls report"| node_c_report
node_c_main -->|"prints counts"| node_c_print
node_c_report -->|"classifies students"| node_c_situation
node_c_situation -->|"calls average"| node_c_media

click node_hs_main "https://github.com/morangotangos-team/trabalho-haskell/blob/main/Desempenho.hs"
click node_hs_data "https://github.com/morangotangos-team/trabalho-haskell/blob/main/Desempenho.hs"
click node_hs_media "https://github.com/morangotangos-team/trabalho-haskell/blob/main/Desempenho.hs"
click node_hs_situation "https://github.com/morangotangos-team/trabalho-haskell/blob/main/Desempenho.hs"
click node_hs_report "https://github.com/morangotangos-team/trabalho-haskell/blob/main/Desempenho.hs"
click node_hs_above "https://github.com/morangotangos-team/trabalho-haskell/blob/main/Desempenho.hs"
click node_hs_add "https://github.com/morangotangos-team/trabalho-haskell/blob/main/Desempenho.hs"
click node_c_main "https://github.com/morangotangos-team/trabalho-haskell/blob/main/relatorio.c"
click node_c_data "https://github.com/morangotangos-team/trabalho-haskell/blob/main/relatorio.c"
click node_c_media "https://github.com/morangotangos-team/trabalho-haskell/blob/main/relatorio.c"
click node_c_situation "https://github.com/morangotangos-team/trabalho-haskell/blob/main/relatorio.c"
click node_c_report "https://github.com/morangotangos-team/trabalho-haskell/blob/main/relatorio.c"
click node_c_print "https://github.com/morangotangos-team/trabalho-haskell/blob/main/relatorio.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_hs_main,node_hs_data,node_hs_media,node_hs_situation,node_hs_report,node_hs_above,node_hs_add,node_user toneBlue
class node_c_main,node_c_data,node_c_media,node_c_situation,node_c_report,node_c_print toneAmber
```

## Components

### Haskell implementation

- [Haskell demo](https://github.com/morangotangos-team/trabalho-haskell/blob/main/Desempenho.hs): `Desempenho.hs`
- [Sample class](https://github.com/morangotangos-team/trabalho-haskell/blob/main/Desempenho.hs): `Desempenho.hs`
- [Grade average](https://github.com/morangotangos-team/trabalho-haskell/blob/main/Desempenho.hs): `Desempenho.hs`
- [Student classification](https://github.com/morangotangos-team/trabalho-haskell/blob/main/Desempenho.hs): `Desempenho.hs`
- [Class report](https://github.com/morangotangos-team/trabalho-haskell/blob/main/Desempenho.hs): `Desempenho.hs`
- [Threshold selection](https://github.com/morangotangos-team/trabalho-haskell/blob/main/Desempenho.hs): `Desempenho.hs`
- [Immutable grade entry](https://github.com/morangotangos-team/trabalho-haskell/blob/main/Desempenho.hs): `Desempenho.hs`

### C comparison

- [C demo](https://github.com/morangotangos-team/trabalho-haskell/blob/main/relatorio.c): `relatorio.c`
- [Sample class](https://github.com/morangotangos-team/trabalho-haskell/blob/main/relatorio.c): `relatorio.c`
- [Grade average](https://github.com/morangotangos-team/trabalho-haskell/blob/main/relatorio.c): `relatorio.c`
- [Student classification](https://github.com/morangotangos-team/trabalho-haskell/blob/main/relatorio.c): `relatorio.c`
- [Class report](https://github.com/morangotangos-team/trabalho-haskell/blob/main/relatorio.c): `relatorio.c`
- [Report display](https://github.com/morangotangos-team/trabalho-haskell/blob/main/relatorio.c): `relatorio.c`

### Other components

- **User**

## Connections

- User → Haskell demo: runs (evidence: `README.md`)
- Sample class → Haskell demo: supplies examples (evidence: `README.md`)
- Haskell demo → Grade average: demonstrates (evidence: `README.md`)
- Haskell demo → Student classification: demonstrates (evidence: `README.md`)
- Haskell demo → Class report: demonstrates (evidence: `README.md`)
- Haskell demo → Threshold selection: demonstrates (evidence: `README.md`)
- Haskell demo → Immutable grade entry: demonstrates (evidence: `README.md`)
- Student classification → Grade average: uses average (evidence: `README.md`)
- Class report → Student classification: counts outcomes (evidence: `README.md`)
- Threshold selection → Grade average: checks average (evidence: `README.md`)
- User → C demo: runs (evidence: `README.md`)
- Sample class → C demo: supplies examples (evidence: `relatorio.c`)
- C demo → Class report: calls report (evidence: `relatorio.c`)
- C demo → Report display: prints counts (evidence: `relatorio.c`)
- Class report → Student classification: classifies students (evidence: `relatorio.c`)
- Student classification → Grade average: calls average (evidence: `relatorio.c`)
