Created
          May 28, 2015 16:23 
        
      - 
      
- 
        Save hodzanassredin/077c06d0320fca3e093b to your computer and use it in GitHub Desktop. 
    inline shadows
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | open System | |
| type Pure = Pure of unit | |
| type Impure = Impure of unit | |
| type M<'a,'p> = M of 'a | |
| let purev x : M<_,Pure>= M(x) | |
| let purev x : M<_,Impure>= M(x) | |
| type ThingThatShows = | |
| static member show(x: Option<Pure> ) = sprintf "pure" | |
| static member show(x: Option<Impure>) = sprintf "impure" | |
| let f (x:M<'a,_>, y:M<'a,_>) :M<'a,_> = match | |
| purev |> ThingThatShows.show |> Console.WriteLine | |
| impurev |> ThingThatShows.show |> Console.WriteLine | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment