Newest at the top
2025-03-21 20:39:36 +0100 | <EvanR> | it's a big difference from imperative I/O code |
2025-03-21 20:39:05 +0100 | <EvanR> | any function wrapped inside IO |
2025-03-21 20:39:02 +0100 | <EvanR> | alskdjf |
2025-03-21 20:38:57 +0100 | <EvanR> | sim590, there's not necessarily any IO wrapped inside IO |
2025-03-21 20:38:51 +0100 | <sim590> | mauke: indeed. |
2025-03-21 20:38:31 +0100 | <mauke> | A -> IO B, I hope, not IO (A -> B) |
2025-03-21 20:38:30 +0100 | <EvanR> | "IO is/is not pure" doesn't fit this for categorical reasons |
2025-03-21 20:38:16 +0100 | <EvanR> | sim590, I'm trying to clarify your premise using traditional jargon |
2025-03-21 20:38:05 +0100 | <sim590> | Of course, when i said I was talking about IO, I was talking about the function which are warapped inside IO. |
2025-03-21 20:37:26 +0100 | <mauke> | I'm talking about the purity of functions like putStrLn, which is indeed a function, and not the purity of IO (), which is not a function |
2025-03-21 20:36:57 +0100 | <mauke> | we're not at odds, I think |
2025-03-21 20:36:11 +0100 | <mauke> | putStrLn is "pure" in the sense that whenever you call it with a particular string, it returns an IO value that is equivalent to any other IO value returned from putStrLn with the same argument |
2025-03-21 20:35:56 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-03-21 20:35:56 +0100 | <sim590> | EvanR, mauke: I'm not sure if I should understand that you are agreeing together or not. |
2025-03-21 20:35:31 +0100 | <tomsmeding> | laurapigeon: I know it's convenient to be able to get haskell tooling from the system package manager, but do consider using ghcup ( https://www.haskell.org/ghcup/ ) instead, if you haven't already -- besides being the main supported way to get haskell tooling these days, it also gives you much more flexibility with versions etc. |
2025-03-21 20:35:14 +0100 | <EvanR> | you don't give them input |
2025-03-21 20:35:13 +0100 | <mauke> | consider, for example: main1 = putStrLn "." >> putStrLn "." >> putStrLn "."; main2 = let x = putStrLn "." in x >> x >> x |
2025-03-21 20:35:03 +0100 | <EvanR> | so this doesn't directly apply |
2025-03-21 20:34:54 +0100 | <EvanR> | IO actions don't have a function type in the first place |
2025-03-21 20:34:50 +0100 | lxsameer | (~lxsameer@Serene/lxsameer) (Ping timeout: 252 seconds) |
2025-03-21 20:34:15 +0100 | <EvanR> | sim590, an impure function is a function that's not pure. A pure function is a (something) which only depends on the input and has side effects (that you care about) |
2025-03-21 20:34:00 +0100 | <mauke> | sim590: if you're taking that approach, then IO is pure, too |
2025-03-21 20:31:56 +0100 | <mauke> | <laurapigeon> [...] I'm new to IRC <- no worries, you're doing great so far |
2025-03-21 20:31:37 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-21 20:31:31 +0100 | <sim590> | function calls had indeed different arguments. Therefore, am I right to say that only IO is impure and that for example, the State monad or even the Maybe monad are not unpure. They are indeed pure? |
2025-03-21 20:31:29 +0100 | <sim590> | effects" of monads are actually just behind the scene just like with the do operator, it is syntaxic sugar, but in the end, there were no side effects, just some computation abstracted away, but this doesn't mean that in two separate calls of a function that is wrapped in a monad that we supply the same argument because the monad actually hides the abstracted some of the arguments and both |
2025-03-21 20:31:27 +0100 | <sim590> | I read on multiple posts on the Web that we categorize a function as "unpure" if it has side-effects and furturemore that when calling that function twice, if it doesn't produce the "same" ouptput for the both calls, then it is not pure. To me, this can only apply to IO and only IO is unpure. I read some places that people assume Monads are unpure, but to me it is not the case, because "side |
2025-03-21 20:29:03 +0100 | Square | (~Square@user/square) Square |
2025-03-21 20:24:34 +0100 | <laurapigeon> | oh a reading issue on my part, good to know this is here |
2025-03-21 20:23:37 +0100 | xeno11 | (~xeno11@c-69-140-170-168.hsd1.de.comcast.net) |
2025-03-21 20:22:30 +0100 | <yushyin> | laurapigeon: https://wiki.archlinux.org/title/Haskell#Static_linking for more information on the static approach |
2025-03-21 20:22:03 +0100 | <laurapigeon> | getting ghc-static from extra made the original command work too, nice! |
2025-03-21 20:20:56 +0100 | <laurapigeon> | Perfect- that worked, thanks a bunch |
2025-03-21 20:20:49 +0100 | <yushyin> | yeah, ghc-static |
2025-03-21 20:20:32 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-03-21 20:20:31 +0100 | <geekosaur> | I think there's a package to get static libs for ghc bootlibs, but not for additional packages |
2025-03-21 20:19:32 +0100 | <geekosaur> | arch and derivatives don't ship static libs, which ghc uses by default. add `-dynamic` |
2025-03-21 20:19:06 +0100 | <laurapigeon> | Sorry if this is the wrong place or way to ask, I'm new to IRC |
2025-03-21 20:18:31 +0100 | <laurapigeon> | terminated by the following: https://paste.tomsmeding.com/akUj6oxa |
2025-03-21 20:18:30 +0100 | <laurapigeon> | Hello! I hope this is the right place to troubleshoot build issues- I'm on a fork of arch linux with the following packages from the arch repos: ghc, cabal-install, stack, haskell-language-server. I can access ghci, import modules and load my own .hs files. But when I try to run `ghc --make helloworld` in a folder with hello world I get the following error. When I try to run ghc-pkg check I get a series of errors like the following, |
2025-03-21 20:15:49 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-21 20:14:33 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 245 seconds) |
2025-03-21 20:13:30 +0100 | laurapigeon | (~laura@205.124.7.51.dyn.plus.net) |
2025-03-21 20:10:14 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-03-21 20:06:30 +0100 | xeno11 | (~xeno11@c-69-140-170-168.hsd1.de.comcast.net) (Ping timeout: 240 seconds) |
2025-03-21 20:04:46 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-03-21 20:01:06 +0100 | forell | (~forell@user/forell) (Ping timeout: 252 seconds) |
2025-03-21 20:00:47 +0100 | caconym | (~caconym@user/caconym) caconym |
2025-03-21 20:00:03 +0100 | caconym | (~caconym@user/caconym) (Quit: bye) |
2025-03-21 20:00:02 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |