Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data MapSpec fn k v = MapSpec {
- mapSpecHint ∷ Maybe Integer
- mapSpecMustKeys ∷ Set k
- mapSpecMustValues ∷ [v]
- mapSpecSize ∷ Specification fn Integer
- mapSpecElem ∷ Specification fn (k, v)
- mapSpecFold ∷ FoldSpec fn v
- defaultMapSpec ∷ Ord k ⇒ MapSpec fn k v
- dom_ ∷ (HasSpec fn (Map k v), HasSpec fn k, Ord k) ⇒ Term fn (Map k v) → Term fn (Set k)
- rng_ ∷ (HasSpec fn k, HasSpec fn v, Ord k) ⇒ Term fn (Map k v) → Term fn [v]
- lookup_ ∷ (HasSpec fn k, HasSpec fn v, Ord k, IsNormalType v) ⇒ Term fn k → Term fn (Map k v) → Term fn (Maybe v)
Documentation
MapSpec | |
|
Instances
(HasSpec fn (k, v), HasSpec fn k, HasSpec fn v, HasSpec fn [v]) ⇒ Pretty (WithPrec (MapSpec fn k v)) Source # | |
(Arbitrary k, Arbitrary v, Arbitrary (TypeSpec fn k), Arbitrary (TypeSpec fn v), Ord k, HasSpec fn k, Foldy fn v) ⇒ Arbitrary (MapSpec fn k v) Source # | |
Generic (MapSpec fn k v) Source # | |
(HasSpec fn (k, v), HasSpec fn k, HasSpec fn v, HasSpec fn [v]) ⇒ Show (MapSpec fn k v) Source # | |
type Rep (MapSpec fn k v) Source # | |
Defined in Constrained.Spec.Map type Rep (MapSpec fn k v) = D1 ('MetaData "MapSpec" "Constrained.Spec.Map" "constrained-generators-0.2.0.0-inplace" 'False) (C1 ('MetaCons "MapSpec" 'PrefixI 'True) ((S1 ('MetaSel ('Just "mapSpecHint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Integer)) :*: (S1 ('MetaSel ('Just "mapSpecMustKeys") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set k)) :*: S1 ('MetaSel ('Just "mapSpecMustValues") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [v]))) :*: (S1 ('MetaSel ('Just "mapSpecSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Specification fn Integer)) :*: (S1 ('MetaSel ('Just "mapSpecElem") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Specification fn (k, v))) :*: S1 ('MetaSel ('Just "mapSpecFold") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (FoldSpec fn v)))))) |
defaultMapSpec ∷ Ord k ⇒ MapSpec fn k v Source #
emptySpec without all the constraints
lookup_ ∷ (HasSpec fn k, HasSpec fn v, Ord k, IsNormalType v) ⇒ Term fn k → Term fn (Map k v) → Term fn (Maybe v) Source #
Orphan instances
(Ord k, HasSpec fn (Prod k v), HasSpec fn k, HasSpec fn v, HasSpec fn [v]) ⇒ HasGenHint fn (Map k v) Source # | |
(Ord k, HasSpec fn (Prod k v), HasSpec fn k, HasSpec fn v, HasSpec fn [v]) ⇒ HasSpec fn (Map k v) Source # | |
emptySpec ∷ TypeSpec fn (Map k v) Source # combineSpec ∷ TypeSpec fn (Map k v) → TypeSpec fn (Map k v) → Specification fn (Map k v) Source # genFromTypeSpec ∷ ∀ (m ∷ Type → Type). (HasCallStack, MonadGenError m) ⇒ TypeSpec fn (Map k v) → GenT m (Map k v) Source # conformsTo ∷ Map k v → TypeSpec fn (Map k v) → Bool Source # shrinkWithTypeSpec ∷ TypeSpec fn (Map k v) → Map k v → [Map k v] Source # toPreds ∷ Term fn (Map k v) → TypeSpec fn (Map k v) → Pred fn Source # cardinalTypeSpec ∷ TypeSpec fn (Map k v) → Specification fn Integer Source # cardinalTrueSpec ∷ Specification fn Integer Source # typeSpecHasError ∷ TypeSpec fn (Map k v) → Maybe (NonEmpty String) Source # alternateShow ∷ TypeSpec fn (Map k v) → BinaryShow Source # monadConformsTo ∷ Map k v → TypeSpec fn (Map k v) → Writer [String] Bool Source # typeSpecOpt ∷ TypeSpec fn (Map k v) → [Map k v] → Specification fn (Map k v) Source # guardTypeSpec ∷ [String] → TypeSpec fn (Map k v) → Specification fn (Map k v) Source # prerequisites ∷ Evidence (Prerequisites fn (Map k v)) Source # | |
Ord a ⇒ Sized fn (Map a b) Source # | |
sizeOf ∷ Map a b → Integer Source # liftSizeSpec ∷ SizeSpec fn → [Integer] → Specification fn (Map a b) Source # liftMemberSpec ∷ OrdSet Integer → Specification fn (Map a b) Source # sizeOfTypeSpec ∷ TypeSpec fn (Map a b) → Specification fn Integer Source # | |
BaseUniverse fn ⇒ Functions (MapFn fn) fn Source # | |
propagateSpecFun ∷ ∀ (as ∷ [Type]) a b. (TypeList as, Typeable as, HasSpec fn a, HasSpec fn b, All (HasSpec fn) as) ⇒ MapFn fn as b → ListCtx Value as (HOLE a) → Specification fn b → Specification fn a Source # rewriteRules ∷ ∀ (as ∷ [Type]) b. (TypeList as, Typeable as, HasSpec fn b, All (HasSpec fn) as) ⇒ MapFn fn as b → List (Term fn) as → Maybe (Term fn b) Source # mapTypeSpec ∷ (HasSpec fn a, HasSpec fn b) ⇒ MapFn fn '[a] b → TypeSpec fn a → Specification fn b Source # | |
Arbitrary (FoldSpec fn (Map k v)) Source # | |
Ord k ⇒ Forallable (Map k v) (k, v) Source # | |
fromForAllSpec ∷ ∀ (fn ∷ [Type] → Type → Type). (HasSpec fn (Map k v), HasSpec fn (k, v), BaseUniverse fn) ⇒ Specification fn (k, v) → Specification fn (Map k v) Source # forAllToList ∷ Map k v → [(k, v)] Source # |