Skip to content

Commit

Permalink
Merge pull request #8 from stefan-hoeck/hconst
Browse files Browse the repository at this point in the history
[ new ] added hconst utility
  • Loading branch information
stefan-hoeck authored Nov 15, 2023
2 parents be1a8c0 + 4440d7a commit 0290a07
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Data/List/Quantifiers/Extra.idr
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ namespace All
hfill {ks = []} g = []
hfill {ks = v::vs} g = g v :: hfill g

public export %inline
hconst : {ks : _} -> t -> All (Prelude.const t) ks
hconst = hfill . const

public export
hpure : All (Prelude.const ()) ks => ({0 v : k} -> f v) -> All f ks
hpure @{[]} fun = []
Expand Down

0 comments on commit 0290a07

Please sign in to comment.