summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc156.hs
blob: aad75019a96b2ee5ec1d1022bc2bf238c701be38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{-# LANGUAGE TypeOperators #-}

-- Test infix type constructors

module ShouldCompile where

infixl 4 :*:
infixl 3 :+:

data a :*: b = a :*: b
data a :+: b = a :+: b

data T a b = T (a `b` Int)

type Foo a b = a `T` b

f :: Int :*: Bool :+: Char
f = (3 :*: True) :+: 'c'