Advertisement
Guest User

Untitled

a guest
May 21st, 2015
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.39 KB | None | 0 0
  1. let concretizeType (funcInterface : Type) ilType =
  2.     let rec getType ilType =
  3.         let createIFunc inType outType = funcInterface.MakeGenericType([| inType; outType |])
  4.         match ilType with
  5.         | ILInt -> typeof<int>
  6.         | ILBool -> typeof<bool>
  7.         | ILFunc(inputIlType, outputIlType) ->
  8.         createIFunc (getType inputIlType) (getType outputIlType)
  9.     getType ilType
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement