{"action":"opened","issue":{"url":"https://api.github.com/repos/nikita-volkov/record-preprocessor/issues/2","labels_url":"https://api.github.com/repos/nikita-volkov/record-preprocessor/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/nikita-volkov/record-preprocessor/issues/2/comments","events_url":"https://api.github.com/repos/nikita-volkov/record-preprocessor/issues/2/events","html_url":"https://github.com/nikita-volkov/record-preprocessor/issues/2","id":95493537,"number":2,"title":"It would be nice if `record-preprocessor` was usable as a GHC custom preprocessor","user":{"login":"magthe","id":327270,"avatar_url":"https://avatars.githubusercontent.com/u/327270?v=3","gravatar_id":"","url":"https://api.github.com/users/magthe","html_url":"https://github.com/magthe","followers_url":"https://api.github.com/users/magthe/followers","following_url":"https://api.github.com/users/magthe/following{/other_user}","gists_url":"https://api.github.com/users/magthe/gists{/gist_id}","starred_url":"https://api.github.com/users/magthe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magthe/subscriptions","organizations_url":"https://api.github.com/users/magthe/orgs","repos_url":"https://api.github.com/users/magthe/repos","events_url":"https://api.github.com/users/magthe/events{/privacy}","received_events_url":"https://api.github.com/users/magthe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-16T18:17:03Z","updated_at":"2015-07-16T18:17:03Z","closed_at":null,"body":"My current setup is\r\n\r\n~~~\r\n[I] % ghc-pkg list |grep record\r\n    record-0.4.0.2\r\n    record-preprocessor-0.1.0.3\r\n    record-syntax-0.1.0.2\r\n~~~\r\n\r\nAs a first step I tried to process the demo, which works beautifully.  Then I tried getting Ghc to run the preprocessor on its own and added\r\n\r\n~~~\r\n{-# OPTIONS_ghc -F -pgmF record-preprocessor #-}\r\n~~~\r\n\r\nto the top of the file.  Which resulted in\r\n\r\n~~~\r\n[I] % ghc Main.hs\r\n\r\nError at 2:0:0:\r\n     \"m\"; \"m\"; \"m\"; \"m\"; pragma; blockComment; inlineComment\r\n~~~\r\n\r\nIt would be nice if `record-preprocessor` were usable in this way."}}