strict-sop-core-0.1.1.0: Strict replacement for NS and NP.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.SOP.Strict.NP

Contents

Description

Strict variant of NP

See sop-core's NP.

Synopsis

NP

data NP f xs where Source #

Constructors

NilNP f '[] 
(:*) ∷ !(f x) → !(NP f xs) → NP f (x ': xs) infixr 5 

Instances

Instances details
HTrans (NP ∷ (k1 → Type) → [k1] → Type) (NP ∷ (k2 → Type) → [k2] → Type) Source # 
Instance details

Defined in Data.SOP.Strict.NP

Methods

htrans ∷ ∀ c (xs ∷ l1) (ys ∷ l2) proxy f g. AllZipN (Prod NP) c xs ys ⇒ proxy c → (∀ (x ∷ k10) (y ∷ k20). c x y ⇒ f x → g y) → NP f xs → NP g ys Source #

hcoerce ∷ ∀ (f ∷ k10 → Type) (g ∷ k20 → Type) (xs ∷ l1) (ys ∷ l2). AllZipN (Prod NP) (LiftedCoercible f g) xs ys ⇒ NP f xs → NP g ys Source #

HAp (NP ∷ (k → Type) → [k] → Type) Source # 
Instance details

Defined in Data.SOP.Strict.NP

Methods

hap ∷ ∀ (f ∷ k0 → Type) (g ∷ k0 → Type) (xs ∷ l). Prod NP (f -.-> g) xs → NP f xs → NP g xs Source #

HCollapse (NP ∷ (k → Type) → [k] → Type) Source # 
Instance details

Defined in Data.SOP.Strict.NP

Methods

hcollapse ∷ ∀ (xs ∷ l) a. SListIN NP xs ⇒ NP (K a) xs → CollapseTo NP a Source #

HPure (NP ∷ (k → Type) → [k] → Type) Source # 
Instance details

Defined in Data.SOP.Strict.NP

Methods

hpure ∷ ∀ (xs ∷ l) f. SListIN NP xs ⇒ (∀ (a ∷ k0). f a) → NP f xs Source #

hcpure ∷ ∀ c (xs ∷ l) proxy f. AllN NP c xs ⇒ proxy c → (∀ (a ∷ k0). c a ⇒ f a) → NP f xs Source #

HSequence (NP ∷ (k → Type) → [k] → Type) Source # 
Instance details

Defined in Data.SOP.Strict.NP

Methods

hsequence' ∷ ∀ (xs ∷ l) f (g ∷ k0 → Type). (SListIN NP xs, Applicative f) ⇒ NP (f :.: g) xs → f (NP g xs) Source #

hctraverse' ∷ ∀ c (xs ∷ l) g proxy f f'. (AllN NP c xs, Applicative g) ⇒ proxy c → (∀ (a ∷ k0). c a ⇒ f a → g (f' a)) → NP f xs → g (NP f' xs) Source #

htraverse' ∷ ∀ (xs ∷ l) g f f'. (SListIN NP xs, Applicative g) ⇒ (∀ (a ∷ k0). f a → g (f' a)) → NP f xs → g (NP f' xs) Source #

HTraverse_ (NP ∷ (k → Type) → [k] → Type) Source # 
Instance details

Defined in Data.SOP.Strict.NP

Methods

hctraverse_ ∷ ∀ c (xs ∷ l) g proxy f. (AllN NP c xs, Applicative g) ⇒ proxy c → (∀ (a ∷ k0). c a ⇒ f a → g ()) → NP f xs → g () Source #

htraverse_ ∷ ∀ (xs ∷ l) g f. (SListIN NP xs, Applicative g) ⇒ (∀ (a ∷ k0). f a → g ()) → NP f xs → g () Source #

All (Compose Show f) xs ⇒ Show (NP f xs) Source #

Copied from sop-core

Not derived, since derived instance ignores associativity info

Instance details

Defined in Data.SOP.Strict.NP

Methods

showsPrecIntNP f xs → ShowS #

showNP f xs → String #

showList ∷ [NP f xs] → ShowS #

All (Compose Eq f) xs ⇒ Eq (NP f xs) Source # 
Instance details

Defined in Data.SOP.Strict.NP

Methods

(==)NP f xs → NP f xs → Bool #

(/=)NP f xs → NP f xs → Bool #

(All (Compose Eq f) xs, All (Compose Ord f) xs) ⇒ Ord (NP f xs) Source # 
Instance details

Defined in Data.SOP.Strict.NP

Methods

compareNP f xs → NP f xs → Ordering #

(<)NP f xs → NP f xs → Bool #

(<=)NP f xs → NP f xs → Bool #

(>)NP f xs → NP f xs → Bool #

(>=)NP f xs → NP f xs → Bool #

maxNP f xs → NP f xs → NP f xs #

minNP f xs → NP f xs → NP f xs #

All (Compose NoThunks f) xs ⇒ NoThunks (NP f xs) Source # 
Instance details

Defined in Data.SOP.Strict.NP

Methods

noThunksContextNP f xs → IO (Maybe ThunkInfo) Source #

wNoThunksContextNP f xs → IO (Maybe ThunkInfo) Source #

showTypeOfProxy (NP f xs) → String Source #

type AllZipN (NP ∷ (k → Type) → [k] → Type) (c ∷ a → b → Constraint) Source # 
Instance details

Defined in Data.SOP.Strict.NP

type AllZipN (NP ∷ (k → Type) → [k] → Type) (c ∷ a → b → Constraint) = AllZip c
type Same (NP ∷ (k1 → Type) → [k1] → Type) Source # 
Instance details

Defined in Data.SOP.Strict.NP

type Same (NP ∷ (k1 → Type) → [k1] → Type) = NP ∷ (k2 → Type) → [k2] → Type
type Prod (NP ∷ (k → Type) → [k] → Type) Source # 
Instance details

Defined in Data.SOP.Strict.NP

type Prod (NP ∷ (k → Type) → [k] → Type) = NP ∷ (k → Type) → [k] → Type
type SListIN (NP ∷ (k → Type) → [k] → Type) Source # 
Instance details

Defined in Data.SOP.Strict.NP

type SListIN (NP ∷ (k → Type) → [k] → Type) = SListI ∷ [k] → Constraint
type CollapseTo (NP ∷ (k → Type) → [k] → Type) a Source # 
Instance details

Defined in Data.SOP.Strict.NP

type CollapseTo (NP ∷ (k → Type) → [k] → Type) a = [a]
type AllN (NP ∷ (k → Type) → [k] → Type) (c ∷ k → Constraint) Source # 
Instance details

Defined in Data.SOP.Strict.NP

type AllN (NP ∷ (k → Type) → [k] → Type) (c ∷ k → Constraint) = All c

hdNP f (x ': xs) → f x Source #

map_NP' ∷ ∀ f g xs. (∀ a. f a → g a) → NP f xs → NP g xs Source #

Version of map_NP that does not require a singleton

npToSListINP a xs → (SListI xs ⇒ r) → r Source #

Conjure up an SListI constraint from an NP

singletonNP ∷ f x → NP f '[x] Source #

tlNP f (x ': xs) → NP f xs Source #