Or-patterns in Dhall


#1

Came across them in a paper here and I have an example here

Simple example of something that might work in Dhall:

let libSuffix =
      λ(os : types.OS) →
        merge
          { (FreeBSD|Linux|Solaris|AIX) = "so"
          , (Darwin|IOS) = "dylib"
          , Windows = "dll"
          }
          os

Might have some subtleties (variables might be bound), but I think it’d be a cool feature to consider.


#2

@vmchale: See:


#3

Ah, thanks! I’ll comment there instead :slight_smile: