Skip to content

Commit

Permalink
Make commit with thoughts from #120 description
Browse files Browse the repository at this point in the history
  • Loading branch information
Ericson2314 authored Dec 30, 2019
1 parent ef7ab22 commit 7116068
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/Rhyolite/Frontend/App.hs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ functorToWire
, QueryResult (q SelectedCount) ~ v SelectedCount)
=> QueryMorphism (q SelectedCount) (q ())
functorToWire = QueryMorphism
{ _queryMorphism_mapQuery = mapMaybe (\n -> if n <= 0 then Nothing else Just ())
{ -- TODO in principle the <= 0 case should never happen.
-- Perhaps we should error / impure log / always `Just ()` / etc.,
-- but we'd need to track down a bunch of instsances first.
_queryMorphism_mapQuery = mapMaybe (\n -> if n <= 0 then Nothing else Just ())
, _queryMorphism_mapQueryResult = fmap (const (SelectedCount 1))
}

Expand Down

0 comments on commit 7116068

Please sign in to comment.