Pattern Match Wildcards


#1

(I think maybe this came up in an issue but)

I’ve wanted to use wildcards in Dhall, there’s a couple examples in this file.

let isMac =
      λ(os : types.OS) →
        merge
          { FreeBSD = False
          , OpenBSD = False
          , NetBSD = False
          , Solaris = False
          , Dragonfly = False
          , Linux = False
          , Darwin = True
          , Windows = False
          , Redox = False
          , Haiku = False
          , IOS = False
          , AIX = False
          , Hurd = False
          , Android = False
          , NoOs = False
          }
          os

So in this particular case I think wildcards line up with what I actually want to do (i.e. not a mistake)!


#2

See: https://github.com/dhall-lang/dhall-lang/pull/962


#3

Oh wow! Nvm, thanks for the response though.


#4

You’re welcome! Also, keep in mind that these things can be relitigated. Decisions are not final.


#5

In the bug fixed by the PR, there are some comments about equality test for enum, which seems like what you are looking for here.