polysemy-time-0.1.3.2: Polysemy Effect for Time
Safe HaskellNone
LanguageHaskell2010

Polysemy.Time.Measure

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.