blob: aa2971d6f83e7bd8c30f87da2adca80d743c42f6 (
plain) (
blame)
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
|
{-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
module ConstructorPatternExport (
pattern FooCons
, pattern MyRecCons
, pattern (:+)
, pattern BlubCons
, pattern MyGADTCons
) where
data Foo a = FooCons String a
data MyRec = MyRecCons { one :: Bool, two :: Int }
data MyInfix a = String :+ a
data Blub = forall b. Show b => BlubCons b
data MyGADT :: * -> * where
MyGADTCons :: forall a. Eq a => a -> Int -> MyGADT (Maybe String)
pattern MyGADTCons' :: () => forall a. Eq a => a -> Int -> MyGADT (Maybe String)
pattern MyGADTCons' x y = MyGADTCons x y
|