Hoogle Search

Within LTS Haskell 24.66 (ghc-9.10.3)

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

  1. typeFor :: HasForeignType lang ftype a => Proxy lang -> Proxy ftype -> Proxy a -> ftype

    servant-foreign Servant.Foreign

    No documentation available.

  2. data EmptyForeignAPI

    servant-foreign Servant.Foreign.Internal

    No documentation available.

  3. EmptyForeignAPI :: EmptyForeignAPI

    servant-foreign Servant.Foreign.Internal

    No documentation available.

  4. class HasForeign (lang :: k) ftype api

    servant-foreign Servant.Foreign.Internal

    Implementation of the Servant framework types. Relevant instances: Everything containing HasForeignType.

  5. class HasForeignType (lang :: k) ftype (a :: k1)

    servant-foreign Servant.Foreign.Internal

    HasForeignType maps Haskell types with types in the target language of your backend. For example, let's say you're implementing a backend to some language X, and you want a Text representation of each input/output type mentioned in the API:

    -- First you need to create a dummy type to parametrize your
    -- instances.
    data LangX
    
    -- Otherwise you define instances for the types you need
    instance HasForeignType LangX Text Int where
    typeFor _ _ _ = "intX"
    
    -- Or for example in case of lists
    instance HasForeignType LangX Text a => HasForeignType LangX Text [a] where
    typeFor lang ftype _ = "listX of " <> typeFor lang ftype (Proxy :: Proxy a)
    
    Finally to generate list of information about all the endpoints for an API you create a function of a form:
    getEndpoints :: (HasForeign LangX Text api, GenerateList Text (Foreign Text api))
    => Proxy api -> [Req Text]
    getEndpoints api = listFromAPI (Proxy :: Proxy LangX) (Proxy :: Proxy Text) api
    
    -- If language __X__ is dynamically typed then you can use
    -- a predefined NoTypes parameter with the NoContent output type:
    
    getEndpoints :: (HasForeign NoTypes NoContent api, GenerateList Text (Foreign NoContent api))
    => Proxy api -> [Req NoContent]
    getEndpoints api = listFromAPI (Proxy :: Proxy NoTypes) (Proxy :: Proxy NoContent) api
    

  6. typeFor :: HasForeignType lang ftype a => Proxy lang -> Proxy ftype -> Proxy a -> ftype

    servant-foreign Servant.Foreign.Internal

    No documentation available.

  7. module Sound.Sox.Information

    This module calls the soxi command which is available since sox version 14. We have to call soxi for every option. However we hide this in our interface, such that we could do more efficiently, if soxi supports multiple outputs in future.

  8. ErrorConstraintForeignKey :: Error

    sqlite-simple Database.SQLite.Simple

    No documentation available.

  9. ErrorFormat :: Error

    sqlite-simple Database.SQLite.Simple

    Auxiliary database format error

  10. typeHashForNames :: [Name] -> Q Exp

    store Data.Store.TypeHash.Internal

    At compiletime, this yields a hash of the specified datatypes. Not only does this cover the datatypes themselves, but also all transitive dependencies. The resulting expression is a literal of type TypeHash.

Page 1310 of many | Previous | Next