Coding
PromptBeginner5 minmarkdown
Markdown Converter
Agent skill for markdown-converter
7
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Typewell is a terminal-based typing practice application written in Haskell, similar to Keybr and Monkeytype. It features multiple game modes, progress tracking, and adaptive difficulty.
# Build the project cabal build # Build and run cabal run typewell # Clean build artifacts cabal clean
The project is structured as a library (
typewell) with an executable (typewell):
app/Main.hs - Entry point, calls UI.runApp src/Typewell/ ├── Types.hs - Core data types (AppState, GameState, GameMode, etc.) ├── Game.hs - Game logic (newGame, handleChar, handleBackspace) ├── UI.hs - Brick TUI framework integration and event handling ├── UI/ │ ├── Themes.hs - Color schemes and visual attributes │ └── Widgets.hs - UI widget rendering components ├── Stats.hs - WPM and accuracy calculations ├── Progress.hs - JSON persistence (~/.config/typewell/) ├── Adaptive.hs - Weak key detection for adaptive mode └── WordLists.hs - Word list and text generation
Main.hs → UI.runApp loads saved history/key stats, starts timer thread (100ms ticks), initializes Brick appGame.hs processes character input, Stats.hs computes metricsProgress.hs saves stats to JSON filesAppState: Main state with current screen, game state, history, key statsGameState: Target text, typed characters, timing, current modeGameMode: TimedMode, WordCountMode, EndlessMode, AdaptiveModeScreen: MenuScreen, ModeSelectScreen, TypingScreen, ResultsScreen, HistoryScreen