Hoogle Search
Within LTS Haskell 24.6 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
pattern (
:== ) :: forall (l :: Symbol) a . KnownSymbol l => Label l -> a -> Rec (l .== a)row-types Data.Row A pattern for the singleton record; can be used to both destruct a record when in a pattern position or construct one in an expression position.
-
row-types Data.Row.Dictionaries This is the type of entailment. a :- b is read as a "entails" b. With this we can actually build a category for Constraint resolution. e.g. Because Eq a is a superclass of Ord a, we can show that Ord a entails Eq a. Because instance Ord a => Ord [a] exists, we can show that Ord a entails Ord [a] as well. This relationship is captured in the :- entailment type here. Since p :- p and entailment composes, :- forms the arrows of a Category of constraints. However, Category only became sufficiently general to support this instance in GHC 7.8, so prior to 7.8 this instance is unavailable. But due to the coherence of instance resolution in Haskell, this Category has some very interesting properties. Notably, in the absence of IncoherentInstances, this category is "thin", which is to say that between any two objects (constraints) there is at most one distinguishable arrow. This means that for instance, even though there are two ways to derive Ord a :- Eq [a], the answers from these two paths _must_ by construction be equal. This is a property that Haskell offers that is pretty much unique in the space of languages with things they call "type classes". What are the two ways? Well, we can go from Ord a :- Eq a via the superclass relationship, and then from Eq a :- Eq [a] via the instance, or we can go from Ord a :- Ord [a] via the instance then from Ord [a] :- Eq [a] through the superclass relationship and this diagram by definition must "commute". Diagrammatically,
Ord a ins / \ cls v v Ord [a] Eq a cls \ / ins v v Eq [a]
This safety net ensures that pretty much anything you can write with this library is sensible and can't break any assumptions on the behalf of library authors. -
row-types Data.Row.Internal No documentation available.
pattern (
:+ ) :: Disjoint l r => Rec l -> Rec r -> Rec (l .+ r)row-types Data.Row.Records A pattern version of record union, for use in pattern matching.
pattern (
:== ) :: forall (l :: Symbol) a . KnownSymbol l => Label l -> a -> Rec (l .== a)row-types Data.Row.Records A pattern for the singleton record; can be used to both destruct a record when in a pattern position or construct one in an expression position.
pattern (
::: ) :: SExpr a -> SExpr a -> SExpr as-cargot Data.SCargot.Repr.Basic A shorter infix alias for SCons
>>> A "pachy" ::: A "derm" SCons (SAtom "pachy") (SAtom "derm")
pattern (
::: ) :: RichSExpr a -> RichSExpr a -> RichSExpr as-cargot Data.SCargot.Repr.Rich A shorter infix alias to grab the head and tail of an RSList.
>>> A "one" ::: L [A "two", A "three"] RSList [RSAtom "one",RSAtom "two",RSAtom "three"]
pattern (
::: ) :: WellFormedSExpr a -> WellFormedSExpr a -> WellFormedSExpr as-cargot Data.SCargot.Repr.WellFormed A shorter infix alias to grab the head and tail of a WFSList. This pattern is unidirectional, because it cannot be guaranteed that it is used to construct well-formed s-expressions; use the function "cons" instead.
>>> let sum (x ::: xs) = x + sum xs; sum Nil = 0
-
test-fun Test.Fun Heterogeneous products as nested pairs. These products must be terminated by ().
a :+ b :+ c :+ () -- the product of a, b, c
-
test-fun Test.Fun No documentation available.