Haskell Weekly Issue 531 curates the latest from the Haskell community. Featured articles include a deep dive into actegories and optics by Bartosz Milewski, a dev log on implementing new GHC syntax, a podcast episode with top GHC contributor Sylvain Henry, a technique for type-checked non-empty strings with TemplateHaskell yielding ~10% build-time improvements, a guide on emulating inline assembly in GHC for low-level CPU instruction access, and an overview of Haskell security tooling. Job listings include roles at LivTours and Standard Chartered. Notable releases include Hyperbole 0.7 with multipart file uploads and reflex-vty 1.0. Community highlights cover a BitNet 1.58 LLM experiment in MicroHaskell and GHC proposals for top-level shared IO computations.
Nguồn: https://haskellweekly.news/issue/531.html. 8sync News chỉ tóm tắt và dẫn link; bản quyền nội dung thuộc tác giả và nguồn gốc.
Bài viết áp dụng nguyên tắc "parse, don't validate" của Alexis King vào TypeScript bằng cách sử dụng branded types và discriminated unions. Thay vì chỉ xác thực dữ liệu rồi loại bỏ bằng chứng, parsers tích hợp tính đúng đắn vào hệ thống kiểu, giúp loại bỏ trạng thái bất hợp pháp (UnvalidatedUser vs ValidUser). Bài viết cũng đề cập đến những khó khăn của TypeScript như structural typing, ép kiểu 'as' trong parser, thiếu match expression, và cách thư viện Zod tự động hóa nhưng vẫn giữ nguyên nguyên tắc này.
Lập trình viên nên đọc bài này để hiểu cách chuyển đổi từ cách kiểm tra dữ liệu bằng validation (giảm hiệu suất và làm mờ lỗi) sang cách sử dụng parse thông qua kiểu dữ liệu (giúp phát hiện lỗi ngay từ giai đoạn biên dịch và tăng tính bảo mật).
Haskell Weekly issue 530 covers the Haskell ecosystem activities report for March–May 2026 from Well-Typed (covering GHC, Cabal, HLS work), a guide on creating statically-linked Haskell executables with Nix, an introduction to the pqi library aiming to decouple Haskell PostgreSQL drivers from libpq, an introductory post on record type inference, and a deep dive into representing sheaves in Haskell using category theory. Brief announcements include apecs-0.10.0 (ECS package), Fourmolu 0.20.0.0 formatter release with GHC 9.14 support, GHC 9.12.5-rc2, and new Hpack-Dhall and Stock packages.
A beginner-friendly introduction to type inference for anonymous records, building up from basic record literals to field access, variables, and functions. The post explains why statically typed languages struggle with anonymous records, introduces formal type inference notation with Haskell code examples, and covers two approaches to handling extra record fields: subtyping (as in TypeScript) and row polymorphism (as in PureScript and Elm). Row polymorphism is shown to be more expressive, enabling precise types for operations like record extension. The post is a foundation for a follow-up on type inference for record concatenation in Nix.