<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);">To make . work, we'd need both the ability to parse . at the type level without the compiler flipping out and assuming it is part of a rank n signature (which was the first issue I was trying to mention) and a form of "Really LiberalTypeSynonyms" like we use in ermine to allow the partial application so long as App is only used applied to an argument.<br></span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);">In theory non recursive partial application of type synonyms <i>within a type synonym</i> is perfectly admissible in Haskell type checking, it just complicates the expansion and we don't do it today.</span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);">Both are solvable, but are nowhere near the low hanging fruit that adding $ would be.</span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);">-Edward</span></div></div><div><br>On Nov 2, 2016, at 10:42 AM, Oleg Grenrus <<a href="mailto:oleg.grenrus@iki.fi">oleg.grenrus@iki.fi</a>> wrote:<br><br></div><blockquote type="cite"><div><span>To make it clear:</span><br><span></span><br><span>type level `.` won’t work as an type synonym, as it’s application isn’t saturated.</span><br><span></span><br><span>{-# LANGUAGE TypeOperators #-}</span><br><span>type (:.:) f g x = f (g x)</span><br><span>infixr 9 :.:</span><br><span></span><br><span>type App = Maybe :.: []</span><br><span></span><br><span>fails to compile with following errors (for a reason):</span><br><span></span><br><span>    • The type synonym ‘:.:’ should have 3 arguments, but has been given 2</span><br><span>    • In the type synonym declaration for ‘App’</span><br><span></span><br><blockquote type="cite"><span>On 02 Nov 2016, at 16:24, Edward Kmett <<a href="mailto:ekmett@gmail.com">ekmett@gmail.com</a>> wrote:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>+1, but the operator you're looking for in App there would actually be a type level version of (.).</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>type App a = ExceptT Err $ ReaderT Config $ LogT Text $ IO a</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>type App = ExceptT Err . ReaderT Config . LogT Text . IO</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>which would need</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>type (.) f g x = f (g x)</span><br></blockquote><blockquote type="cite"><span>infixr 9 .</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>to parse</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>-Edward</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>On Tue, Nov 1, 2016 at 7:13 PM, Elliot Cameron <<a href="mailto:eacameron@gmail.com">eacameron@gmail.com</a>> wrote:</span><br></blockquote><blockquote type="cite"><span>Folks,</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Has there been a discussion about adding a type-level operator "$" that just mimics "$" at the value level?</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>type f $ x = f x</span><br></blockquote><blockquote type="cite"><span>infixr 0 $</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Things like monad transformer stacks would look more "stack-like" with this:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>type App = ExceptT Err $ ReaderT Config $ LogT Text IO</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Elliot Cameron</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>_______________________________________________</span><br></blockquote><blockquote type="cite"><span>Libraries mailing list</span><br></blockquote><blockquote type="cite"><span><a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a></span><br></blockquote><blockquote type="cite"><span><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>_______________________________________________</span><br></blockquote><blockquote type="cite"><span>Libraries mailing list</span><br></blockquote><blockquote type="cite"><span><a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a></span><br></blockquote><blockquote type="cite"><span><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a></span><br></blockquote><span></span><br></div></blockquote></body></html>