Closed
Description
Proposal: we already have in Data.List.Base
null : List A → Bool
null [] = true
null _ = false
so is it time to add (cf. #1538 etc.)
NonNull : List A → Set _
NonNull = T ∘ not ∘ null
etc.
with eg
instance
nonNull⇒nonZero[length] : {{ _ : NonNull xs }} → NonZero (length xs)
nonNull⇒nonZero[length] {xs = _ ∷ _} = _
etc.
together with some structure proxying for the type class for having a null
method and a NonNull
predicate... etc.
Metadata
Metadata
Assignees
Labels
No labels