nw-fp-haskell
SolidHaskell language-specific patterns, GADTs, type classes, and effect systems
AI & Automation 526 stars
55 forks Updated 1 weeks ago MIT
Install
Quality Score: 95/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# FP in Haskell -- Functional Software Crafter Skill
Cross-references: [fp-principles](../nw-fp-principles/SKILL.md) | [fp-domain-modeling](../nw-fp-domain-modeling/SKILL.md) | [pbt-haskell](../nw-pbt-haskell/SKILL.md)
## When to Choose Haskell
- Best for: correctness-critical systems | compiler-enforced purity | maximum type safety | financial systems
- Not ideal for: teams needing fast onboarding | rapid prototyping | .NET/JVM platform requirements
## [STARTER] Quick Setup
```bash
# Install GHCup (manages GHC, cabal, stack, HLS)
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
# Create project
mkdir order-service && cd order-service && cabal init --interactive
# Or: stack new order-service simple && stack build && stack test
```
**Test runner**: `cabal test` or `stack test`. Add `hspec`, `QuickCheck`, `hedgehog` to `build-depends`.
## [STARTER] Type System for Domain Modeling
### Choice Types (Sum Types)
```haskell
data PaymentMethod
= CreditCard CardNumber ExpiryDate
| BankTransfer AccountNumber
| Cash
deriving (Eq, Show)
```
### Record Types and Newtypes
```haskell
data Customer = Customer
{ customerId :: CustomerId
, customerName :: CustomerName
, customerEmail :: EmailAddress
} deriving (Eq, Show)
newtype OrderId = OrderId Int deriving (Eq, Ord, Show)
newtype EmailAddress = EmailAddress Text deriving (Eq, Show)
```
`newtype` is erased at compile time -- zero runtime overhead, full type safety.
### [STARTER] Valid...
Details
- Author
- nWave-ai
- Repository
- nWave-ai/nWave
- Created
- 3 months ago
- Last Updated
- 1 weeks ago
- Language
- Python
- License
- MIT
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Solid
nw-fp-fsharp
F# language-specific patterns, Railway-Oriented Programming, and Computation Expressions
526 Updated 1 weeks ago
nWave-ai AI & Automation Solid
nw-fp-scala
Scala 3 language-specific patterns with ZIO, Cats Effect, and opaque types
526 Updated 1 weeks ago
nWave-ai AI & Automation Solid
nw-fp-kotlin
Kotlin language-specific patterns with Arrow, Raise DSL, and coroutine-based effects
526 Updated 1 weeks ago
nWave-ai AI & Automation Solid
nw-fp-clojure
Clojure language-specific patterns, data-first modeling, REPL-driven development, and spec
526 Updated 1 weeks ago
nWave-ai DevOps & Infrastructure Solid
nw-fp-principles
Core functional programming thinking patterns and type system foundations, language-agnostic
526 Updated 1 weeks ago
nWave-ai