Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions sop-core/src/Data/SOP/Dict.hs
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,11 @@ all_NP (Dict :* ds) = withDict (all_NP ds) Dict
--
-- @since 0.2
--
all_POP :: SListI xss => POP (Dict c) xss -> Dict (All2 c) xss
all_POP = all2 . all_NP . hmap all_NP . unPOP
-- TODO: Is the constraint necessary?
all_POP :: POP (Dict c) xss -> Dict (All2 c) xss
all_POP = all2 . all_NP . map_NP' all_NP . unPOP where
map_NP' :: (forall x. f x -> g x) -> NP f xs -> NP g xs
map_NP' _ Nil = Nil
map_NP' f (x :* xs) = f x :* map_NP' f xs

-- | The constraint @'All2' c@ is convertible to @'All' ('All' c)@.
--
Expand Down