reactormonk 2017-02-01 23:50:10
Starting from https://hackage.haskell.org/package/uri-bytestring-0.2.2.1/docs/URI-ByteString.html#v:authorityL how do I construct a `Lens' (URIRef a) (Maybe ByteString)` with `authorityL`, `AuthorityHostL`, `hostBSL`?
reactormonk 2017-02-01 23:50:17
Not sure how to deal with the Maybe in there.
reactormonk 2017-02-02 00:00:13
Ah, I'm looking for (a -> b) -> Maybe a -> Maybe b
fractalsea 2017-02-02 00:01:41
reactormonk, that's fmap
reactormonk 2017-02-02 00:02:25
ohh.
Iceland_jack 2017-02-02 00:03:31
fmap @Maybe
Iceland_jack 2017-02-02 00:04:50
I see lambdabot still hasn't enabled TypeApplications
reactormonk 2017-02-02 00:08:59
Hmm, nope, doesn't seem to work out as expected when combining lenses.
ttoe 2017-02-02 00:10:21
if hlint tells me about eta reduce and i follow it's suggestion, is the code compiled exactly the same as if i did not?
opqdonut 2017-02-02 00:11:26
ttoe: the way to be sure is to check whether the core output changes
ttoe 2017-02-02 00:12:32
okay, thanks
opqdonut 2017-02-02 00:13:44
ttoe: so compile with -ddump-simpl for instance
quchen 2017-02-02 00:14:17
ttoe: Eta reduction is generally not a valid transformation in neither GHC nor Haskell, cf. https://github.com/quchen/articles/blob/master/fbut.md#f-x---is-not-f--x---
opqdonut 2017-02-02 00:15:34
that's for toplevel stuff though
opqdonut 2017-02-02 00:15:44
how about the expression (\x -> f x) vs the expression f
opqdonut 2017-02-02 00:17:04
s/toplevel/defining a function/
quchen 2017-02-02 00:17:33
In that case you still have GHC's inlining behaviour
quchen 2017-02-02 00:17:59
And that's not even taking into account strictness
quchen 2017-02-02 00:18:11
> error "broken" `seq` ()
lambdabot 2017-02-02 00:18:14
*Exception: broken
quchen 2017-02-02 00:18:28
> (\x -> error "not broken" x) `seq` ()
lambdabot 2017-02-02 00:18:31
()
quchen 2017-02-02 00:19:16
In other words, (\x -> f x) is never ⊥, even when (f) is
ttoe 2017-02-02 00:20:27
quchen: thanks, will read
quchen 2017-02-02 00:22:12
ttoe: The good news is that this rarely matters, so for the most part you can just choose whatever is nicer to read.
quchen 2017-02-02 00:28:06
ttoe: Concerning HLint, I disable that warning because eta-reducing everything is bad style in my opinion.
quchen 2017-02-02 00:29:26
-> HLint.hs https://github.com/quchen/stgi/blob/master/HLint.hs
nhooyr 2017-02-02 00:33:43
was there ever a solution to https://www.reddit.com/r/haskell/comments/1xvsqg/update_the_problem_with_hot_code_reloading_in/ ?
jophish 2017-02-02 00:42:13
tdammers: Would it be easy to add "space case" to casing. where the words are distinguished by spaces?
jophish 2017-02-02 00:42:27
I'd like to convert from "some string" to "some-string"
noan 2017-02-02 00:43:26
map the space char to - in the input string?
jophish 2017-02-02 00:44:23
noan: that's always an option, I think it would fit quite well in the casing package though