Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type family SymbolNonEmpty (s :: Symbol) :: Constraint where ...
- type SymbolWithNoSpaceAround s = (SymbolNoLeadingSpace (UnconsSymbol s), SymbolNoTrailingSpace (UnconsSymbol s))
- type family SymbolNoLongerThan (s :: Symbol) (n :: Nat) :: Constraint where ...
- usePositiveNat :: Integer -> a -> (forall n proxy. (KnownNat n, 1 <= n) => proxy n -> a) -> a
- textIsWhitespace :: Text -> Bool
- textHasNoMeaningfulContent :: Text -> Bool
Documentation
type family SymbolNonEmpty (s :: Symbol) :: Constraint where ... Source #
SymbolNonEmpty "" = TypeError ('Text "Symbol is empty") | |
SymbolNonEmpty _ = () |
type SymbolWithNoSpaceAround s = (SymbolNoLeadingSpace (UnconsSymbol s), SymbolNoTrailingSpace (UnconsSymbol s)) Source #
type family SymbolNoLongerThan (s :: Symbol) (n :: Nat) :: Constraint where ... Source #
SymbolNoLongerThan s n = If (SymbolLength 0 (UnconsSymbol s) <=? n) (() :: Constraint) (TypeError (((('Text "Invalid NonEmptyText. Needs to be <= " ':<>: 'ShowType n) ':<>: 'Text " characters. Has ") ':<>: 'ShowType (SymbolLength 0 (UnconsSymbol s))) ':<>: 'Text " characters.")) |
usePositiveNat :: Integer -> a -> (forall n proxy. (KnownNat n, 1 <= n) => proxy n -> a) -> a Source #
If the integer is >= 1, evaluate the function with the proof of that. Otherwise, return the default value
textIsWhitespace :: Text -> Bool Source #