| ... | ... | @@ -77,4 +77,38 @@ would be equivalant to | 
| 
 | 
 | 
(\f -> foo { x = case foo of _ {x} -> foo { x = f x }; _ -> foo }) 
 | 
| 
 | 
 | 
 | 
| 
 | 
 | 
 | 
| 
 | 
 | 
``` | 
 | 
 | 
\ No newline at end of file | 
| 
 | 
 | 
```
 | 
| 
 | 
 | 
 | 
| 
 | 
 | 
## open statement
 | 
| 
 | 
 | 
 | 
| 
 | 
 | 
 | 
| 
 | 
 | 
 | 
| 
 | 
 | 
having the ability to 'open' a record bringing all its values into scope would be useful for techniques such as first class modules when combined with [PolymorphicComponents](polymorphic-components). a proposal is
 | 
| 
 | 
 | 
 | 
| 
 | 
 | 
 | 
| 
 | 
 | 
```wiki
 | 
| 
 | 
 | 
 | 
| 
 | 
 | 
data Record = Record { foo :: Int, bar :: String }
 | 
| 
 | 
 | 
 | 
| 
 | 
 | 
f :: Record -> Int
 | 
| 
 | 
 | 
f x = ... where
 | 
| 
 | 
 | 
   open x
 | 
| 
 | 
 | 
   ans = ...
 | 
| 
 | 
 | 
 | 
| 
 | 
 | 
will desugar to
 | 
| 
 | 
 | 
 | 
| 
 | 
 | 
f x = ... where
 | 
| 
 | 
 | 
   Record { foo = foo } = x 
 | 
| 
 | 
 | 
   Record { bar = bar } = x 
 | 
| 
 | 
 | 
   ans = ...
 | 
| 
 | 
 | 
 | 
| 
 | 
 | 
```
 | 
| 
 | 
 | 
 | 
| 
 | 
 | 
 | 
| 
 | 
 | 
open x would be allowed at the top level, in a let binding, or in a where binding.
 | 
| 
 | 
 | 
 | 
| 
 | 
 | 
 | 
| 
 | 
 | 
 | 
| 
 | 
 | 
}}}
 | 
| 
 | 
 | 
 | 
| 
 | 
 | 
 |