summaryrefslogtreecommitdiff
path: root/testsuite/tests/gadt/gadt23.hs
blob: 95e2710292f787c847066e7fe09ca4c6155f524c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# LANGUAGE GADTs #-}

module Main where

import Gadt23_AST

data Foo = Foo { bar :: Int }

convert :: AST a tag -> AST a Foo
convert t = case t of
  Var v     -> Tag (Foo 42) $ Var v
  Tag t e   -> Tag (Foo 42) $ convert e

main = return ()