snoyberg / mono-traversable

Type classes for mapping, folding, and traversing monomorphic containers
155 stars 64 forks source link

Remove Proxy from Yesod Classy Prelude? #187

Open MaxGabriel opened 4 years ago

MaxGabriel commented 4 years ago

Currently classy-prelude-yesod exports Proxy from https://hackage.haskell.org/package/http-conduit-2.3.7.3/docs/Network-HTTP-Client-Conduit.html#t:Proxy.

However, this conflicts in name with the fairly common Data.Proxy.Proxy. You also get a fairly confusing type error if you try to use the common (Proxy :: Proxy X) idiom with just the classy-prelude Proxy in scope:

src/Mercury/Purpose/Types.hs:74:69-77: error:
    • Expected kind ‘* -> *’, but ‘Proxy’ has kind ‘*’
    • In an expression type signature: Proxy Int
      In the first argument of ‘getTypeScriptDeclarations’, namely
        ‘(Proxy :: Proxy Int)’
      In the expression: getTypeScriptDeclarations (Proxy :: Proxy Int)
   |
74 |   getTypeScriptDeclarations _ = getTypeScriptDeclarations (Proxy :: Proxy Int) -- PurposeProxy.PurposeCodeData

Thoughts on removing that export from classy-prelude?

snoyberg commented 4 years ago

No objection

On Tue, Jan 28, 2020, 2:06 AM Maximilian Tagher notifications@github.com wrote:

Currently classy-prelude-yesod exports Proxy from https://hackage.haskell.org/package/http-conduit-2.3.7.3/docs/Network-HTTP-Client-Conduit.html#t:Proxy .

However, this conflicts in name with the fairly common Data.Proxy.Proxy. You also get a fairly confusing type error if you try to use the common (Proxy :: Proxy X) idiom with just the classy-prelude Proxy in scope:

src/Mercury/Purpose/Types.hs:74:69-77: error:

• Expected kind ‘* -> *’, but ‘Proxy’ has kind ‘*’

• In an expression type signature: Proxy Int

  In the first argument of ‘getTypeScriptDeclarations’, namely

    ‘(Proxy :: Proxy Int)’

  In the expression: getTypeScriptDeclarations (Proxy :: Proxy Int)

|

74 | getTypeScriptDeclarations _ = getTypeScriptDeclarations (Proxy :: Proxy Int) -- PurposeProxy.PurposeCodeData

Thoughts on removing that export from classy-prelude?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/snoyberg/mono-traversable/issues/187?email_source=notifications&email_token=AAAMCBZ5I2UODXNELP377VLQ75ZJHA5CNFSM4KMKGF52YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IJCPOHQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAMCBYIPJX72T5ZVV57BMTQ75ZJHANCNFSM4KMKGF5Q .

BebeSparkelSparkel commented 3 months ago

@MaxGabriel Were you going to create a pr for this?