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

Modulebin-0.1.4.1Haskell2010

Data.BinP.PosP

Contents
  1. Top & Pop
  2. Showing
  3. Conversions
  4. Interesting
  5. Weakening (succ)
  6. Universe
Synopsis
  • Packagebin-0.1.4.1
  • Exports15
  • LanguageHaskell2010
  • LicenceGPL-2.0-or-later
  • SourcePosP.hs
newtypenewtype PosP (b :: BinP)

PosP is to BinP is what Fin is to Nat, when n is Z.

Constructors

Instances12EqP, GShow, OrdP, Bounded, Eq, Ord, …
  • EqP PosPDefined in bin-0.1.4.1 · Data.BinP.PosP
  • GShow PosPDefined in bin-0.1.4.1 · Data.BinP.PosP
  • OrdP PosPDefined in bin-0.1.4.1 · Data.BinP.PosP
  • SBinPI b => Bounded (PosP b)Defined in bin-0.1.4.1 · Data.BinP.PosP
  • Eq (PosP b)Defined in bin-0.1.4.1 · Data.BinP.PosP
  • Ord (PosP b)Defined in bin-0.1.4.1 · Data.BinP.PosP
  • Show (PosP b)Defined in bin-0.1.4.1 · Data.BinP.PosP
  • NFData (PosP b)Defined in bin-0.1.4.1 · Data.BinP.PosP
  • SBinPI b => Arbitrary (PosP b)Defined in bin-0.1.4.1 · Data.BinP.PosP
  • CoArbitrary (PosP b)Defined in bin-0.1.4.1 · Data.BinP.PosP
  • SBinPI b => Function (PosP b)Defined in bin-0.1.4.1 · Data.BinP.PosP
  • b ~ 'BE => Boring (PosP b)Defined in bin-0.1.4.1 · Data.BinP.PosP
datadata PosP' (n :: Nat) (b :: BinP) where

PosP' is a structure inside PosP.

Constructors

Instances9GShow, Bounded, Eq, Ord, Show, NFData, …

Top & Pop

valuetop :: SBinPI b => PosP b

top and pop serve as FZ and FS, with types specified so type-inference works backwards from the result.

Example1 expression
top :: PosP BinP40
Example1 expression
pop (pop top) :: PosP BinP42
Example1 expression
pop (pop top) :: PosP BinP92

Showing

Conversions

Interesting

Weakening (succ)

Universe

valueuniverse' :: (SNatI n, SBinPI b) => [PosP' n b]

This gives a hint, what the n parameter means in PosP'.

Example1 expression
universe' :: [PosP' N.Nat2 BinP2][0,1,2,3,4,5,6,7]