<div dir="ltr">Hi,<div><br></div><div>I am using the type checker plugin interface and I am trying to produce some evidence for type class instances. During compilation of one of my examples I get this core-lint error:</div><div><br></div><div><div>*** Core Lint errors : in result of Simplifier ***</div><div><no location info>: Warning:</div><div>    [RHS of ds_a6bY :: (Set '["thres" :-> Int], Set (Unit Reader))]</div><div>    Bad getNth:</div><div>      Nth:0</div><div>        (Nth:2</div><div>           (Sub (Sym (TFCo:R:Inv[]Readerfg[0] <'["thres" :-> Int]>_N <'[]>_N))</div><div>            ; (Inv</div><div>                 <Reader>_N <'["thres" :-> Int]>_N (Sym TFCo:R:Unit[]Reader[0]))_R</div><div>            ; Sub</div><div>                (TFCo:R:Inv[]Readerfg[0] <'["thres" :-> Int]>_N <Unit Reader>_N)))</div><div>      Split '["thres" :-> Int] '[] (Union '["thres" :-> Int] '[])</div><div>      Split</div><div>        '["thres" :-> Int]</div><div>        (Unit Reader)</div><div>        (Union '["thres" :-> Int] (Unit Reader))</div></div><div><br></div><div>I suppose "getNth" refers to the constructor "EvTupleSel" from "EvTerm", "TcNthCo" from "TcCoercion" or to "NthCo" from "Coercion". But I never produce evidence of the shape "getNth".  My evidence production code can be found at [1] and the only place where evidence of this shape can come from is my "evaluateType" function [2] that calls "normaliseType" from the GHC module "FamInstEnv". You can reproduce the error by checking out commit 144525886ec107af6f1283b26b19f8125c980aa4 from [3] and running "make effect-example" in the top directory of the repository (GHC 7.10 or better is required and a sandbox is automatically created).</div><div><br></div><div>The core-lint error does not seem to have any negative consequences when ignored. The produced executable works fine. Can somebody explain why it appears and maybe how I can fix it?</div><div><br></div><div>Thank you!</div><div>Jan</div><div><br></div><div>[1] <a href="https://github.com/jbracker/polymonad-plugin/blob/144525886ec107af6f1283b26b19f8125c980aa4/src/Control/Polymonad/Plugin/Evidence.hs#L177">https://github.com/jbracker/polymonad-plugin/blob/144525886ec107af6f1283b26b19f8125c980aa4/src/Control/Polymonad/Plugin/Evidence.hs#L177</a></div><div>[2] <a href="https://github.com/jbracker/polymonad-plugin/blob/144525886ec107af6f1283b26b19f8125c980aa4/src/Control/Polymonad/Plugin/Evaluate.hs#L29">https://github.com/jbracker/polymonad-plugin/blob/144525886ec107af6f1283b26b19f8125c980aa4/src/Control/Polymonad/Plugin/Evaluate.hs#L29</a></div><div>[3] <a href="https://github.com/jbracker/polymonad-plugin">https://github.com/jbracker/polymonad-plugin</a></div></div>