anchor.diff:                                      ()
                                   else
                                       failwithf "Invalid multiple use of variable name for differently typed Views: %s" name
  -                            | true, Hole.Simple vh ->
  +                            | true, Hole.Simple _
  +                            | true, Hole.Event ->
                                   failwithf "Invalid multiple use of variable name in the same template: %s" name
                               | false, _ ->
                                   holes.Add(name, Hole.View typeof<'T>)
                               Expr.Var (Var (name, typeof<View<'T>>)) |> Expr.Cast
  +
  +                        let getEventHole name : Expr<WebSharper.JavaScript.Dom.Event -> unit> =
  +                            match holes.TryGetValue(name) with
  +                            | true, Hole.Event -> ()
  +                            | true, Hole.Simple _
  +                            | true, Hole.Var _
  +                            | true, Hole.View _ ->
  +                                failwithf "Invalid multiple use of variable name in the same template: %s" name
  +                            | false, _ ->
  +                                holes.Add(name, Hole.Event)
  +                            Expr.Var (Var (name, EventTy)) |> Expr.Cast
   
                           let getParts (t: string) =
                               if t = "" then [] else
  
positive.code: 
      let ViewOf ty = typedefof<View<_>>.MakeGenericType([|ty|])
      let VarOf ty = typedefof<Var<_>>.MakeGenericType([|ty|])
  
      [<RequireQualifiedAccess>]
      type Hole =
          | Var of valTy: System.Type * hasView: bool
          | View of valTy: System.Type
          | Simple of ty: System.Type
  
          member this.ArgType =
              match this with
              | Var (valTy = t) -> VarOf t
              | View (valTy = t) -> ViewOf t
              | Simple (ty = t) -> t
  
  [<TypeProvider>]
  
negative.code:                                         let n = a.Name.LocalName
                                          if n.StartsWith dataEvent then
                                              let eventName = n.[dataEvent.Length..]
                                              <@ Attr.Handler eventName %(getEventHole a.Value) @>
                                          else
                                              match getParts a.Value with
                                              | [] -> <@ Attr.Create n "" @>
  