1. 30
  1.  

  2. 14

    IHP is supposed to become the Django/Rails/Phoenix of Haskell.

    I’ve been using Django professionally for since 2013, but have started using IHP a couple of weeks ago. It’s still quite early but with surprisingly few rough edges, i.e. the developer ergonomics are much better than I expected. It has great documentation that is improving rapidly (as opposed to many other Haskell libraries, which provide little more than API docs or even just the typed function definitions) and offers a refreshing take on database management and migrations.

    Some of its killer features:

    • HSX, a JSX-like template language that looks like HTML while providing type safety
    • Auto live reloading without the need to setup anything
    • Documentation with examples: it lets you query the database without learning about monads
    • it defines |> for you ;-)
    • type-safe, composable SQL queries:
    projects <- query @Project
      |> filterWhere (#userId, userId)
      |> filterWhere (#deleted, False)
      |> orderBy #createdAt
      |> fetch
    
    1. 1

      it defines |> for you

      Data.Function.&?

        1. 1

          See here for its implementation.

          I prefer my code snipped from above to using & or . for composition for this specific use case.

      1. 1

        fuck.
        yes.