atelier-core

Foundational effects and utilities for effect-based applications, built on Effectful. Part of the atelier toolkit.

Overview

atelier-core provides a set of composable Effectful effects and supporting types for building structured, observable applications.

It also wraps a number of IO-based primitives (environment, clock, file system, console, POSIX) as effects so they can be interpreted and tested explicitly: Atelier.Effects.Env, Atelier.Effects.Clock, Atelier.Effects.FileSystem, Atelier.Effects.Console, Atelier.Effects.Posix.*, and more.

License

MIT — see LICENSE.

Changes

Changelog

All notable changes to atelier-core will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to the PVP.

[Unreleased]

[0.6.0.0] - 2026-09-10

Changed

  • Require effectful >=2.7 && <2.8.
  • Require effectful-core >=2.7 && <2.8.
  • Require effectful-plugin >=2.2 && <2.3.

[0.5.0.0] - 2026-09-09

Changed

  • Atelier.Time: Remove orphan FromJSON and ToJSON instances, and instead introduce AsRawUnit and AsJsonMicrosecond newtypes for FromJSON and ToJSON instance deriving. This fixes the issue where the time units’ FromJSON and ToJSON instances did not match, meaning decode (encode (10 :: Hour)) == Nothing held true. Now you have to be more explicit about how the units will be represented in JSON.

[0.4.0.1] - 2026-08-14

Removed

  • Dependency on hs-opentemeletry-api for the test suite.

[0.4.0.0] - 2026-08-14

Added

  • Atelier.Effects.Env: lookupEnv picks out a single environment variable.

Changed

  • Major version bump for the following dependencies’ upper version bounds:
    • aeson
    • http-api-data
    • time

Removed

  • Move all metrics and observability tooling to atelier-monitoring:
    • Atelier.Component: moved to atelier-monitoring.
    • Atelier.Effects.Conc.Traced: moved to atelier-monitoring.
    • Atelier.Effects.Monitoring.Metrics: moved to atelier-monitoring.
    • Atelier.Effects.Monitoring.Metrics.Server: moved to atelier-monitoring.
    • Atelier.Effects.Monitoring.Metrics.Registry: moved to atelier-monitoring.
    • Atelier.Effects.Cache.Singleflight: removed tracing capability. Old version with tracing capability is available in atelier-monitoring as Atelier.Effects.Cache.Singleflight.Traced.
    • Atelier.Effects.Publishing#runPubSub: moved to atelier-monitoring in Atelier.Effects.Publishing.Traced.
    • Atelier.Effects.Publshing#runPubSub_: renamed to runPubSub.

[0.3.0.0] - 2026-08-06

Added

  • Atelier.Effects.Process: getExecutablePath returns the absolute path of the currently running executable, for re-invoking the program as a subprocess.
  • Atelier.Effects.Publishing.Pub: map and mapM allows mapping over published effects, producing a new Pub effect with the transformed values.

Changed

  • Moved Pub and Sub out of Atelier.Effects.Publishing to separate modules, Atelier.Effects.Publishing.Pub and Atelier.Effects.Publishing.Sub respectively.

[0.2.0.0] - 2026-06-26

Added

  • Atelier.Effects.File now re-exports IOMode (..).
  • Atelier.Effects.Process: withProcessGroup runs a process in its own process group and guarantees the whole group is torn down when the body returns or throws; terminateProcessGroup aborts a running group from another thread (for children that trap SIGINT, where interrupting the group is not enough).
  • New module Atelier.Effects.Process.Internal, exposing the RunningProcess constructor for tests that fabricate a handle. Production code should not import it.

Changed

  • Breaking: Atelier.Effects.Process.RunningProcess is now a distinct newtype wrapping System.Process.Typed.Process (previously a type synonym). getStdin/getStdout/getStderr operate on the new type.

Removed

  • Breaking: Atelier.Effects.Process no longer exports setCreateGroup, startProcess, or stopProcess. Process lifecycle is now managed through withProcessGroup.

[0.1.0.0] - 2026-06-05

Added

  • Initial release: foundational Effectful-based effects and utilities, extracted from the atelier toolkit.