<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Greetings!<div class=""><br class=""></div><div class="">I’m stuck:</div><div class=""><br class=""></div><div class="">```hs</div><div class=""><div style="color: rgb(122, 95, 47); background-color: rgb(255, 255, 255); font-family: "Ubuntu Mono", "DejaVu Sans Mono", "Droid Sans Mono", monospace, monospace, "Droid Sans Fallback", Menlo, Monaco, "Courier New", monospace; font-size: 14px; line-height: 21px; white-space: pre;" class=""><div class=""><span style="color: rgb(197, 174, 159);" class="">-- | a named (with a selector) field</span></div><div class=""><span style="color: rgb(218, 65, 57);" class="">instance</span></div><div class=""><span style="color: rgb(113, 87, 48);" class=""> </span>(<span style="color: rgb(82, 134, 194);" class="">KnownSymbol</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(57, 112, 165);" class="">sel</span>,<span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(82, 134, 194);" class="">DbaStorable'</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(57, 112, 165);" class="">f</span>,<span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(57, 112, 165);" class="">f</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(82, 134, 194);" class="">~</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(82, 134, 194);" class="">K1</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(82, 134, 194);" class="">R</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(57, 112, 165);" class="">c</span>,<span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(82, 134, 194);" class="">DbaField</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(57, 112, 165);" class="">c</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(57, 112, 165);" class="">ft</span>,<span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(82, 134, 194);" class="">Typeable</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(57, 112, 165);" class="">c</span>)<span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(218, 65, 57); font-weight: bold;" class="">=></span></div><div class=""><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(82, 134, 194);" class="">DbaStorable'</span><span style="color: rgb(113, 87, 48);" class=""> </span>(<span style="color: rgb(82, 134, 194);" class="">M1</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(82, 134, 194);" class="">S</span><span style="color: rgb(113, 87, 48);" class=""> </span>(<span style="color: rgb(173, 216, 72);" class="">'</span><span style="color: rgb(82, 134, 194);" class="">MetaSel</span><span style="color: rgb(113, 87, 48);" class=""> </span>(<span style="color: rgb(173, 216, 72);" class="">'</span><span style="color: rgb(82, 134, 194);" class="">Just</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(57, 112, 165);" class="">sel</span>)<span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(57, 112, 165);" class="">su</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(57, 112, 165);" class="">ss</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(57, 112, 165);" class="">ds</span>)<span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(57, 112, 165);" class="">f</span>)</div><div class=""><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(218, 65, 57);" class="">where</span></div><div class=""><span style="color: rgb(197, 174, 159);" class=""> --</span></div><br class=""><div class=""><span style="color: rgb(113, 87, 48);" class=""> _loadDbaField store bsp fno cno vin </span><span style="color: rgb(218, 65, 57); font-weight: bold;" class="">=</span></div><div class=""><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(219, 165, 48);" class="">M1</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(150, 210, 37);" class=""><$></span><span style="color: rgb(113, 87, 48);" class=""> _loadDbaField store fsp fno cno vin</span></div><div class=""><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(218, 65, 57);" class="">where</span></div><div class=""><span style="color: rgb(113, 87, 48);" class=""> fieldName </span><span style="color: rgb(218, 65, 57); font-weight: bold;" class="">=</span><span style="color: rgb(113, 87, 48);" class=""> symbolVal </span>(<span style="color: rgb(219, 165, 48);" class="">Proxy</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(18, 71, 101);" class="">@</span><span style="color: rgb(57, 112, 165);" class="">sel</span>)</div><div class=""><span style="color: rgb(113, 87, 48);" class=""> fieldPath </span><span style="color: rgb(218, 65, 57); font-weight: bold;" class="">=</span><span style="color: rgb(113, 87, 48);" class=""> fieldName </span><span style="color: rgb(150, 210, 37);" class="">++</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(111, 125, 131);" class="">"::"</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(150, 210, 37);" class="">++</span><span style="color: rgb(113, 87, 48);" class=""> dbaBasePath </span><span style="color: rgb(18, 71, 101);" class="">@</span><span style="color: rgb(57, 112, 165);" class="">c</span></div><div class=""><span style="color: rgb(113, 87, 48);" class=""> fsp </span><span style="color: rgb(218, 65, 57); font-weight: bold;" class="">=</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(218, 65, 57);" class="">case</span><span style="color: rgb(113, 87, 48);" class=""> bsp </span><span style="color: rgb(218, 65, 57);" class="">of</span></div><div class=""><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(111, 125, 131);" class="">""</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(218, 65, 57); font-weight: bold;" class="">-></span><span style="color: rgb(113, 87, 48);" class=""> fieldPath </span><span style="color: rgb(197, 174, 159);" class="">-- a field of a top level record</span></div><div class=""><span style="color: rgb(113, 87, 48);" class=""> _ </span><span style="color: rgb(218, 65, 57); font-weight: bold;" class="">-></span><span style="color: rgb(113, 87, 48);" class=""> bsp </span><span style="color: rgb(150, 210, 37);" class="">++</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(111, 125, 131);" class="">"/"</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(150, 210, 37);" class="">++</span><span style="color: rgb(113, 87, 48);" class=""> fieldPath </span><span style="color: rgb(197, 174, 159);" class="">-- a field of a nested record</span></div><br class=""><div class=""><span style="color: rgb(113, 87, 48);" class=""> _storeDbaField store bsp fno cno m</span><span style="color: rgb(219, 165, 48);" class="">@</span>(<span style="color: rgb(219, 165, 48);" class="">M1</span><span style="color: rgb(113, 87, 48);" class=""> xr</span>)<span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(218, 65, 57); font-weight: bold;" class="">=</span></div><div class=""><span style="color: rgb(113, 87, 48);" class=""> _storeDbaField store fsp fno cno xr</span></div><div class=""><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(218, 65, 57);" class="">where</span></div><div class=""><span style="color: rgb(113, 87, 48);" class=""> fieldName </span><span style="color: rgb(218, 65, 57); font-weight: bold;" class="">=</span><span style="color: rgb(113, 87, 48);" class=""> selName m</span></div><div class=""><span style="color: rgb(113, 87, 48);" class=""> fieldPath </span><span style="color: rgb(218, 65, 57); font-weight: bold;" class="">=</span><span style="color: rgb(113, 87, 48);" class=""> fieldName </span><span style="color: rgb(150, 210, 37);" class="">++</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(111, 125, 131);" class="">"::"</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(150, 210, 37);" class="">++</span><span style="color: rgb(113, 87, 48);" class=""> dbaBasePath </span><span style="color: rgb(18, 71, 101);" class="">@</span><span style="color: rgb(57, 112, 165);" class="">c</span></div><div class=""><span style="color: rgb(113, 87, 48);" class=""> fsp </span><span style="color: rgb(218, 65, 57); font-weight: bold;" class="">=</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(218, 65, 57);" class="">case</span><span style="color: rgb(113, 87, 48);" class=""> bsp </span><span style="color: rgb(218, 65, 57);" class="">of</span></div><div class=""><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(111, 125, 131);" class="">""</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(218, 65, 57); font-weight: bold;" class="">-></span><span style="color: rgb(113, 87, 48);" class=""> fieldPath </span><span style="color: rgb(197, 174, 159);" class="">-- a field of a top level record</span></div><div class=""><span style="color: rgb(113, 87, 48);" class=""> _ </span><span style="color: rgb(218, 65, 57); font-weight: bold;" class="">-></span><span style="color: rgb(113, 87, 48);" class=""> bsp </span><span style="color: rgb(150, 210, 37);" class="">++</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(111, 125, 131);" class="">"/"</span><span style="color: rgb(113, 87, 48);" class=""> </span><span style="color: rgb(150, 210, 37);" class="">++</span><span style="color: rgb(113, 87, 48);" class=""> fieldPath </span><span style="color: rgb(197, 174, 159);" class="">-- a field of a nested record</span></div><br class=""><div class=""><span style="color: rgb(113, 87, 48);" class=""></span></div></div></div><div class="">```</div><div class=""><br class=""></div><div class="">With the `selName` approach as in the `<span style="caret-color: rgb(113, 87, 48); color: rgb(113, 87, 48); font-family: "Ubuntu Mono", "DejaVu Sans Mono", "Droid Sans Mono", monospace, monospace, "Droid Sans Fallback", Menlo, Monaco, "Courier New", monospace; font-size: 14px; white-space: pre; background-color: rgb(255, 255, 255);" class="">_storeDbaField</span> ` above, it’s rejected as:</div><div class=""><br class=""></div><div class="">```log</div><div class=""><div class=""> • Could not deduce (GHC.Generics.SingI su)</div><div class=""> arising from a use of ‘selName’</div><div class=""> from the context: (KnownSymbol sel, DbaStorable' f, f ~ K1 R c,</div><div class=""> DbaField c ft, Typeable c)</div><div class=""> bound by the instance declaration</div><div class=""> at src/Frp/DbaStore/Internal.hs:(646,3)-(647,55)</div><div class=""> • In the expression: selName m</div><div class=""> In an equation for ‘fieldName’: fieldName = selName m</div><div class=""> In an equation for ‘_storeDbaField’:</div></div><div class="">```</div><div class=""><br class=""></div><div class="">But can I really evident `SingI` instance from my side? Which is unexpected from GHC.Generics...</div><div class=""><br class=""></div><div class="">Otherwise with the `symbolVal` approach as in the `<span style="caret-color: rgb(113, 87, 48); color: rgb(113, 87, 48); font-family: "Ubuntu Mono", "DejaVu Sans Mono", "Droid Sans Mono", monospace, monospace, "Droid Sans Fallback", Menlo, Monaco, "Courier New", monospace; font-size: 14px; white-space: pre; background-color: rgb(255, 255, 255);" class="">_loadDbaField</span> ` above, there’s the complain against the ultimate use site:</div><div class=""><br class=""></div><div class="">```log</div><div class=""><div class=""> • No instance for (GHC.TypeLits.KnownSymbol sel0)</div><div class=""> arising from a use of ‘storeDba’</div><div class=""> • In a stmt of a 'do' block: storeDba rootDir series'data</div><div class=""> In the expression:</div><div class=""> do forM_ series'data print</div><div class=""> storeDba rootDir series'data</div><div class=""> sd <- loadDba @(Envelope2D Double) rootDir</div><div class=""> forM_ sd print</div></div><div class="">```</div><div class=""><br class=""></div><div class="">But I failed to prove `KnownSymbol sel` with all methods I can think of.</div><div class=""><br class=""></div><div class="">Help please!</div><div class=""><br class=""></div><div class="">With best regards,</div><div class="">Compl</div><div class=""><br class=""></div></body></html>