HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulefcf-containers-0.8.2Haskell2010

Fcf.Data.List.Utils

Fcf.Data.List.Utils

Some of the following methods would probably have better place at the first-class-families library. That is, polish and make a PR.

Synopsis
Example2 expressions
import qualified GHC.TypeLits as TLimport           Fcf.Data.Nat
datadata Foldl (c :: b -> a -> Exp b) (d :: b) (e :: t a) (f :: b)

Foldl in terms of Foldr.

Example
Example1 expression
:kind! Eval (Foldl (Fcf.-) 10 '[3,2,1])Eval (Foldl (Fcf.-) 10 '[3,2,1]) :: TL.Natural= 4
Instances1Eval
datadata MaybeToList (b :: Maybe a) (c :: [a])

Turn Maybe into a list.

Example
Example1 expression
:kind! Eval (MaybeToList ('Just 1))Eval (MaybeToList ('Just 1)) :: [TL.Natural]= '[1]
Instances2Eval