anchor.diff:                  | Replacements.BclTimer
                   | Replacements.BclInt64
                   | Replacements.BclUInt64
  -                | Replacements.BclDecimal
                   | Replacements.BclBigInt -> genericEntity fullName [], []
                   | Replacements.BclHashSet gen
                   | Replacements.FSharpSet gen ->
                       let gens, stmts = transformTypeInfo com ctx r genMap gen
                       genericEntity fullName [ gens ], stmts
  -                | Replacements.BclDictionary(key, value)
  -                | Replacements.BclKeyValuePair(key, value)
  -                | Replacements.FSharpMap(key, value) ->
  -                    let keys, stmts = transformTypeInfo com ctx r genMap key
  -                    let values, stmts' = transformTypeInfo com ctx r genMap value
  -                    genericEntity fullName [
  -                        keys
  -                        values
  -                    ], stmts @ stmts'
  -                | Replacements.FSharpResult(ok, err) ->
  -                    let ent = com.GetEntity(entRef)
  -                    let ok', stmts = transformTypeInfo com ctx r genMap ok
  -                    let err', stmts' = transformTypeInfo com ctx r genMap err
  -                    let expr, stmts'' = transformUnionReflectionInfo com ctx r ent [ ok'; err' ]
  -                    expr, stmts @ stmts' @ stmts''
  -                | Replacements.FSharpChoice gen ->
  -                    let ent = com.GetEntity(entRef)
  -                    let gen, stmts = List.map (transformTypeInfo com ctx r genMap) gen |> Helpers.unzipArgs
  -                    let expr, stmts' = gen |> transformUnionReflectionInfo com ctx r ent
  -                    expr, stmts @ stmts'
  -                | Replacements.FSharpReference gen ->
  -                    let ent = com.GetEntity(entRef)
  -                    let gen, stmts = transformTypeInfo com ctx r genMap gen
  -                    let expr, stmts' = [ gen ] |> transformRecordReflectionInfo com ctx r ent
  -                    expr, stmts @ stmts'
  +            | Types.ienumerableGeneric ->
  +                makeNativeTypeAnnotation com ctx genArgs "IterableIterator"
  +            | Types.result ->
  +                makeUnionTypeAnnotation com ctx genArgs
  +            | entName when entName.StartsWith(Types.choiceNonGeneric) ->
  +                makeUnionTypeAnnotation com ctx genArgs
  +                *)
               | _ ->
  -                let ent = com.GetEntity(entRef)
  -                let generics, stmts = generics |> List.map (transformTypeInfo com ctx r genMap) |> Helpers.unzipArgs
  -                /// Check if the entity is actually declared in JS code
  -                if ent.IsInterface
  -                    || FSharp2Fable.Util.isErasedOrStringEnumEntity ent
  -                    || FSharp2Fable.Util.isGlobalOrImportedEntity ent
  -                    || FSharp2Fable.Util.isReplacementCandidate ent then
  -                    genericEntity ent.FullName generics, stmts
  +                let ent = com.GetEntity(ent)
  +                if ent.IsInterface then
  +                    typingModuleTypeHint "Any" []
                   else
  -                    let reflectionMethodExpr = FSharp2Fable.Util.entityRefWithSuffix com ent Naming.reflectionSuffix
  -                    let callee, stmts' = com.TransformAsExpr(ctx, reflectionMethodExpr)
  -                    Expression.call(callee, generics), stmts @ stmts'
  -                    *)
  +                    match Lib.tryPyConstructor com ctx ent with
  +                    | Some (entRef, stmts) ->
  +                        match entRef with
  +                        (*
  +                        | Literal(Literal.StringLiteral(StringLiteral(str, _))) ->
  +                            match str with
  +                            | "number" -> NumberTypeAnnotation
  +                            | "boolean" -> BooleanTypeAnnotation
  +                            | "string" -> StringTypeAnnotation
  +                            | _ -> AnyTypeAnnotation*)
  +                        | Expression.Name {Id = Identifier id } ->
  +                            makeGenericTypeAnnotation com ctx genArgs id, []
  +                        // TODO: Resolve references to types in nested modules
  +                        | _ -> typingModuleTypeHint "Any" []
  +                    | None -> typingModuleTypeHint "Any" []
  +
  +
  +        | _ ->
  +            typingModuleTypeHint "Any" []
   
   
   module Util =
  
positive.code:             |> libReflectionCall com ctx None "enum", []
          | Fable.Number(kind,_) -> numberInfo kind, []
          | Fable.LambdaType(argType, returnType) ->
              genericTypeInfo "Callable" [| argType; returnType |]
          | Fable.Option(genArg,_)   -> genericTypeInfo "Optional" [| genArg |]
          | Fable.Tuple(genArgs,_)   -> genericTypeInfo "Tuple" (List.toArray genArgs)
          | Fable.Array genArg ->
              match genArg with
              | Fable.Type.Number(UInt8, _) ->
                  typingModuleTypeHint "ByteString" [||]
              | Fable.Type.Number(Int8, _)
              | Fable.Type.Number(Int16, _)
              | Fable.Type.Number(UInt16, _)
              | Fable.Type.Number(Int32, _)
              | Fable.Type.Number(UInt32, _)
              | Fable.Type.Number(Float32, _)
              | Fable.Type.Number(Float64, _) ->
                  pythonModuleTypeHint "array" "array" [||]
              | _ ->
                  typingModuleTypeHint "List" [| genArg |]
          | Fable.List genArg     -> fableModuleTypeInfo "list" "FSharpList" [| genArg |]
          | _ ->
              typingModuleTypeHint "Any" [||]
  (*
          | Fable.DelegateType(argTypes, returnType) ->
              genericTypeInfo "delegate" ([|yield! argTypes; yield returnType|])
          | Fable.Regex           -> nonGenericTypeInfo Types.regex, []
          | Fable.MetaType        -> nonGenericTypeInfo Types.type_, []
          | Fable.AnonymousRecordType(fieldNames, genArgs) ->
              let genArgs, stmts = resolveGenerics (List.toArray genArgs)
              List.zip (List.ofArray fieldNames) genArgs
              |> List.map (fun (k, t) -> Expression.list[ Expression.constant(k); t ])
              |> libReflectionCall com ctx None "anonRecord", stmts
          | Fable.DeclaredType(entRef, generics) ->
              let fullName = entRef.FullName
              match fullName, generics with
              | Replacements.BuiltinEntity kind ->
                  match kind with
                  | Replacements.BclGuid
                  | Replacements.BclTimeSpan
                  | Replacements.BclDateTime
  
negative.code:     let private libReflectionCall (com: IPythonCompiler) ctx r memberName args =
          libCall com ctx r "reflection" (memberName + "_type") args
  
      let private fableModuleAnnotation (com: IPythonCompiler) ctx moduleName memberName args =
          let expr = com.TransformImport(ctx, memberName, getLibPath com moduleName)
          match args with
          | [] -> expr
          | [arg] -> Expression.subscript(expr, arg)
          | args -> Expression.subscript(expr, Expression.tuple(args))
  
      let private pythonModuleAnnotation (com: IPythonCompiler) ctx moduleName memberName args =
          let expr = com.TransformImport(ctx, memberName, moduleName)
          match memberName, args with
          | _, [] -> expr
  