polysemy-time-0.7.0.0: A Polysemy effect for time
Safe HaskellSafe-Inferred
LanguageGHC2021

Polysemy.Time.Measure

Description

Measure an Action's Duration, Internal

Synopsis

Documentation

measure :: forall dt t d u r a. TimeUnit u => Torsor dt u => Instant t dt => Member (Time t d) r => Sem r a -> Sem r (u, a) Source #

Run the action ma and measure the time it takes.

The type of the difference depends on the functional dependencies of the classes Instant and Torsor, where the input to the former is taken from the type t of Time which is instantiated by an interpreter.