blob: 360c2358a225e94e1af461115a9bced7cff065e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
{-# LANGUAGE ExistentialQuantification, LambdaCase, LinearTypes #-}
module T19400 where
data Stream = forall s. Stream (Either s s)
f :: x %m -> y %m -> Int
f x y = f x y
step' :: () -> Stream -> Int
step' x (Stream s) =
(\case
Left y -> f x y
Right y -> f x y) s
|