blob: d60293a4417d83ad860ad57ee6ee7e8277f497fd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
{-# LANGUAGE AllowAmbiguousTypes, TypeFamilies #-}
-- Type of x is ambiguous
module T2693 where
type family TFn a :: *
-- Boiled down version
f :: Maybe ()
f = do
let Just x = undefined :: Maybe (TFn a)
let n = fst x + fst x
return ()
f2 :: Maybe ()
f2 = do
let x :: TFn a
x = undefined
let n = fst x + snd x
return ()
-- Close to the original report
data PVR a = PVR {pvrX :: Int} deriving (Eq)
g :: () -> Maybe (TFn a)
g _ = undefined
h :: Maybe ()
h = do pvs <- mapM g undefined
let n = (map pvrX pvs) `min` (map pvrX pvs)
undefined
|