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

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -