sveit 2017-03-01 15:51:42
generating the list explicitly isn't so bad. i'm actually a bit surprised there isn't a lens that lets me get/set multiple list elements at once
jchia 2017-03-01 15:52:18
There are different schemes to compress data and they can be combined in different ways. e.g. I may apply difference encoding, followed by RLE, followed by huffman encoding. Given an input stream with known fixed-record structure, I may also choose split out different parts of the records and compress them differently. Is there a library the provides compression and decompression algorithms as combinators that I can easily connect together?
kadoban 2017-03-01 15:52:59
sveit: It's quite possible that there is and I just don't know it.
peddie 2017-03-01 15:53:09
jchia: I don't know of one, but if you find one, please tell me -- I've wanted this too
jchia 2017-03-01 15:53:41
peddie: If I have time, I'll try to make one, but I think it won't be anytime soon.
peddie 2017-03-01 15:53:58
jchia: that's what I concluded too :) good luck
jchia 2017-03-01 15:56:28
peddie: I wonder if binary can be used for this. You can wrap a ByteStream in a newtype that determines the kind of encoding you apply when you compress. Splitting up the input stream is another matter, though.
jchia 2017-03-01 15:56:39
peddie: I man ByteString
jchia 2017-03-01 15:56:39
mean
peddie 2017-03-01 15:57:20
jchia: I don't see any reason that wouldn't work
_sras_ 2017-03-01 16:06:30
Weird "stack build" behavior. says "File name does not match module name. Saw B. Expected A.B", and when I change it to A.B it says "Saw A.B. Expected A". Why does this happen?
Koterpillar 2017-03-01 16:07:06
what is the file name, relative to the cabal file?
_sras_ 2017-03-01 16:07:52
the file is in a folder "src/Config/AbcConfig.hs"
_sras_ 2017-03-01 16:08:28
Koterpillar: Sorry. The filename is "src/Config/AbcConfig.hs"
_sras_ 2017-03-01 16:08:53
Koterpillar: I have added the "src/Config" to the list of source directories.
pikajude 2017-03-01 16:09:08
do you import it from other places
geekosaur 2017-03-01 16:09:33
that may be the problem; if you call the module Config.AbcConfig then you want the source directory to be src not src/Config
_sras_ 2017-03-01 16:10:00
pikajude: Yes. From a module in src folder.
pikajude 2017-03-01 16:10:27
if you have src and a subfolder of src both listed as source directories it will confuse GHC
_sras_ 2017-03-01 16:10:51
pikajude: Ok. So how should it be. Just the "src" folder?
pikajude 2017-03-01 16:10:56
yeah
pikajude 2017-03-01 16:11:13
what happens is that both Config.Foo and Foo become valid names for the module but which one the compiler actually expects depends on how it's imported from other modules
pikajude 2017-03-01 16:11:20
so best just to use src
_sras_ 2017-03-01 16:13:24
pikajude: But now it says "failed to load interface for module"...
pikajude 2017-03-01 16:13:40
whenever i see those errors i usually run a clean and try again
Squarism 2017-03-01 16:19:57
can one see haddock docs in ghci?
monochrom 2017-03-01 16:20:08
No.
pikajude 2017-03-01 16:21:06
ghci would need to be a fully fledged browser then
pikajude 2017-03-01 16:21:13
or at least a pdf viewer
peddie 2017-03-01 16:21:55
it would be cool to be able to get docstrings of some kind in ghci
pikajude 2017-03-01 16:22:11
well they'd have to be added to the object files
peddie 2017-03-01 16:22:31
yes
_sras_ 2017-03-01 16:25:04
pikajude: It worked. Thanks.
Costar 2017-03-01 16:40:13
what mean "type Example a" inside a class using TypeFamilies?