{"action":"created","issue":{"url":"https://api.github.com/repos/HIPERFIT/futhark/issues/12","labels_url":"https://api.github.com/repos/HIPERFIT/futhark/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/HIPERFIT/futhark/issues/12/comments","events_url":"https://api.github.com/repos/HIPERFIT/futhark/issues/12/events","html_url":"https://github.com/HIPERFIT/futhark/issues/12","id":56247943,"number":12,"title":"We need better logging","user":{"login":"Athas","id":55833,"avatar_url":"https://avatars.githubusercontent.com/u/55833?v=3","gravatar_id":"","url":"https://api.github.com/users/Athas","html_url":"https://github.com/Athas","followers_url":"https://api.github.com/users/Athas/followers","following_url":"https://api.github.com/users/Athas/following{/other_user}","gists_url":"https://api.github.com/users/Athas/gists{/gist_id}","starred_url":"https://api.github.com/users/Athas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Athas/subscriptions","organizations_url":"https://api.github.com/users/Athas/orgs","repos_url":"https://api.github.com/users/Athas/repos","events_url":"https://api.github.com/users/Athas/events{/privacy}","received_events_url":"https://api.github.com/users/Athas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/HIPERFIT/futhark/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"Athas","id":55833,"avatar_url":"https://avatars.githubusercontent.com/u/55833?v=3","gravatar_id":"","url":"https://api.github.com/users/Athas","html_url":"https://github.com/Athas","followers_url":"https://api.github.com/users/Athas/followers","following_url":"https://api.github.com/users/Athas/following{/other_user}","gists_url":"https://api.github.com/users/Athas/gists{/gist_id}","starred_url":"https://api.github.com/users/Athas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Athas/subscriptions","organizations_url":"https://api.github.com/users/Athas/orgs","repos_url":"https://api.github.com/users/Athas/repos","events_url":"https://api.github.com/users/Athas/events{/privacy}","received_events_url":"https://api.github.com/users/Athas/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-02-02T15:11:41Z","updated_at":"2015-10-01T11:24:40Z","closed_at":null,"body":"Well, we need logging at all.  Currently it's really hard to debug the compiler, because you have to insert surgical calls to 'Debug.Trace' where you think things are going wrong.  It would be nice if the compiler itself kept a running log of most of the things it rewrites (and maybe even why).  The following problems arise:\r\n\r\n  * Due to renaming, it may be hard to follow what is going on.  I've been minimising the amount of renaming going on, so maybe this isn't a big problem.  It generally is not when I trace.\r\n\r\n  * The code for performing the logging may be large and obscure the actual optimisations.  This can be reduced by design improvements - for example, if we require that each simplification rule is associated with a name (instead of being a plain Haskell function), we can in one place put a log message that says \"rule R turned X into Y\".\r\n\r\n  * When turned off, the deactivated logging code must be completely free of cost.  Lazy evaluation and monadic design will help us with this.\r\n\r\nI do not want to create an `#ifdef` nightmare.  The degree of logging must be a command-line parameter - maybe even supporting some simple filters.  Also, the logging code must be entirely pure - we currently do not have IO anywhere but a single module, and I would like to keep it that way."},"comment":{"url":"https://api.github.com/repos/HIPERFIT/futhark/issues/comments/144701288","html_url":"https://github.com/HIPERFIT/futhark/issues/12#issuecomment-144701288","issue_url":"https://api.github.com/repos/HIPERFIT/futhark/issues/12","id":144701288,"user":{"login":"Athas","id":55833,"avatar_url":"https://avatars.githubusercontent.com/u/55833?v=3","gravatar_id":"","url":"https://api.github.com/users/Athas","html_url":"https://github.com/Athas","followers_url":"https://api.github.com/users/Athas/followers","following_url":"https://api.github.com/users/Athas/following{/other_user}","gists_url":"https://api.github.com/users/Athas/gists{/gist_id}","starred_url":"https://api.github.com/users/Athas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Athas/subscriptions","organizations_url":"https://api.github.com/users/Athas/orgs","repos_url":"https://api.github.com/users/Athas/repos","events_url":"https://api.github.com/users/Athas/events{/privacy}","received_events_url":"https://api.github.com/users/Athas/received_events","type":"User","site_admin":false},"created_at":"2015-10-01T11:24:40Z","updated_at":"2015-10-01T11:24:40Z","body":"I recently added a basic logging facility to the pipeline infrastructure."}}