Hoogle Search

Within LTS Haskell 24.4 (ghc-9.10.2)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. (:<|>) :: a -> b -> (:<|>) a b

    servant Servant.API.Alternative

    No documentation available.

  2. data (path :: k) :> a

    servant Servant.API.Sub

    The contained API (second argument) can be found under ("/" ++ path) (path being the first argument). Example:

    >>> -- GET /hello/world
    
    >>> -- returning a JSON encoded World value
    
    >>> type MyApi = "hello" :> "world" :> Get '[JSON] World
    

  3. (:<) :: a -> f (Cofree f a) -> Cofree (f :: Type -> Type) a

    free Control.Comonad.Cofree

    No documentation available.

  4. (:<) :: a -> f b -> CofreeF (f :: Type -> Type) a b

    free Control.Comonad.Trans.Cofree

    No documentation available.

  5. pattern (:*) :: HasDebugCallStack => Card -> SubDemand -> Demand

    ghc GHC.Types.Demand

    c :* sd is a demand that says "evaluated c times, and any trace in which it is evaluated will evaluate at least as deep as sd". Matching on this pattern synonym is a complete match. If the matched demand was AbsDmd, it will match as C_00 :* seqSubDmd. If the matched demand was BotDmd, it will match as C_10 :* botSubDmd. The builder of this pattern synonym simply discards the SubDemand if the Card was absent and returns AbsDmd or BotDmd instead. It will assert that the discarded sub-demand was seqSubDmd and botSubDmd, respectively. Call sites should consider whether they really want to look at the SubDemand of an absent demand and match on AbsDmd and/or BotDmd otherwise. Really, any other SubDemand would be allowed and might work better, depending on context.

  6. (:*:) :: a -> b -> StrictPair a b

    ghc GHC.Utils.Containers.Internal.StrictPair

    No documentation available.

  7. newtype a :- b

    constraints Data.Constraint

    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.

  8. class b :=> h | h -> b

    constraints Data.Constraint

    Reify the relationship between an instance head and its body as a class Given a definition such as

    instance Foo a => Foo [a]
    
    you can capture the relationship between the instance head and its body with
    instance Foo a :=> Foo [a] where ins = Sub Dict
    

  9. data (a :: k) :~: (b :: k)

    constraints Data.Constraint.Deferrable

    Propositional equality. If a :~: b is inhabited by some terminating value, then the type a is the same as the type b. To use this equality in practice, pattern-match on the a :~: b to get out the Refl constructor; in the body of the pattern-match, the compiler knows that a ~ b.

  10. data (a :: k1) :~~: (b :: k2)

    constraints Data.Constraint.Deferrable

    Kind heterogeneous propositional equality. Like :~:, a :~~: b is inhabited by a terminating value if and only if a is the same type as b.

Page 6 of many | Previous | Next