Documentation

Hale.ResourceT.Control.Monad.Trans.Resource

Opaque key for a registered cleanup action. Single-use: calling release twice is a no-op.

Instances For

    Resource management monad transformer. $$\text{ResourceT}\ m\ \alpha = \text{IO.Ref CleanupMap} \to m\ \alpha$$

    Equations
    Instances For
      @[implicit_reducible]
      Equations
      • One or more equations did not get rendered due to their size.
      def Control.Monad.Trans.Resource.allocate {α : Type} (acquire : IO α) (release : αIO Unit) :

      Register a resource with its cleanup action. Returns a ReleaseKey that can be used to release early.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        Release a resource early. No-op if already released.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Run a ResourceT computation. All registered cleanup actions execute on completion in LIFO order, even on exceptions.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            ReleaseKey equality is by id.