constraints-0.9: Constraint manipulation

Safe Haskell | None
Language | Haskell2010

Data.Constraint.Symbol

Description

Utilities for working with `KnownSymbol` constraints.

This module is only available on GHC 8.0 or later.

# Documentation

type family (++) :: Symbol -> Symbol -> Symbol where ... #

type family Take :: Nat -> Symbol -> Symbol where ... #

type family Drop :: Nat -> Symbol -> Symbol where ... #

type family Length :: Symbol -> Nat where ... #

appendSymbol :: (KnownSymbol a, KnownSymbol b) :- KnownSymbol (a ++ b) #

appendUnit1 :: forall a. Dict (("" ++ a) ~ a) #

appendUnit2 :: forall a. Dict ((a ++ "") ~ a) #

appendAssociates :: forall a b c. Dict (((a ++ b) ++ c) ~ (a ++ (b ++ c))) #

takeSymbol :: forall n a. (KnownNat n, KnownSymbol a) :- KnownSymbol (Take n a) #

dropSymbol :: forall n a. (KnownNat n, KnownSymbol a) :- KnownSymbol (Drop n a) #

takeAppendDrop :: forall n a. Dict ((Take n a ++ Drop n a) ~ a) #

lengthSymbol :: forall a. KnownSymbol a :- KnownNat (Length a) #

takeLength :: forall n a. (Length a <= n) :- (Take n a ~ a) #

take0 :: forall a. Dict (Take 0 a ~ "") #

takeEmpty :: forall n. Dict (Take n "" ~ "") #

dropLength :: forall n a. (Length a <= n) :- (Drop n a ~ "") #

drop0 :: forall a. Dict (Drop 0 a ~ a) #

dropEmpty :: forall n. Dict (Drop n "" ~ "") #

lengthTake :: forall n a. Dict (Length (Take n a) <= n) #

lengthDrop :: forall n a. Dict (Length a <= (Length (Drop n a) + n)) #

dropDrop :: forall n m a. Dict (Drop n (Drop m a) ~ Drop (n + m) a) #

takeTake :: forall n m a. Dict (Take n (Take m a) ~ Take (Min n m) a) #