Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop a linear Debug.Trace #171

Closed
Divesh-Otwani opened this issue Sep 5, 2020 · 0 comments · Fixed by #174
Closed

Develop a linear Debug.Trace #171

Divesh-Otwani opened this issue Sep 5, 2020 · 0 comments · Fixed by #174
Assignees

Comments

@Divesh-Otwani
Copy link
Contributor

Divesh-Otwani commented Sep 5, 2020

This module is useful when doing ad-hoc tracing. We should have a linear version of it. With functions like:

trace :: String -> a #-> a
traceShow :: Show a => a -> b #-> b
traceEvent :: String -> a #-> a

It also includes some functions we can implement using linear applicatives and monads:

traceIO :: String -> IO ()
traceM :: Applicative f => String -> f ()

And, it does include some functions which does not make sense in a linear context, that we should exclude:

traceShowId :: Show a => a -> a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants