Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Mihai Maruseac
    oh, that makes sense now; I made a PR a while ago and all tests passed and now I see I actually broke one integration test
    Hi, was hoping I could do a quick check if anyone knows: Is everything from The Haskell Book (http://haskellbook.com/) still current? Like syntax and so forth. Any errata?
    Chris Allen
    It's pretty up to datw
    There are only minor things like slightly different type signatures. I'm doing a pass of the book to harmonize it with GHC 8.4.3 right now.
    Saurabh Nanda
    Last message
    Last messge sent 2 months ago. Wow!
    Mihai Maruseac
    But we're still here
    Greetings, ladies&gents. Anyone worked with Ajax on a warp-server once?
    Lyle Kopnicky

    Hi @snoyberg (or anyone else who might have input), I have a question about using RIO. I have an application that first needs to load some config files and do some transformation of them. I'd like to store the config file data in the RIO environment (App), but that means I can't populate the App and call runRIO until I've collected that config data.

    Unfortunately that means that if I encounter errors in the config file data, I can't call logError, etc., since I'm not yet in the RIO monad. This seems like a sort of chicken-and-egg problem.

    Is the appropriate solution to bootstrap by using App types and separate phases of runRIO? E.g, create a Bootstrap datatype for the phase where it's loading the config files. It would already be set up with a logger and process context. Once that is done and has loaded the config data, that call to runRIO would return a Config structure. Then I'd have an App type which included everything from Bootstrap plus the Config data, and I'd do a second call to runRIO.

    Only thing is, it seems like a bit of redundant boilerplate to have to create two similar data types, Bootstrap and App, where App just has one additional field.

    Is there a more canonical way of handling this?

    Michael Snoyman
    That's the right directional way of doing this, and very close to what we do in Stack. If all you need is process execution and logging, you can use the built in SimpleApp.
    Lyle Kopnicky
    SimpleApp would probably work at that point, thanks.
    It also occurred to me that I could put the Config data in an MVar and just not initialize it until I have something to put in it. But if I accidentally wrote code in the bootstrap phase that tried to read the MVar, it would just hang. Sort of the MVar version of having a Maybe and assuming that it's a Just.
    Ben MacAdam
    Hi - I have a question about how to set up Stack for an academic setting. Right now I
    Mihai Maruseac
    @benjamin-macadam your message got interrupted
    Ben MacAdam
    Sorry about that! I've been trying to get stack working on a university lab for a few days now - the main issue is that each user's environment takes up about 8GB of space. Is there any way to set a global stack root? I'm trying to share the same .stack folder between two users on my personal laptop and I'm getting permissions errors.
    Mihai Maruseac
    try chmod -R 777 on that shared folder; or creating a new group and adding both users to the same group
    Pawel Szulc
    hi all, question regarding stack: does stack have ability to extend it via some sort of plugins mechanism?
    to give an example, lets say my project has some ProtoBuffs definitions (I do hope I never ever have to work on project that uses protobuffs, but lets imagine that I do)
    I could write a plugin (generic solution) that would read that protobuf definitions and generate haskell code from it
    Having that plugin I could reuse it for my different projects, open source it for other folks to use
    adding a bit more "declarativity" to haskell builds
    does stack has anything like that? is it doable?
    Łukasz Gołębiewski
    Pawel Szulc
    and if it does not exist, how difficult would it be to extend stack with such feature?
    Pawel Szulc
    question regarding stack integration with nix
    it used to be that when nix was enabled I only got non-haskell deps from nix (C libs etc)
    now recently I see that GHC is being downloaded from nix-cache
    did support for nix changed over time?

    docs https://docs.haskellstack.org/en/stable/nix_integration/ are still saying

    When using the Nix integration, Haskell dependencies are handled as usual: They are downloaded from Stackage and built locally by Stack. Nix is used by Stack to provide the non-Haskell dependencies needed by these Haskell packages.

    Pawel Szulc
    Is gitter abandoned?