sop-extras-0.2.0.0: Type-level and data utilities that build upon SOP.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.SOP.Tails

Description

Intended for qualified import

import           Data.SOP.Tails (Tails(..))
import qualified Data.SOP.Tails as Tails
Synopsis

Documentation

data Tails f xs where Source #

For every tail (x ': xs) of the list, an f x y for every y in xs

Constructors

TNilTails f '[] 
TConsNP (f x) xs → Tails f xs → Tails f (x ': xs) 

Convenience constructors

mk1Tails f '[x] Source #

mk2 ∷ f x y → Tails f '[x, y] Source #

mk3 ∷ f x y → f x z → f y z → Tails f '[x, y, z] Source #

SOP-like operators

hcmap ∷ ∀ proxy c f g xs. All c xs ⇒ proxy c → (∀ x y. (c x, c y) ⇒ f x y → g x y) → Tails f xs → Tails g xs Source #

hcpure ∷ ∀ proxy f c xs. All c xs ⇒ proxy c → (∀ x y. (c x, c y) ⇒ f x y) → Tails f xs Source #

hmapSListI xs ⇒ (∀ x y. f x y → g x y) → Tails f xs → Tails g xs Source #

hpureSListI xs ⇒ (∀ x y. f x y) → Tails f xs Source #