<div dir="ltr"><div><div><div><div>I know my question doesn't quite make sense and you can't have "multiple rigid type variables" but I couldn't think of a better way to characterize it or explain it. So I'll also try to give more detail below along with the code example and error at the end.<br></div><div><br>I have an inner join function using vinyl which does cool stuff like giving a type error if you try to join on a column that doesn't exist. I previously had an implementation that blindly built an index based on the left argument.<br><br></div>I then tried to dispatch based on the lengths of the left and right producer arguments. The problem is my return type is:<br><br>Rec f (as ++ bs)<br><br></div>That means I have two different producers, one of as and one of bs. I then do a case statement on the lengths and I want to store the producer to use for a given piece in that variable. The problem is ghc "pins" the type variable as either (Rec f as) or (Rec f bs) when I need to make that choice at runtime.<br><br><br></div>My code and error is both at github here: <a href="https://github.com/codygman/frames-diff/blob/inner-join-fix/Frames/Diff.hs#L113">https://github.com/codygman/frames-diff/blob/inner-join-fix/Frames/Diff.hs#L113</a><br><br></div>and below:<br><br><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> <span class="gmail-pl-c">|</span> Performs an inner join and keeps any duplicate column</span>
<table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC110" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> Recommend keeping columns in producers disjoint because accessing</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC111" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> anything but the leftmost duplicate column could prove difficult.</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC112" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> see: <a href="https://github.com/VinylRecords/Vinyl/issues/55#issuecomment-269891633">https://github.com/VinylRecords/Vinyl/issues/55#issuecomment-269891633</a></span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC113" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line" style="background-color:rgb(248,238,199)">innerJoin <span class="gmail-pl-k">::</span> (<span class="gmail-pl-en">MonadIO</span> <span class="gmail-pl-smi">m</span>, <span class="gmail-pl-en"><span class="gmail-pl-e">Ord</span></span> <span class="gmail-pl-smi">k</span>) <span class="gmail-pl-k">=</span>></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC114" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-ent">Producer</span> (<span class="gmail-pl-ent">Rec</span> f leftRows) <span class="gmail-pl-ent">IO</span> <span class="gmail-pl-c1">()</span> <span class="gmail-pl-c"><span class="gmail-pl-c">--</span> leftProducer</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC115" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> -> <span class="gmail-pl-ent">Getting</span> k (<span class="gmail-pl-ent">Rec</span> f leftRows) k <span class="gmail-pl-c"><span class="gmail-pl-c">--</span> leftProducer lens</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC116" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> -> <span class="gmail-pl-ent">Producer</span> (<span class="gmail-pl-ent">Rec</span> f rightRows) <span class="gmail-pl-ent">IO</span> <span class="gmail-pl-c1">()</span> <span class="gmail-pl-c"><span class="gmail-pl-c">--</span> rightProducer</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC117" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> -> <span class="gmail-pl-ent">Getting</span> k (<span class="gmail-pl-ent">Rec</span> f rightRows) k <span class="gmail-pl-c"><span class="gmail-pl-c">--</span> rightProducer lens</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC118" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> -> m (<span class="gmail-pl-ent"><span class="gmail-pl-c1">P.</span>Proxy</span> <span class="gmail-pl-ent"><span class="gmail-pl-c1">P.</span>X</span> <span class="gmail-pl-c1">()</span> <span class="gmail-pl-c1">()</span> (<span class="gmail-pl-ent">Rec</span> f (leftRows ++ rightRows)) <span class="gmail-pl-ent">IO</span> <span class="gmail-pl-c1">()</span>)</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC119" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">innerJoin leftProducer leftLens rightProducer rightLens = <span class="gmail-pl-k">do</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC120" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> leftProducerLen <- <span class="gmail-pl-c1">P.</span>liftIO $ <span class="gmail-pl-c1">P.</span><span class="gmail-pl-c1">length</span> leftProducer</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC121" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> rightProducerLen <- <span class="gmail-pl-c1">P.</span>liftIO $ <span class="gmail-pl-c1">P.</span><span class="gmail-pl-c1">length</span> rightProducer</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC122" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">
</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC123" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-k">let</span> curProducer = <span class="gmail-pl-k">case</span> rightProducerLen < leftProducerLen <span class="gmail-pl-k">of</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC124" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-ent"><span class="gmail-pl-c1">True</span></span> -> rightProducer</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC125" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-c"><span class="gmail-pl-c">--</span> False -> leftProducer</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC126" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">
</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC127" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-k">let</span> curKeymapProducer = <span class="gmail-pl-k">case</span> rightProducerLen < leftProducerLen <span class="gmail-pl-k">of</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC128" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-ent"><span class="gmail-pl-c1">True</span></span> -> leftProducer</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC129" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-c"><span class="gmail-pl-c">--</span> False -> rightProducer</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC130" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">
</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC131" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-k">let</span> curLensLookup = <span class="gmail-pl-k">case</span> rightProducerLen < leftProducerLen <span class="gmail-pl-k">of</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC132" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-ent"><span class="gmail-pl-c1">True</span></span> -> rightLens</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC133" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-c"><span class="gmail-pl-c">--</span> False -> leftLens</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC134" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">
</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC135" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-k">let</span> curLensInsert = <span class="gmail-pl-k">case</span> rightProducerLen < leftProducerLen <span class="gmail-pl-k">of</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC136" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-ent"><span class="gmail-pl-c1">True</span></span> -> leftLens</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC137" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-c"><span class="gmail-pl-c">--</span> False -> rightLens</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC138" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">
</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC139" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">
</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC140" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-k">let</span> appender km row = <span class="gmail-pl-k">case</span> rightProducerLen < leftProducerLen <span class="gmail-pl-k">of</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC141" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-ent"><span class="gmail-pl-c1">True</span></span> -> <span class="gmail-pl-k">case</span> <span class="gmail-pl-c1">M.</span><span class="gmail-pl-c1">lookup</span> (view curLensLookup row) km <span class="gmail-pl-k">of</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC142" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-ent"><span class="gmail-pl-c1">Just</span></span> otherRow -> <span class="gmail-pl-c1">pure</span> $ rappend otherRow row</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC143" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-ent"><span class="gmail-pl-c1">Nothing</span></span> -> <span class="gmail-pl-c1">P.</span>mzero</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC144" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-c"><span class="gmail-pl-c">--</span> False -> case M.lookup (view curLensLookup row) km of</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC145" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-c"><span class="gmail-pl-c">--</span> Just otherRow -> pure $ rappend row otherRow</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC146" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-c"><span class="gmail-pl-c">--</span> Nothing -> P.mzero</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC147" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">
</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC148" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> keyMap <- <span class="gmail-pl-c1">P.</span>liftIO $ <span class="gmail-pl-c1">P.</span>fold (\m r -> <span class="gmail-pl-c1">M.</span>insert (view curLensInsert r) r m) <span class="gmail-pl-c1">M.</span>empty <span class="gmail-pl-c1">id</span> curKeymapProducer</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC149" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">
</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC150" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-c1">pure</span> $ curProducer >-> <span class="gmail-pl-c1">P.</span><span class="gmail-pl-c1">mapM</span> (\r -> appender keyMap r)</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC151" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">
</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC152" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> error if I uncomment my false cases (specifically the False case for curProducer)</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC153" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> [5 of 5] Compiling Frames.Diff ( Frames/Diff.hs, interpreted )</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC154" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">
</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC155" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> Frames/Diff.hs:125:32: error:</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC156" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> • Couldn't match type ‘leftRows’ with ‘rightRows’</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC157" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> ‘leftRows’ is a rigid type variable bound by</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC158" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> the type signature for:</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC159" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> innerJoin :: forall (m :: * -> *) k (f :: *</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC160" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> -> *) (leftRows :: [*]) (rightRows :: [*]).</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC161" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> (MonadIO m, Ord k) =></span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC162" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> Producer (Rec f leftRows) IO ()</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC163" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> -> Getting k (Rec f leftRows) k</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC164" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> -> Producer (Rec f rightRows) IO ()</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC165" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> -> Getting k (Rec f rightRows) k</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC166" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> -> m (P.Proxy P.X () () (Rec f (leftRows ++ rightRows)) IO ())</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC167" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> at Frames/Diff.hs:113:14</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC168" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> ‘rightRows’ is a rigid type variable bound by</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC169" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> the type signature for:</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC170" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> innerJoin :: forall (m :: * -> *) k (f :: *</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC171" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> -> *) (leftRows :: [*]) (rightRows :: [*]).</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC172" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> (MonadIO m, Ord k) =></span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC173" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> Producer (Rec f leftRows) IO ()</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC174" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> -> Getting k (Rec f leftRows) k</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC175" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> -> Producer (Rec f rightRows) IO ()</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC176" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> -> Getting k (Rec f rightRows) k</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC177" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> -> m (P.Proxy P.X () () (Rec f (leftRows ++ rightRows)) IO ())</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC178" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> at Frames/Diff.hs:113:14</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC179" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> Expected type: Producer (Rec f rightRows) IO ()</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC180" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> Actual type: Producer (Rec f leftRows) IO ()</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC181" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> • In the expression: leftProducer</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC182" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> In a case alternative: False -> leftProducer</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC183" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> In the expression:</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC184" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> case rightProducerLen < leftProducerLen of {</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC185" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> True -> rightProducer</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC186" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> False -> leftProducer }</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC187" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> • Relevant bindings include</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC188" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> curProducer :: Producer (Rec f rightRows) IO ()</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC189" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> (bound at Frames/Diff.hs:123:7)</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC190" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> rightLens :: Getting k (Rec f rightRows) k</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC191" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> (bound at Frames/Diff.hs:119:47)</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC192" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> rightProducer :: Producer (Rec f rightRows) IO ()</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC193" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> (bound at Frames/Diff.hs:119:33)</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC194" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> leftLens :: Getting k (Rec f leftRows) k</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC195" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> (bound at Frames/Diff.hs:119:24)</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC196" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> leftProducer :: Producer (Rec f leftRows) IO ()</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC197" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> (bound at Frames/Diff.hs:119:11)</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC198" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> innerJoin :: Producer (Rec f leftRows) IO ()</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC199" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> -> Getting k (Rec f leftRows) k</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC200" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> -> Producer (Rec f rightRows) IO ()</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC201" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> -> Getting k (Rec f rightRows) k</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC202" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> -> m (P.Proxy P.X () () (Rec f (leftRows ++ rightRows)) IO ())</span></td>
</tr>
<tr>
</tr></tbody></table><span class="gmail-pl-c"><span class="gmail-pl-c">--</span> (bound at Frames/Diff.hs:119:1)</span><br></div>