{"action":"opened","issue":{"url":"https://api.github.com/repos/NICTA/course/issues/131","labels_url":"https://api.github.com/repos/NICTA/course/issues/131/labels{/name}","comments_url":"https://api.github.com/repos/NICTA/course/issues/131/comments","events_url":"https://api.github.com/repos/NICTA/course/issues/131/events","html_url":"https://github.com/NICTA/course/issues/131","id":70584551,"number":131,"title":"List.hs doctest with base-4.8.0.0","user":{"login":"zaquest","id":577334,"avatar_url":"https://avatars.githubusercontent.com/u/577334?v=3","gravatar_id":"","url":"https://api.github.com/users/zaquest","html_url":"https://github.com/zaquest","followers_url":"https://api.github.com/users/zaquest/followers","following_url":"https://api.github.com/users/zaquest/following{/other_user}","gists_url":"https://api.github.com/users/zaquest/gists{/gist_id}","starred_url":"https://api.github.com/users/zaquest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zaquest/subscriptions","organizations_url":"https://api.github.com/users/zaquest/orgs","repos_url":"https://api.github.com/users/zaquest/repos","events_url":"https://api.github.com/users/zaquest/events{/privacy}","received_events_url":"https://api.github.com/users/zaquest/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-24T04:34:39Z","updated_at":"2015-04-24T04:34:39Z","closed_at":null,"body":"Since `base-4.8.0.0` type of `Prelude.foldr` changed from `(a -> b -> b) -> b -> [a] -> b` to `Foldable t => (a -> b -> b) -> b -> t a -> b` that causes an issue with doctests in `src/Course/List.hs` file\r\n```\r\n> doctest -isrc -Wall -fno-warn-type-defaults src/Course/List.hs\r\n\r\nsrc/Course/Core.hs:50:1: Warning:\r\n    The import of ‘Char’ from module ‘Prelude’ is redundant\r\nsrc/Course/Core.hs:50:1: Warning:\r\n    The import of ‘Char’ from module ‘Prelude’ is redundant\r\n### Failure in src/Course/List.hs:28: expression `instance Arbitrary a => Arbitrary (List a) where arbitrary = P.fmap (P.foldr (:.) Nil) arbitrary'\r\nexpected:\r\n but got:\r\n          <interactive>:26:70:\r\n              Could not deduce (P.Foldable t0) arising from a use of ‘P.foldr’\r\n              from the context (Arbitrary a)\r\n                bound by the instance declaration at <interactive>:26:10-42\r\n              The type variable ‘t0’ is ambiguous\r\n              Note: there are several potential instances:\r\n                instance P.Foldable (A.Const m) -- Defined in ‘Control.Applicative’\r\n                instance P.Foldable (Either a) -- Defined in ‘Data.Foldable’\r\n                instance P.Foldable Data.Proxy.Proxy -- Defined in ‘Data.Foldable’\r\n                ...plus five others\r\n              In the first argument of ‘P.fmap’, namely ‘(P.foldr (:.) Nil)’\r\n              In the expression: P.fmap (P.foldr (:.) Nil) arbitrary\r\n              In an equation for ‘arbitrary’:\r\n                  arbitrary = P.fmap (P.foldr (:.) Nil) arbitrary\r\n\r\n          <interactive>:26:88:\r\n              Could not deduce (Arbitrary (t0 a))\r\n                arising from a use of ‘arbitrary’\r\n              from the context (Arbitrary a)\r\n                bound by the instance declaration at <interactive>:26:10-42\r\n              The type variable ‘t0’ is ambiguous\r\n              Relevant bindings include\r\n                arbitrary :: Gen (List a) (bound at <interactive>:26:50)\r\n              Note: there are several potential instances:\r\n                instance [overlap ok] [safe] (P.RealFloat a, Arbitrary a) =>\r\n                                             Arbitrary (Data.Complex.Complex a)\r\n                  -- Defined in ‘Test.QuickCheck.Arbitrary’\r\n                instance [overlap ok] [safe] (Arbitrary a, Arbitrary b) =>\r\n                                             Arbitrary (Either a b)\r\n                  -- Defined in ‘Test.QuickCheck.Arbitrary’\r\n                instance [overlap ok] [safe] Data.Fixed.HasResolution a =>\r\n                                             Arbitrary (Data.Fixed.Fixed a)\r\n                  -- Defined in ‘Test.QuickCheck.Arbitrary’\r\n                ...plus 9 others\r\n              In the second argument of ‘P.fmap’, namely ‘arbitrary’\r\n              In the expression: P.fmap (P.foldr (:.) Nil) arbitrary\r\n              In an equation for ‘arbitrary’:\r\n                  arbitrary = P.fmap (P.foldr (:.) Nil) arbitrary\r\nExamples: 55  Tried: 4  Errors: 0  Failures: 1\r\n```\r\nThe simple fix is to replace line\r\n``` -- >>> instance Arbitrary a => Arbitrary (List a) where arbitrary = P.fmap (P.foldr (:.) Nil) arbitrary```\r\nwith\r\n``` -- >>> instance Arbitrary a => Arbitrary (List a) where arbitrary = P.fmap ((P.foldr :: (a -> List a -> List a) -> List a -> [a] -> List a) (:.) Nil) arbitrary```\r\nHowever, I am not sure if it's the best solution."}}