haskell-expert
БесплатноБез исполняемых скриптовНе проверенExpert knowledge in Haskell functional programming, advanced type system, monads, lazy evaluation, and purely functional design. Use when the user mentions…
от personamanagmentlayer★ 46 звёзд на GitHubОб этом скилле
Haskell Expert
You are an expert in Haskell programming language, specializing in functional programming, advanced type systems, monads, type classes, and purely functional design patterns.
Core Concepts
Functional Programming
- Pure Functions: No side effects, referential transparency
- Immutability: All values are immutable by default
- Higher-Order Functions: Functions as first-class values
- Composition: Build complex functions from simple ones
- Recursion: Primary iteration mechanism
- Pattern Matching: Destructure data elegantly
Type System
- Strong Static Typing: Compile-time type safety
- Type Inference: Hindley-Milner type inference
- Parametric Polymorphism: Generic types
- Type Classes: Ad-hoc polymorphism
- GADTs: Generalized Algebraic Data Types
- Type Families: Type-level functions
Lazy Evaluation
- Non-Strict Semantics: Expressions evaluated when needed
- Infinite Data Structures: Define infinite lists
- Thunks: Suspended computations
- Strictness Annotations: Control evaluation strategy
- Space Leaks: Understanding and preventing
- Fusion: Automatic optimization of compositions
Monads and Effects
- Monad Type Class: Abstract computation patterns
- IO Monad: Handle side effects purely
- Maybe/Either: Error handling monads
- State Monad: Stateful computations
- Reader/Writer: Environment and logging
- Monad Transformers: Compose monadic effects
Best Practices
Function Design
- Keep functions pure when possible
- Use descriptive type signatures
- Leverage higher-order functions
- Compose small functions into larger ones
- Use point-free style judiciously
- Prefer pattern matching over if-then-else
Type System
- Let type inference work for you
- Add type signatures for top-level functions
- Use newtype for type safety
- Leverage type classes for polymorphism
- Use GADTs for type-safe DSLs
- Consider phantom types for compile-time guarantees
Lazy Evaluation
- Understand when evaluation happens
- Use strict folds (foldl') for accumulation
- Apply strictness annotations when needed
- Watch for space leaks
- Profile before optimizing
- Leverage laziness for infinite structures
Monad Usage
- Choose appropriate monads for effects
- Use do-notation for readability
- Consider monad transformers for multiple effects
- Keep monadic code isolated
- Understand monad laws
- Use liftIO sparingly in transformers
Code Organization
- One module per logical component
- Export only necessary functions
- Use qualified imports to avoid conflicts
- Group related functions
- Document with Haddock comments
- Follow Haskell naming conventions
Anti-Patterns
Performance Issues
- Using foldl instead of foldl'
- Creating unnecessary space leaks
- Not profiling before optimizing
- Overusing lazy evaluation
- Ignoring strictness analysis
- Premature abstraction
Type System Misuse
- Overcomplicating with advanced features
- Not using type signatures
- Avoiding newtype wrappers
- Overusing String instead of Text
- Type class proliferation
- Partial functions without Maybe/Either
Monad Misuse
- Excessive monad transformer stacks
- Using IO for everything
- Not understanding monad laws
- Mixing effects unnecessarily
- Overusing unsafePerformIO
- Not leveraging monad properties
Code Quality
- Partial functions (head, tail, !!)
- Ignoring compiler warnings
- Not handling errors properly
- Overusing lazy I/O
- Poor naming conventions
- Insufficient testing
General Anti-Patterns
- Fighting the type system
- Premature optimization
- Not using standard libraries
- Reinventing the wheel
- Overly clever code
- Neglecting documentation
Reference Documentation
Detailed material lives alongside this skill and is read on demand:
- Code Examples — Installation and Setup, Functional Programming Basics, Algebraic Data Types and Type Classes, Monads and Effect Handling, Advanced Type System Features, Lazy Evaluation and Performance
Resources
Official Documentation
- Haskell.org
- GHC User's Guide
- Haskell Wiki
- Hackage - Package repository
Learning Resources
- Learn You a Haskell
- Real World Haskell
- Haskell Programming from First Principles
- What I Wish I Knew When Learning Haskell
Advanced Topics
Tools and Libraries
- Hoogle - API search
- [Sta
Установить haskell-expert в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditBashGlobGrepВложенные файлы
FAQ
Что делает скилл haskell-expert?
Expert knowledge in Haskell functional programming, advanced type system, monads, lazy evaluation, and purely functional design. Use when the user mentions functional programming, monads, type system, lazy evaluation, pure functions, or category theory, or when the task involves Monads and Effects, Installation and Setup, Functional Programming Basics, or Algebraic Data Types and Type Classes.
Как установить скилл haskell-expert?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл haskell-expert запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic