You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--| The vertices of a strongly connected component.
flattenSCC::SCCvertex-> [vertex]
flattenSCC (AcyclicSCC v) = [v]
flattenSCC (NECyclicSCC vs) =NE.toList vs
In course of the new x-partial warning of GHC 9.8, this is a bit inconvenient, since GHC will now cry about head . flattenSCC and similar.
The more correct type of flattenSCC is SCC vertex -> Data.List.NonEmpty.NonEmpty vertex, but in order not to break everyone's code I suggest to add a new function flattenSCC1 instead.
Should this maybe have gone into containers-0.7?
The text was updated successfully, but these errors were encountered:
I don't have a strong opinion either way. I'd lean toward adding the function because it seems a bit odd to give the less informative version its own name but not the more informative one.
The
flattenSCC
function throws away the knowledge that a SCC is a non-empty list of vertices:containers/containers/src/Data/Graph.hs
Lines 248 to 251 in a4e8d16
In course of the new
x-partial
warning of GHC 9.8, this is a bit inconvenient, since GHC will now cry abouthead . flattenSCC
and similar.The more correct type of
flattenSCC
isSCC vertex -> Data.List.NonEmpty.NonEmpty vertex
, but in order not to break everyone's code I suggest to add a new functionflattenSCC1
instead.Should this maybe have gone into
containers-0.7
?The text was updated successfully, but these errors were encountered: