Tuplanolla 2017-02-03 04:54:50
Is it possible to copy the constructor into my module and `unsafeCoerce` the result?
Lokathor 2017-02-03 04:55:14
Tuplanolla, unlikely
Lokathor 2017-02-03 04:55:42
though i'm no expert, i think that if you copied all their stuff into your module you'd just have a new type that didn't work with the rest of their functions
Tuplanolla 2017-02-03 04:56:03
Thus the `unsafeCoerce`, Lokathor.
Tuplanolla 2017-02-03 05:33:11
That's a segmentation fault.
Cale 2017-02-03 05:34:24
Tuplanolla: Yeah, you can try stuff like that, but you need to be really careful about how everything is compiled, and I wouldn't generally recommend it.
lyxia 2017-02-03 05:34:34
what a relief
mbrock 2017-02-03 05:36:19
lens newbie question: I have a "Map Int Word8" but I often want to work with it as if it were "Map Int Word32", e.g. to set a 32-bit word at a certain byte index. I think I should define some kind of traversal, but I'm a bit confused
Cale 2017-02-03 05:36:55
uhhh, what?
Tuplanolla 2017-02-03 05:37:17
It seems to work if I compile both with the same flags though.
mbrock 2017-02-03 05:38:04
I want to do stuff like ``memory & words32 . ix 7 .~ 0xffffffff``, which would actually set the values at indices 7, 8, 9, 10
Gurkenglas 2017-02-03 05:38:05
mbrock, that sounds like you expect each index to already have a value - why is this a map?
mbrock 2017-02-03 05:38:21
Gurkenglas: it's a weird kind of sparse memory
Gurkenglas 2017-02-03 05:38:34
I see, makes sense
Gurkenglas 2017-02-03 05:39:01
You'll have to do two passes, but this is just a lens
Cale 2017-02-03 05:39:30
mbrock: Well, start by just writing the view and set operations normally without lens. You can turn them into a lens after.
mbrock 2017-02-03 05:43:06
ah, yes. I think it will be more like ``memory & word32at 7 .~ 0xffffffff``, so I should write a ``Int -> Lens' (Map Int Word8) Word256``
reactormonk 2017-02-03 05:43:20
Is it possible to make a lens that can't always set, because not all the values are valid in the container?
saylu 2017-02-03 05:43:26
Hey folks! Quick question -- anyone know of good resources for learning more about CoArbitrary from QuickCheck (aside from the documentation)?
reactormonk 2017-02-03 05:43:35
or rather, how's that called?
Gurkenglas 2017-02-03 05:44:29
reactormonk, you mean "Prism' t a -> Lens' s a -> t -> s -> s"?
reactormonk 2017-02-03 05:44:40
saylu, it's +/- obj => Seed, so you can seed another Gen