{"action":"created","issue":{"url":"https://api.github.com/repos/dhall-lang/dhall-haskell/issues/299","repository_url":"https://api.github.com/repos/dhall-lang/dhall-haskell","labels_url":"https://api.github.com/repos/dhall-lang/dhall-haskell/issues/299/labels{/name}","comments_url":"https://api.github.com/repos/dhall-lang/dhall-haskell/issues/299/comments","events_url":"https://api.github.com/repos/dhall-lang/dhall-haskell/issues/299/events","html_url":"https://github.com/dhall-lang/dhall-haskell/issues/299","id":299965049,"number":299,"title":"Error message seems wrong.","user":{"login":"guaraqe","id":8742040,"avatar_url":"https://avatars0.githubusercontent.com/u/8742040?v=4","gravatar_id":"","url":"https://api.github.com/users/guaraqe","html_url":"https://github.com/guaraqe","followers_url":"https://api.github.com/users/guaraqe/followers","following_url":"https://api.github.com/users/guaraqe/following{/other_user}","gists_url":"https://api.github.com/users/guaraqe/gists{/gist_id}","starred_url":"https://api.github.com/users/guaraqe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guaraqe/subscriptions","organizations_url":"https://api.github.com/users/guaraqe/orgs","repos_url":"https://api.github.com/users/guaraqe/repos","events_url":"https://api.github.com/users/guaraqe/events{/privacy}","received_events_url":"https://api.github.com/users/guaraqe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-02-24T19:14:58Z","updated_at":"2018-02-26T20:22:25Z","closed_at":null,"author_association":"NONE","body":"I am using `dhall-1.9.1`, commit 7f29209ffd423bdce1bf03ea87003db8637c544a.\r\n\r\nI am playing with fixed points, and defined lists using them. By using `dhall --explain`, I get the following error:\r\n\r\n```dhall\r\nYou tried to invoke the following function:                                     \r\n                                                                                \r\n↳ Fixer                                                                \r\n                                                                                \r\n... which expects an argument of type or kind:                                  \r\n                                                                                \r\n↳ < Nil : {} | Cons : { fst : a, snd : FixI (λ(b : Type) → < Nil : {} | Cons : { fst : a, snd : b } >) } > \r\n                                                                                \r\n... on the following argument:                                                  \r\n                                                                                \r\n↳ < Nil = {=} | Cons : { fst : a, snd : FixI (λ(b : Type) → < Nil : {} | Cons : { fst : a, snd : b } >) } > \r\n                                                                                \r\n... which has a different type or kind:                                         \r\n                                                                                \r\n↳ < Cons : { fst : a, snd : FixI (λ(b : Type) → < Nil : {} | Cons : { fst : a, snd : b } >) } | Nil : {} > \r\n```\r\n\r\nThese lines seem very strange for me, as it seems that there is only a change in the order of the arguments of the union type. The code that gives such error is the following.\r\n\r\n```dhall\r\n-- Equivalent to Fix in Haskell\r\nlet\r\n  Fix : (Type → Type) → Type =\r\n    λ(f : Type → Type) →\r\n    ∀(FixI : (Type → Type) → Type) →\r\n    ∀(Fixer : f (FixI f) → FixI f) →\r\n    FixI f\r\n\r\n-- Functor that generates linked lists\r\nin let\r\n  LListF : Type → Type → Type =\r\n    λ(a : Type) →\r\n    λ(b : Type) →\r\n    < Nil : {} | Cons : { fst : a, snd : b } >\r\n\r\n-- Lists defined as fixed points\r\nin let\r\n  LList : Type → Type =\r\n    λ(a : Type) →\r\n    Fix (LListF a)\r\n\r\n-- Polymorphic empty list\r\nin let\r\n  nil : ∀(a : Type) → LList a =\r\n    λ(a : Type) →\r\n    λ(FixI : (Type → Type) → Type) →\r\n    let\r\n      LListI = FixI (LListF a)\r\n    in\r\n-- Offending expression\r\n      λ(Fixer : LListF a LListI → LListI) →\r\n      Fixer < Nil = {=} | Cons : { fst : a, snd : LListI } >\r\nin\r\n  nil\r\n```\r\n\r\nI am unable to understand if this a problem in my code or in `dhall`.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/dhall-lang/dhall-haskell/issues/comments/368637187","html_url":"https://github.com/dhall-lang/dhall-haskell/issues/299#issuecomment-368637187","issue_url":"https://api.github.com/repos/dhall-lang/dhall-haskell/issues/299","id":368637187,"user":{"login":"guaraqe","id":8742040,"avatar_url":"https://avatars0.githubusercontent.com/u/8742040?v=4","gravatar_id":"","url":"https://api.github.com/users/guaraqe","html_url":"https://github.com/guaraqe","followers_url":"https://api.github.com/users/guaraqe/followers","following_url":"https://api.github.com/users/guaraqe/following{/other_user}","gists_url":"https://api.github.com/users/guaraqe/gists{/gist_id}","starred_url":"https://api.github.com/users/guaraqe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guaraqe/subscriptions","organizations_url":"https://api.github.com/users/guaraqe/orgs","repos_url":"https://api.github.com/users/guaraqe/repos","events_url":"https://api.github.com/users/guaraqe/events{/privacy}","received_events_url":"https://api.github.com/users/guaraqe/received_events","type":"User","site_admin":false},"created_at":"2018-02-26T20:22:25Z","updated_at":"2018-02-26T20:22:25Z","author_association":"NONE","body":"In this case, I am glad this was helpful! If there is something small where I can help just tell me."}}
{"actor":{"display_login":"guaraqe"}}