smirk-effectful: Effectful (algebraic effects) interface for the Smirk PCRE engine

[ apache, effects, library, regex, text ] [ Propose Tags ] [ Report a vulnerability ]

Exposes Smirk's pure, step-bounded PCRE engine as an effectful first-class effect (Smirk.Effect.Effectful), with pure and fuel-bounded interpreters. This package depends on the plain smirk package for the core engine, so consumers who only need effectful (not polysemy) do not drag in polysemy.


[Skip to Readme]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0
Change log CHANGELOG.md
Dependencies base (>=4.16 && <5), effectful (>=2.0 && <3), effectful-core (>=2.0 && <3), effectful-th (>=1.0 && <2), smirk (>=0.1 && <0.2), text (>=2.0 && <3) [details]
License Apache-2.0
Author Nadia Yvette Chambers
Maintainer Nadia Chambers <nadia.yvette.chambers@ik.me>
Uploaded by nyc at 2026-11-03T19:27:52Z
Category Text, Regex, Effects
Home page https://github.com/NadiaYvette/smirk
Bug tracker https://github.com/NadiaYvette/smirk/issues
Source repo head: git clone https://github.com/NadiaYvette/smirk.git(packages/smirk-effectful)
Distributions
Downloads 3 total (3 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for smirk-effectful-0.1.0.0

[back to package description]

smirk-effectful

Effectful (algebraic effects) interface for the Smirk PCRE engine.

smirk-effectful provides first-class effectful bindings for Smirk's pure, step-bounded PCRE regular expression engine.


Features

  • First-Class Effect (SmirkRegex): Idiomatic effect definition integrating seamlessly into Eff es stacks.
  • Dual Interpreters:
    • runSmirkPure: Unbounded pure in-memory execution.
    • runSmirkFuel: Fuel-bounded execution guaranteeing ReDoS immunity by returning Left OutOfFuel if a step budget is exceeded.
  • Lightweight Dependency: Only depends on smirk and effectful, without dragging in polysemy.

Quick Example

{-# LANGUAGE DataKinds #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TypeApplications #-}

import Effectful
import Smirk (re)
import Smirk.Effect.Effectful

prog :: (SmirkRegex :> es) => Eff es (Maybe (Match Text))
prog = match [re|hello (\w+)|] "hello world"

main :: IO ()
main = do
  let result = runPureEff (runSmirkPure prog)
  print result

License

Licensed under the Apache License 2.0 (LICENSE).