aboutsummaryrefslogblamecommitdiff
path: root/html-test/src/ConstructorPatternExport.hs
blob: aa2971d6f83e7bd8c30f87da2adca80d743c42f6 (plain) (tree)
1
                            
























                                                                                
{-# 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