Search Haskell Channel Logs

Monday, February 20, 2017

#haskell channel featuring ClaudiusMaximus, srhb, lambdabot, slack1256, Tuplanolla, merijn,

srhb 2017-02-20 05:03:59
Is there a module-scoping-alike proposal somewhere? A la with Data.Text { ... }
merijn 2017-02-20 05:04:17
srhb: ezyang's backpack?
merijn 2017-02-20 05:04:28
Or are you meaning something else?
slack1256 2017-02-20 05:05:45
On Pipes.Core, I don't see what is the semantic differece between the request and pull category. Anybody can lend me a hand?
merijn 2017-02-20 05:06:35
I think pull is () and request uses something other than ()?
slack1256 2017-02-20 05:08:05
merijn: it seems you are thinking in `await` which is `request ()` ?
merijn 2017-02-20 05:08:20
slack1256: Yeah
Tuplanolla 2017-02-20 05:10:20
Is anyone up for some lens polishing? Find the given key `k :: Int`, return the value `x :: Char` and delete the key from the submap `n :: Map Int Char`. Do not delete keys from the supermap `m :: Map Ordering (Bool, Map Int Char)`.
Tuplanolla 2017-02-20 05:10:20
@let m = Map.fromList [(LT, (False, Map.fromList [(1, 'a'), (2, 'b')])), (EQ, (True, Map.empty)), (GT, (False, Map.fromList [(3, 'c'), (4, 'd')]))] :: Map Ordering (Bool, Map Int Char)
lambdabot 2017-02-20 05:10:23
.L.hs:161:5: error:
lambdabot 2017-02-20 05:10:23
Not in scope: 'Map.fromList'
lambdabot 2017-02-20 05:10:23
Perhaps you meant one of these:
slack1256 2017-02-20 05:10:36
but you're in the right direction, is the return type what changes
Tuplanolla 2017-02-20 05:10:45
I don't really know how to "search" with lenses.
ClaudiusMaximus 2017-02-20 05:15:56
Tuplanolla: i don't know enough lens to answer, but perhaps considering what should happen if the Int key occurs multiple times in those maps might help reach a sensible answer
Tuplanolla 2017-02-20 05:16:34
That should be impossible, so I'd accept any behavior, ClaudiusMaximus.
Tuplanolla 2017-02-20 05:16:50
Ideally the search would stop on the first match though.
Tuplanolla 2017-02-20 05:38:48
> preview (each . _2 . ix 3) m -- At least this works for getting.
lambdabot 2017-02-20 05:38:51
error:
lambdabot 2017-02-20 05:38:52
Ambiguous occurrence 'm'
lambdabot 2017-02-20 05:38:52
It could refer to either 'Debug.SimpleReflect.m',
Tuplanolla 2017-02-20 05:39:14
> preview (each . _2 . ix 3) L.m
lambdabot 2017-02-20 05:39:18
Just 'c'