Hoogle Search

Within LTS Haskell 24.12 (ghc-9.10.3)

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

  1. lookupResponseHeader :: forall (h :: Symbol) a (headers :: [Type]) r . HasResponseHeader h a headers => Headers headers r -> ResponseHeader h a

    servant Servant.API

    Look up a specific ResponseHeader, without having to know what position it is in the HList.

    >>> let example1 = addHeader 5 "hi" :: Headers '[Header "someheader" Int] String
    
    >>> let example2 = addHeader True example1 :: Headers '[Header "1st" Bool, Header "someheader" Int] String
    
    >>> lookupResponseHeader example2 :: ResponseHeader "someheader" Int
    Header 5
    
    >>> lookupResponseHeader example2 :: ResponseHeader "1st" Bool
    Header True
    
    Usage of this function relies on an explicit type annotation of the header to be looked up. This can be done with type annotations on the result, or with an explicit type application. In this example, the type of header value is determined by the type-inference, we only specify the name of the header:
    >>> :set -XTypeApplications
    
    >>> case lookupResponseHeader @"1st" example2 of { Header b -> b ; _ -> False }
    True
    

  2. lookupResponseHeader :: forall (h :: Symbol) a (headers :: [Type]) r . HasResponseHeader h a headers => Headers headers r -> ResponseHeader h a

    servant Servant.API.ResponseHeaders

    Look up a specific ResponseHeader, without having to know what position it is in the HList.

    >>> let example1 = addHeader 5 "hi" :: Headers '[Header "someheader" Int] String
    
    >>> let example2 = addHeader True example1 :: Headers '[Header "1st" Bool, Header "someheader" Int] String
    
    >>> lookupResponseHeader example2 :: ResponseHeader "someheader" Int
    Header 5
    
    >>> lookupResponseHeader example2 :: ResponseHeader "1st" Bool
    Header True
    
    Usage of this function relies on an explicit type annotation of the header to be looked up. This can be done with type annotations on the result, or with an explicit type application. In this example, the type of header value is determined by the type-inference, we only specify the name of the header:
    >>> :set -XTypeApplications
    
    >>> case lookupResponseHeader @"1st" example2 of { Header b -> b ; _ -> False }
    True
    

  3. lookupAnchor :: AnchorName -> YamlParser (Maybe YamlValue)

    yaml Data.Yaml.Parser

    No documentation available.

  4. lookupGlobalName :: GhcMonad m => Name -> m (Maybe TyThing)

    ghc GHC

    Looks up a global name: that is, any top-level name in any visible module. Unlike lookupName, lookupGlobalName does not use the interactive context, and therefore does not require a preceding setContext.

  5. lookupModule :: GhcMonad m => ModuleName -> Maybe FastString -> m Module

    ghc GHC

    Like findModule, but differs slightly when the module refers to a source file, and the file has not been loaded via load. In this case, findModule will throw an error (module not loaded), but lookupModule will check to see whether the module can also be found in a package, and if so, that package Module will be returned. If not, the usual module-not-found error will be thrown.

  6. lookupName :: GhcMonad m => Name -> m (Maybe TyThing)

    ghc GHC

    Returns the TyThing for a Name. The Name may refer to any entity known to GHC, including Names defined using runStmt.

  7. lookupQualifiedModule :: GhcMonad m => PkgQual -> ModuleName -> m Module

    ghc GHC

    No documentation available.

  8. lookupKnownKeyName :: Unique -> Maybe Name

    ghc GHC.Builtin.Utils

    Given a Unique lookup its associated Name if it corresponds to a known-key thing.

  9. lookupKnownNameInfo :: Name -> SDoc

    ghc GHC.Builtin.Utils

    Given a Unique lookup any associated arbitrary SDoc's to be displayed by GHCi's ':info' command.

  10. lookupIE :: Interp -> PkgsLoaded -> ItblEnv -> Name -> IO (Ptr ())

    ghc GHC.ByteCode.Linker

    No documentation available.

Page 40 of many | Previous | Next