Hoogle Search

Within LTS Haskell 24.52 (ghc-9.10.3)

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

  1. module Polysemy.Plugin

    A typechecker plugin that can disambiguate "obvious" uses of effects in Polysemy. Example: Consider the following program:

    foo :: Member (State Int) r => Sem r ()
    foo = put 10
    
    What does this program do? Any human will tell you that it changes the state of the Int to 10, which is clearly what's meant. Unfortunately, Polysemy can't work this out on its own. Its reasoning is "maybe you wanted to change some other State effect which is also a Num, but you just forgot to add a Member constraint for it." This is obviously insane, but it's the way the cookie crumbles. Plugin is a typechecker plugin which will disambiguate the above program (and others) so the compiler will do what you want. Usage: Add the following line to your package configuration:
    ghc-options: -fplugin=Polysemy.Plugin
    
    Limitations: The Plugin will only disambiguate effects if there is exactly one relevant constraint in scope. For example, it will not disambiguate the following program:
    bar :: Members '[ State Int
    , State Double
    ] r => Sem r ()
    bar = put 10
    
    because it is now unclear whether you're attempting to set the Int or the Double. Instead, you can manually write a type application in this case.
    bar :: Members '[ State Int
    , State Double
    ] r => Sem r ()
    bar = put @Int 10
    

  2. data PolysemyStuff (l :: LookupState)

    polysemy-plugin Polysemy.Plugin.Fundep.Stuff

    All of the things from "polysemy" that we need access to in the plugin. When l ~ 'Locations, each of these is just a pair of strings. When l ~ 'Things, it's actually references to the stuff.

  3. PolysemyStuff :: ThingOf l Class -> ThingOf l TyCon -> PolysemyStuff (l :: LookupState)

    polysemy-plugin Polysemy.Plugin.Fundep.Stuff

    No documentation available.

  4. type Password = Text

    pontarius-xmpp Network.Xmpp

    No documentation available.

  5. Plain :: ConnectionState

    pontarius-xmpp Network.Xmpp

    Stream established, but not secured via TLS

  6. type Plugin = XmppElement -> IO Either XmppFailure () -> ExceptT XmppFailure IO Plugin'

    pontarius-xmpp Network.Xmpp

    No documentation available.

  7. data Plugin'

    pontarius-xmpp Network.Xmpp

    No documentation available.

  8. Plugin' :: (XmppElement -> [Annotation] -> IO [(XmppElement, [Annotation])]) -> (XmppElement -> IO (Either XmppFailure ())) -> (Session -> IO ()) -> Plugin'

    pontarius-xmpp Network.Xmpp

    No documentation available.

  9. PolicyViolation :: StanzaErrorCondition

    pontarius-xmpp Network.Xmpp

    The entity has violated some local service policy (e.g., a message contains words that are prohibited by the service)

  10. data Presence

    pontarius-xmpp Network.Xmpp

    The presence stanza. Used for communicating status updates.

Page 972 of many | Previous | Next