blob: 7ebf23ddc52d02516eaf9e14a3555c2b58e3c25d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
data Some = forall a. Some a
foo (Some @a x) = (x :: a)
main = do
print (foo (Some (5 :: Integer)) :: Integer)
|