 
     callTyping ctx, call
     assignCompile ctx, call, (jsBinary "===", compiledA, compiledB)
+
+ms.Set = ms_Set = (ctx, call) ->
+  if hashset = ctx.assignTo()
+    # TODO:
+    throw new Error "matching on sets not supported yet"
+  else
+    items = _arguments call
+    compiledItems = uniformCollectionCompile ctx, call, items, hashsetType
+    assignCompile ctx, call, (irSet compiledItems)
 
 # Before assign the correct type to plus
 # ms['+'] = ms_plus = (ctx, call) ->

# Add library to compile for running macros
eval library

# JS Reserved words

reservedInJs = newSetWith ("abstract arguments boolean break byte case catch char class " +

      (Js.binary "-" y x))"""
    "(fibonacci 7)", 8

  'Map literal'
  """
    data {a: True b: False}

    key? (macro [what in]
      (: (Fn k (Map k i) Bool))
      (Js.call (Js.access in "has") {what}))

    at (macro [key in]
      (: (Fn k (Map k i) i))
      (Js.call (Js.access in "get") {key}))
  """
  """(== (key? "c" data) (at "b" data))""", yes

  'create Set'
  """
    data (Set "a" "b" "c")

    elem? (macro [what in]
      (: (Fn i (Set i) Bool))
      (Js.call (Js.access in "has") {what}))
  """
  """(elem? "a" data)""", yes

  # TODO: support matching with the same name
  #       to implement this we need the iife to take as arguments all variables
