-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Type-level constraints on strings and other input -- -- Please see README.md @package validated-types @version 0.1.1 module Refined.OnlyDigits data OnlyDigits instance Refined.Predicate Refined.OnlyDigits.OnlyDigits Data.Text.Internal.Text instance Refined.Predicate Refined.OnlyDigits.OnlyDigits GHC.Base.String module Refined.LessThanEq data LessThanEq (n :: Nat) instance (GHC.Classes.Ord x, GHC.Num.Num x, GHC.TypeLits.KnownNat n) => Refined.Predicate (Refined.LessThanEq.LessThanEq n) x module Data.CharLength -- | tools to detect the length of a type class CharLength a where charLength a = length $ charOut a charLength :: CharLength a => a -> Int charOut :: CharLength a => a -> Text charIn :: CharLength a => Text -> a instance Data.CharLength.CharLength Data.Text.Internal.Text instance Data.CharLength.CharLength GHC.Types.Int module Refined.Length -- | The length of an input data Length p type LengthEq (n :: Nat) = Length (EqualTo n) type LengthMax (n :: Nat) = Length (LessThanEq n) instance (Data.CharLength.CharLength x, Refined.Predicate p GHC.Types.Int) => Refined.Predicate (Refined.Length.Length p) x module Refined.Implies -- | Certain refinedments imply others. See -- https://github.com/nikita-volkov/refined/pull/6 class Implies from to where relax = coerce relax :: Implies from to => Refined from x -> Refined to x instance (n GHC.TypeLits.<= m) => Refined.Implies.Implies (Refined.LessThan n) (Refined.LessThan m) instance ((n GHC.TypeLits.+ 1) GHC.TypeLits.<= m) => Refined.Implies.Implies (Refined.EqualTo n) (Refined.LessThan m) instance (n GHC.TypeLits.<= m) => Refined.Implies.Implies (Refined.EqualTo n) (Refined.LessThanEq.LessThanEq m) instance Refined.Implies.Implies m n => Refined.Implies.Implies (Refined.Length.Length m) (Refined.Length.Length n)