Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.
I guess I'll just leave this here :sweat_smile: :
infix 0 ?
(?) :: ((?_ :: a) => b) -> a -> b
x ? a = let ?_ = a in x
ghci> (?_, ?_, ?_) ? "y"
Basically, ImplicitParams seem to support _ as parameter name, so we can write function that uses it in a way that looks nearly like Scala's anonymous functions :big_smile:
One could write nice predicates with this:
filter (?_ > 5 && isLower (chr ?_) ?) xs
Or provide concise interface for some SQL library in combination with OverloadedRecordDot:
select (?_.id, ?_.name) $ from @Users & where_ (?_.email .==. val "email@example.com")
Or maybe we could just forget about it and never use it again :sweat_smile:
Has Type Inference Gone Too Far?
Oh damn, this topic broke zulip-archive, https://github.com/srid/zulip-archive/runs/2406184027?check_suite_focus=true
* Raised the exception:
Cannot build slug for "?_"
Hard to create a reproducible URL slug here ...
/me renamed the topic to see if that helps, for now.
I guess one solution is to just fallback to hash of the topic name.