{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} data SomeMessage = forall a. Show (Message a) => SM (Message a) -- 存在型 hoge :: Vector SomeMessage -> Vector Bool hoge = ...