1. 34
    1. 14

      Cannot talk about programming in Haskell types without mentioning this: https://aphyr.com/posts/342-typing-the-technical-interview

    2. 4
      {-# LANGUAGE
          TypeFamilies
        , TypeOperators
        , DataKinds
        , UndecidableInstances
        , NoStarIsType
        , PolyKinds
      #-}
      

      So, GHC’s type system, not Haskell’s

      1. 3

        Ah, a fellow jhc user, I presume?

      2. 3

        hugs hugs

      3. 3

        While you’re certainly correct, Haskell and GHC are synonymous for most people at this point. Whether or not that’s a good thing is another question, but it’s the state that we’re in regardless.

    3. 1

      I really wish there was the ability to have lexically-scoped type synonyms. So many gnarly type signatures would be way more comprehensible if I could use a name for parts of them. As it stands it feels almost like assembly where there are only global variables.

      1. 1

        Do any examples come to mind where you’d like to use this feature?

        1. 2

          I think when using Servant (https://docs.servant.dev/en/stable/tutorial/Client.html) it would have come in handy. You can get pretty far with type synonyms, but it’s a global namespace which has all the classic problems that come with not being able to scope names