{"action":"opened","issue":{"url":"https://api.github.com/repos/FStarLang/FStar/issues/158","labels_url":"https://api.github.com/repos/FStarLang/FStar/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/FStarLang/FStar/issues/158/comments","events_url":"https://api.github.com/repos/FStarLang/FStar/issues/158/events","html_url":"https://github.com/FStarLang/FStar/issues/158","id":61358443,"number":158,"title":"Unable to compile total implementation of foldl.","user":{"login":"fmrl","id":630620,"avatar_url":"https://avatars.githubusercontent.com/u/630620?v=3","gravatar_id":"","url":"https://api.github.com/users/fmrl","html_url":"https://github.com/fmrl","followers_url":"https://api.github.com/users/fmrl/followers","following_url":"https://api.github.com/users/fmrl/following{/other_user}","gists_url":"https://api.github.com/users/fmrl/gists{/gist_id}","starred_url":"https://api.github.com/users/fmrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fmrl/subscriptions","organizations_url":"https://api.github.com/users/fmrl/orgs","repos_url":"https://api.github.com/users/fmrl/repos","events_url":"https://api.github.com/users/fmrl/events{/privacy}","received_events_url":"https://api.github.com/users/fmrl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-14T02:16:36Z","updated_at":"2015-03-14T02:16:36Z","closed_at":null,"body":"I'm attempting to write a total implementation of foldl. I based it on the definition of fold_left in lib/lists.fst. It does not compile and I am unsure of what is not correct:\r\n\r\n```\r\nmodule Module\r\n\r\n   val tot_foldl: ('a -> 'b -> Tot 'a) -> 'a -> list 'b -> Tot 'a\r\n   let rec tot_foldl f a l =\r\n      match l with\r\n        | [] -> a\r\n        | hd::tl -> tot_foldl f (f a hd) tl\r\n\r\n(*\r\nissue-tot_foldl-1.fst(5,6-14,0): Patterns are incomplete\r\nissue-tot_foldl-1.fst(7,41-7,43): Subtyping check failed; expected type _12742:(list 'b){(%[(f a hd); _12742] << %[a; l])}; got type (list 'b)\r\n*)\r\n```"}}