{-# LANGUAGE DeriveDataTypeable, TypeFamilies, TemplateHaskell, DataKinds,
PolyKinds, GADTs, RankNTypes, MultiParamTypeClasses,
FlexibleInstances, UndecidableInstances, CPP,
FunctionalDependencies, StandaloneDeriving,
TypeOperators, ScopedTypeVariables, NoMonomorphismRestriction,
MonadComprehensions, DeriveGeneric, FlexibleContexts,
GeneralizedNewtypeDeriving, ConstraintKinds,
LambdaCase, ViewPatterns, AllowAmbiguousTypes,
DefaultSignatures, -- ImpredicativeTypes,
ImplicitParams, MagicHash, UnboxedTuples, RoleAnnotations,
ExtendedDefaultRules, PatternSynonyms, EmptyCase,
BangPatterns, InstanceSigs,
DeriveFunctor, Arrows -- , PartialTypeSignatures
#-}
module Scratch where
data T a where
MkT :: (Show a, Show b) => a -> b -> T a
pattern P :: (Show a, Show b) => (Eq a, Num a) => b -> T a
pattern P x = MkT 3 x
Not that I expected it to work...