Search Haskell Channel Logs

Friday, January 27, 2017

#haskell channel featuring Zemyla, NemesisD, hpc, kadoban, edwardk, monochrom, and 6 others.

hpc 2017-01-27 12:46:51
biglambda: when cabal does
hpc 2017-01-27 12:47:16
(and likely that will be multiple times)
biglambda 2017-01-27 12:56:13
I see, when would that be. I added a putStrLn to the main function Setup.hs but it doesn't seem to execute.
hpc 2017-01-27 12:56:58
dunno
hpc 2017-01-27 12:57:09
i would question what you need Setup.hs for, honestly
hpc 2017-01-27 12:57:31
it's rare that you need to do anything special in it
biglambda 2017-01-27 12:58:28
Yeah I'm trying to make this package cabal-macosx work
Cale 2017-01-27 12:58:34
poor Setup.hs, nobody loves you :(
biglambda 2017-01-27 12:58:45
Building a mac app
kadoban 2017-01-27 12:58:56
I've never been quite clear what Setup.hs does or why or when you need it, heh.
biglambda 2017-01-27 12:58:56
It's a bit bit-rot.
hpc 2017-01-27 12:59:32
it feels a lot like cabal was at some point modeling itself after autoconf
biglambda 2017-01-27 12:59:59
I'm not a big fan of our current system :(
Cale 2017-01-27 13:00:28
Setup.hs basically lets you program how Cabal performs the various tasks involved in building your package.
Cale 2017-01-27 13:01:06
Setup.hs is actually older than the cabal-install program
hpc 2017-01-27 13:01:22
ooooooh
kadoban 2017-01-27 13:01:27
Was it what people used before cabal-install existed or something, or is that not really accurate?
Cale 2017-01-27 13:01:33
yes
Cale 2017-01-27 13:01:41
For a while anyway, as I recall
kadoban 2017-01-27 13:01:56
Interesting
biglambda 2017-01-27 13:02:13
I would expect that cabal would run it several times everytime I build.
Squarism 2017-01-27 13:08:18
You know the feeling of "This could be done more effective / better, but i lack the knowledge and where to look it up". I get that all the time with haskell. I use Intellij IDEA because i havent heard of a "better" alternaitve. Ive made do wo State, Reader, Writer etc monads - cus i manage. I use the rather primitive HUnit. I sprinkle trace statements allover my code - cause its alteast some logging. Etc.
Squarism 2017-01-27 13:09:51
I really want to learn how to work effectively with haskell - as in produce apps effectively
edwardk 2017-01-27 13:09:56
Zemyla: sorta
edwardk 2017-01-27 13:09:58
:t Control.Lens.Level.levels
lambdabot 2017-01-27 13:09:59
(Indexable Int p, Applicative f) => ATraversal s t a b -> p (Level () a) (f (Level () b)) -> s -> f t
edwardk 2017-01-27 13:10:27
that takes a traversal then evilly turns it into a breadth first traversal of 'levels'
edwardk 2017-01-27 13:10:33
:t Control.Lens.Level.ilevels
lambdabot 2017-01-27 13:10:35
(Indexable Int p, Applicative f) => AnIndexedTraversal i s t a b -> p (Level i a) (f (Level j b)) -> s -> f t
edwardk 2017-01-27 13:10:45
that version works with indexed traversals
Squarism 2017-01-27 13:11:14
..that is: more application programming than going deep into abstractions i dont need (yet).
Squarism 2017-01-27 13:11:27
Where do one read/look?
dgpratt 2017-01-27 13:20:52
seems like most flavors of Haskell regex use bytestrings; I'm not sure if I should be surprised by that or not
hpc 2017-01-27 13:21:11
i am surprised at caring about regexes in haskell
dgpratt 2017-01-27 13:21:31
hpc: you'd use a parser?
hpc 2017-01-27 13:21:42
pretty much always, i think
dgpratt 2017-01-27 13:22:06
what if you want to allow specifying a pattern via a command line argument?
hpc 2017-01-27 13:23:57
haven't ever had to do that
hpc 2017-01-27 13:24:08
but then i might use regexes, admittedlly
geekosaur 2017-01-27 13:28:10
most flavors of haskekll regex defer to C functions which take what Haskell calls bytestrings
Zemyla 2017-01-27 13:28:11
hpc: A DFA-based parser has some desirable characteristics, like linear parsing times.
Zemyla 2017-01-27 13:32:42
Also, a regex is what you get when you have an applicative parser with no fixpoints, so it resembles a tree.
NemesisD 2017-01-27 13:41:11
does GADTs and TypeFamilies imply some other extensions? I have a module that fails to typecheck when gadts or typefamilies is enabled
hpc 2017-01-27 13:42:20
can you paste it?
monochrom 2017-01-27 13:44:10
Amusingly, yes, GADTs implies GADTSyntax XD
monochrom 2017-01-27 13:44:49
I think that was all, no other implications.