sm 2017-02-05 08:45:14
muesli4: it's imprecise, but does influence the usage. Also, some cheap tricks: ensure you build one thing at a time (-j1), and build some lower level things first so you are building/linking fewer deps at once (stack build text; stack build myproj)
muesli4 2017-02-05 08:46:16
sm: I'm actually stuck at a single module. :)
sm 2017-02-05 08:46:21
ack
sm 2017-02-05 08:46:39
building with an older/newer GHC might also help
ketil_ 2017-02-05 08:48:01
join #haskell
monochrom 2017-02-05 08:48:11
joined
hpc 2017-02-05 08:48:16
is that a new channel?
ketil_ 2017-02-05 08:49:07
Anybody use travis-ci? Do they support ghc 7.10 or 8 with language:haskell, or is it all the rage these days to use language:c and a huge yml file to hack things to work?
ketil_ 2017-02-05 08:50:35
And: can I just drop ghc 7.4 support now? I'm getting weird errors from using `fmap`.
lyxia 2017-02-05 08:52:33
7.4 is pretty old, but whether you can drop support depends on circumstances only you know of.
ketil_ 2017-02-05 08:54:30
lyxia: just supporting it out of habit - travis-ci makes it easy (but ghc or library incompatibilities make it hard)
muesli4 2017-02-05 08:56:56
sm: Thanks again. Instead of several hours it took only a few minutes.
sm 2017-02-05 09:01:19
muesli4: great, no problem
sternmull 2017-02-05 09:08:51
i am new to haskell. Should i ignore cabal and only use stack? Or do i need to know both?
ph88 2017-02-05 09:09:39
sternmull, start with stack and look into cabal when needed later
dolio 2017-02-05 09:09:47
I completely ignore stack.
sternmull 2017-02-05 09:10:04
now its getting complicated :)
hpc 2017-02-05 09:10:16
sternmull: it helps to know what each thing is
hpc 2017-02-05 09:10:33
sternmull: cabal does dependency resolution, downloads from hackage, and calls ghc to build packages
geekosaur 2017-02-05 09:10:37
sternmull, it's more a religious question tbh
hpc 2017-02-05 09:11:01
sternmull: stack lives on top of cabal and makes reproducible builds by specifying exact versions of packages, exact versions of ghc, and controlling the whole environment
hpc 2017-02-05 09:11:24
you can get by with either, or with neither and just building with ghc directly
sternmull 2017-02-05 09:11:27
for the moment i just want to get started with my tiny learning/test projects. Unfortunately i seem to need cabal/stack projects to make IDEs happy.
hpc 2017-02-05 09:11:30
though doing that last one is pretty miserable
ph88 2017-02-05 09:11:39
the callstack i get when i hit error only prints one callee and not the complete stack, how to get the full callstack ?
monochrom 2017-02-05 09:12:06
. o O ( The stack that can be traced is not the true stack :) )
sm 2017-02-05 09:12:15
hmm do IDEs not support non-cabal/stack code any more ?
hpc 2017-02-05 09:12:20
you might be happiest with cabal if you don't mind managing your environment
hpc 2017-02-05 09:12:41
or you might be happiest with stack if you don't mind being explicit in how everything you write is built
ph88 2017-02-05 09:12:54
monochrom, how to get the true stack? :P
sternmull 2017-02-05 09:12:55
at the moment my linux distro manages ghc and all the related tools.
hpc 2017-02-05 09:14:08
sternmull: in that case, you should use your distro's packaging for installing dependencies of your own code
hpc 2017-02-05 09:14:20
sternmull: or use stack, which has a separate environment if the distro isn't good enough
ph88 2017-02-05 09:14:23
sternmull, i would let stack handle all, i'm also a beginner and i found this the easiest and it works too
sm 2017-02-05 09:14:25
ph88: build in profiling mode, I think
hpc 2017-02-05 09:14:36
your distro will likely have stack as a package already, which makes it easier
ph88 2017-02-05 09:14:46
sm, i'm in ghci, do i need to compile outside of ghci and run ?
hpc 2017-02-05 09:14:47
stack is probably the way to go
maerwald 2017-02-05 09:14:48
cabal sandboxes are fine too
sternmull 2017-02-05 09:14:48
yes, i have stack installed as a package
maerwald 2017-02-05 09:14:56
you don't need stack really
sm 2017-02-05 09:15:11
ph88: yes, I think you'd need to restart ghci with the profiling flag, if that's supported
maerwald 2017-02-05 09:15:14
especially not for development
ph88 2017-02-05 09:15:28
sm, didn't even know ghci takes flags :/
sm 2017-02-05 09:15:48
almost everything takes flags
sternmull 2017-02-05 09:17:37
stack/cabal on windows? Do they both work? If i succeed my project has to run on Windows too.
sm 2017-02-05 09:17:55
stack
hpc 2017-02-05 09:17:56
they both work on windows
hpc 2017-02-05 09:18:03
in my experience, stack is muuuuuuuch better on windows
ph88 2017-02-05 09:18:04
i stopped taking flags since i quit CTF
ph88 2017-02-05 09:18:04
sternmull, i run stack on windows too, no problem
ph88 2017-02-05 09:18:10
sternmull, but sometimes when a haskell library needs some C headers then windows is not easy
hpc 2017-02-05 09:18:43
stack knows how to install some C libraries
sternmull 2017-02-05 09:18:56
ph88: Ok. I want to use yaml. The library depends on a C code...
sm 2017-02-05 09:19:22
use a different lib
sm 2017-02-05 09:20:08
or, build and ship the windows binaries yourself
ph88 2017-02-05 09:20:28
is there even a guide how to dynamic link haskell code on windows ?
hpc 2017-02-05 09:20:47
sm: not gonna lie, i subconsciously read that as "build a ship and sail away from windows"
sm 2017-02-05 09:21:39
heh, it's not that bad.. for some use cases you might need to do that no matter what (build-averse users)
sm 2017-02-05 09:21:54
but picking a pure haskell lib is much better if possible
ph88 2017-02-05 09:22:17
i have this small piece of template haskell https://paste.fedoraproject.org/548251/14863261/ is it possible to pass it a regular function as well ? or can functions only be used with $( ) ?
ph88 2017-02-05 09:23:07
sm, you were right building outside of stack gives slightly more information .. i pass a lot of debug flags that way
sm 2017-02-05 09:24:55
there's stack ghci --ghci-option=... too. Just a bit more hair-pulling
ph88 2017-02-05 09:26:58
i'm not bald yet so i'll give it a go
ph88 2017-02-05 09:27:22
by the way i use stack so i guess it will be something like stack ghci -- --ghci-option ?
Welkin 2017-02-05 09:29:11
or `stack exec -- ghci --option`
sm 2017-02-05 09:30:37
stack ghci --help lists --ghci-option, so 1 (or 3.. but not 2)
sm 2017-02-05 09:31:07
--ghci-options, rather
vxr 2017-02-05 09:32:10
hello
Phyx- 2017-02-05 09:35:16
C sources shouldn't be much of an issue anymore
Phyx- 2017-02-05 09:35:41
ph88: as in, make a dynamic library of your haskell code?
zipper 2017-02-05 09:35:58
Is there a haskell blockchain channel?
zipper 2017-02-05 09:36:02
Seems to me that everything I can find regarding blockchain involves some DSL and not like a haskell lib.
reactormonk 2017-02-05 09:37:25
in ghci, how do I save String instead of IO String from a readFile?
hpc 2017-02-05 09:37:33
save?
Clint 2017-02-05 09:38:15
rescue
EvanR 2017-02-05 09:38:25
ph88: you can factor out the optional methods into a different class which extends the original core one
hpc 2017-02-05 09:38:42
oh wait, derp
hpc 2017-02-05 09:38:54
reactormonk: contents <- readFile "/etc/passwd"
hpc 2017-02-05 09:39:04
ghci is a lot like a giant do-block
pikajude 2017-02-05 09:43:55
with imports
hpc 2017-02-05 09:44:40
reactormonk: if your next question is how to do it in a regular file, the answer is far more educational :D
hpc 2017-02-05 09:45:00
if you don't read about it first