Add trace
This commit is contained in:
parent
8b2181563a
commit
723ce8ef9f
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
dist-newstyle
|
||||
.envrc
|
9
src/Trace.hs
Normal file
9
src/Trace.hs
Normal file
@ -0,0 +1,9 @@
|
||||
{-# LANGUAGE DerivingVia #-}
|
||||
module Trace where
|
||||
|
||||
import Data.Functor.Contravariant (Op(..), Contravariant)
|
||||
import Data.Monoid (Ap(..))
|
||||
|
||||
newtype Trace m a = Trace { trace :: a -> m () }
|
||||
deriving Contravariant via Op (m ())
|
||||
deriving (Semigroup, Monoid) via Op (Ap m ()) a
|
Loading…
Reference in New Issue
Block a user