원클릭으로
haskell-effectful
Effectful library conventions and decision rules. Use when writing effectful code, designing effects, or migrating from mtl.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Effectful library conventions and decision rules. Use when writing effectful code, designing effects, or migrating from mtl.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Build a Haskell project, interpret GHC errors, and apply safe fixes. Use when the user asks Codex to build Haskell code, fix compilation errors, or run cabal/stack build workflows.
Expert Haskell code review for idiomatic patterns, type safety, purity, error handling, and performance. Use when reviewing Haskell source files or PR changes.
Run and interpret Haskell test suites. Use when the user asks Codex to run HSpec, QuickCheck, Tasty, cabal test, stack test, or diagnose failing Haskell tests.
Servant client API wrapper conventions with two-layer error handling. Use when generating HTTP clients from Servant APIs, wrapping external service APIs, or integrating servant-client with effectful.
Servant web framework conventions using NamedRoutes record pattern. Use when building REST APIs, defining endpoints, writing handlers, or structuring Servant applications.
Idiomatic Haskell conventions and decision rules. Use when writing Haskell code, designing data types, or handling errors.
| name | haskell-effectful |
| description | Effectful library conventions and decision rules. Use when writing effectful code, designing effects, or migrating from mtl. |
Effectful.Reader.Static, Effectful.State.Static.Local)Always consistent: Reader -> State -> Error -> IOE
runApp :: Config -> AppState -> App a -> IO (Either (CallStack, AppError) (a, AppState))
runApp cfg st = runEff . runError . runStateLocal st . runReader cfg
makeEffect from Effectful.TH to auto-generate smart constructors and DispatchOf instancesError e :> es) or custom namingm parameter): use interpret_m parameter): use interpret + localSeqUnliftError constraints on GADT constructors, not on handler signatures -- caller decides error scopeliftEither helperrunErrorNoCallStack or runErrorWith at boundariesException on error newtypes for IO interopadapt helper pattern: liftIO + C.catch + localSeqUnlift for IO error conversionreinterpret + evalState with Map for testable filesystem-like effects-- CORRECT: Error constraint on GADT constructor
data FileSystem :: Effect where
ReadFile :: Error FsReadError :> es => FilePath -> FileSystem (Eff es) String
WriteFile :: Error FsWriteError :> es => FilePath -> String -> FileSystem (Eff es) ()
-- WRONG: Error constraint on handler
runFileSystemIO :: (IOE :> es, Error FsReadError :> es) => ...
ALWAYS use Effectful.Concurrent.*, NEVER Control.Concurrent.* with liftIO.
Error constraint to interpreter instead of effect definitionEither when errors should propagate via effectControl.Concurrent.* with liftIO instead of Effectful.Concurrent.*makeEffect on GADTs with effect constraints (manual definition required)For detailed code examples (dependency injection, testing, MTL migration, concurrency):
references/effectful-examples.md