idris - Unsolved metavariable for function that has no inhabited arguments -


i getting unsolved metavariable foo in code below:

namespace funs   data funs : type -> type     nil : funs     (::) : {b : type} -> (a -> list b) -> funs (list a) -> funs (list a)    data funptr : funs -> type -> type     here : funptr ((::) {b} _ bs) b     there : funptr bs b -> funptr (_ :: bs) b  total foo : funptr [] b -> void 

how convince idris foo has no valid patterns match on?

i've tried adding

foo f = ?foo 

and doing case split in emacs on f (just see might come up), removes line, leaving foo unsolved meta.

it turns out need enumerate possible patterns foo's argument, , idris able figure out, 1 one, un-unifyable foo's type:

foo : funptr [] b -> void foo here impossible foo (there _) impossible 

Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -