{"action":"created","issue":{"url":"https://api.github.com/repos/clash-lang/clash-prelude/issues/27","labels_url":"https://api.github.com/repos/clash-lang/clash-prelude/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/clash-lang/clash-prelude/issues/27/comments","events_url":"https://api.github.com/repos/clash-lang/clash-prelude/issues/27/events","html_url":"https://github.com/clash-lang/clash-prelude/issues/27","id":108676570,"number":27,"title":"GHC HEAD compile error","user":{"login":"ggreif","id":1312006,"avatar_url":"https://avatars.githubusercontent.com/u/1312006?v=3","gravatar_id":"","url":"https://api.github.com/users/ggreif","html_url":"https://github.com/ggreif","followers_url":"https://api.github.com/users/ggreif/followers","following_url":"https://api.github.com/users/ggreif/following{/other_user}","gists_url":"https://api.github.com/users/ggreif/gists{/gist_id}","starred_url":"https://api.github.com/users/ggreif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggreif/subscriptions","organizations_url":"https://api.github.com/users/ggreif/orgs","repos_url":"https://api.github.com/users/ggreif/repos","events_url":"https://api.github.com/users/ggreif/events{/privacy}","received_events_url":"https://api.github.com/users/ggreif/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-28T15:03:45Z","updated_at":"2015-09-28T15:27:15Z","closed_at":null,"body":"(I tried `--ghc-options=\"-fplugin GHC.TypeLits.Normalise\"` but it did not help)\r\n\r\nMaybe below error messages ring a bell what could have gone wrong...\r\n\r\n```\r\n[21 of 42] Compiling CLaSH.Sized.Fixed ( src/CLaSH/Sized/Fixed.hs, dist/dist-sandbox-fa345477/build/CLaSH/Sized/Fixed.o )\r\n\r\nsrc/CLaSH/Sized/Fixed.hs:116:1: error:\r\n    Couldn't match representation of type ?a2?\r\n                             with that of ?rep (int + frac)?\r\n      arising from a use of ?coerce?\r\n    Relevant bindings include\r\n      minBound :: Fixed rep int frac\r\n        (bound at src/CLaSH/Sized/Fixed.hs:116:1)\r\n    In the expression:\r\n        coerce (minBound :: rep ((+) int frac)) :: Fixed rep int frac\r\n    In an equation for ?minBound?:\r\n        minBound\r\n          = coerce (minBound :: rep ((+) int frac)) :: Fixed rep int frac\r\n    When typechecking the code for ?minBound?\r\n      in a derived instance for ?Bounded (Fixed rep int frac)?:\r\n      To see the code I am typechecking, use -ddump-deriv\r\n    In the instance declaration for ?Bounded (Fixed rep int frac)?\r\n\r\nsrc/CLaSH/Sized/Fixed.hs:116:1: error:\r\n    Couldn't match representation of type ?a3?\r\n                             with that of ?rep (int + frac)?\r\n      arising from a use of ?coerce?\r\n    Relevant bindings include\r\n      maxBound :: Fixed rep int frac\r\n        (bound at src/CLaSH/Sized/Fixed.hs:116:1)\r\n    In the expression:\r\n        coerce (maxBound :: rep ((+) int frac)) :: Fixed rep int frac\r\n    In an equation for ?maxBound?:\r\n        maxBound\r\n          = coerce (maxBound :: rep ((+) int frac)) :: Fixed rep int frac\r\n    When typechecking the code for ?maxBound?\r\n      in a derived instance for ?Bounded (Fixed rep int frac)?:\r\n      To see the code I am typechecking, use -ddump-deriv\r\n    In the instance declaration for ?Bounded (Fixed rep int frac)?\r\n\r\nsrc/CLaSH/Sized/Fixed.hs:117:1: error:\r\n    Couldn't match representation of type ?a1?\r\n                             with that of ?rep (int + frac)?\r\n      arising from a use of ?coerce?\r\n    Relevant bindings include\r\n      def :: Fixed rep int frac (bound at src/CLaSH/Sized/Fixed.hs:117:1)\r\n    In the expression:\r\n        coerce (def :: rep ((+) int frac)) :: Fixed rep int frac\r\n    In an equation for ?def?:\r\n        def = coerce (def :: rep ((+) int frac)) :: Fixed rep int frac\r\n    When typechecking the code for ?def?\r\n      in a derived instance for ?Default (Fixed rep int frac)?:\r\n      To see the code I am typechecking, use -ddump-deriv\r\n    In the instance declaration for ?Default (Fixed rep int frac)?\r\n\r\nsrc/CLaSH/Sized/Fixed.hs:123:1: error:\r\n    Couldn't match representation of type ?a0?\r\n                             with that of ?rep (int + frac)?\r\n      arising from a use of ?coerce?\r\n    Relevant bindings include\r\n      zeroBits :: Fixed rep int frac\r\n        (bound at src/CLaSH/Sized/Fixed.hs:123:1)\r\n    In the expression:\r\n        coerce (zeroBits :: rep ((+) int frac)) :: Fixed rep int frac\r\n    In an equation for ?zeroBits?:\r\n        zeroBits\r\n          = coerce (zeroBits :: rep ((+) int frac)) :: Fixed rep int frac\r\n    When typechecking the code for ?zeroBits?\r\n      in a derived instance for ?Bits (Fixed rep int frac)?:\r\n      To see the code I am typechecking, use -ddump-deriv\r\n    In the instance declaration for ?Bits (Fixed rep int frac)?\r\nFailed to install clash-prelude-0.10\r\ncabal.lnk: Error: some packages failed to install:\r\nclash-prelude-0.10 failed during the building phase. The exception was:\r\nExitFailure 1\r\n```"},"comment":{"url":"https://api.github.com/repos/clash-lang/clash-prelude/issues/comments/143777652","html_url":"https://github.com/clash-lang/clash-prelude/issues/27#issuecomment-143777652","issue_url":"https://api.github.com/repos/clash-lang/clash-prelude/issues/27","id":143777652,"user":{"login":"ggreif","id":1312006,"avatar_url":"https://avatars.githubusercontent.com/u/1312006?v=3","gravatar_id":"","url":"https://api.github.com/users/ggreif","html_url":"https://github.com/ggreif","followers_url":"https://api.github.com/users/ggreif/followers","following_url":"https://api.github.com/users/ggreif/following{/other_user}","gists_url":"https://api.github.com/users/ggreif/gists{/gist_id}","starred_url":"https://api.github.com/users/ggreif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggreif/subscriptions","organizations_url":"https://api.github.com/users/ggreif/orgs","repos_url":"https://api.github.com/users/ggreif/repos","events_url":"https://api.github.com/users/ggreif/events{/privacy}","received_events_url":"https://api.github.com/users/ggreif/received_events","type":"User","site_admin":false},"created_at":"2015-09-28T15:27:15Z","updated_at":"2015-09-28T15:27:15Z","body":"Yep, I get an error:\r\n\r\n```\r\nCoerceBug.hs:11:16: error:\r\n    Couldn't match representation of type ?a0?\r\n                             with that of ?rep (int + frac)?\r\n      arising from a use of ?coerce?\r\n    Relevant bindings include\r\n      minBoundTest :: Fixed rep int frac (bound at CoerceBug.hs:11:1)\r\n    In the expression: coerce (minBound :: rep (int + frac))\r\n    In an equation for ?minBoundTest?:\r\n        minBoundTest = coerce (minBound :: rep (int + frac))\r\n```"}}