
Hi all, I currently have some code for which I require a uninhabitable Functor. I currently just use - data VoidF a instance Functor VoidF where fmap = undefined Is there a reason something like this is not in the package void? Perhaps we could even have Void1 with kind * -> *, Void2 with kind * -> * -> * etc. I opened a github issue a few days ago but haven't received a response from ekmett yet - https://github.com/ekmett/void/issues/9 -- Anupam

On Thu, Jun 25, 2015 at 07:50:38PM +0530, Anupam Jain wrote:
data VoidF a instance Functor VoidF where fmap = undefined
Is there a reason something like this is not in the package void? Perhaps we could even have Void1 with kind * -> *, Void2 with kind * -> * -> * etc.
You could use 'Const Void', 'Const (Const Void)' etc.. (Const is in Control.Applicative)

On Friday, June 26, 2015, Tom Ellis < tom-lists-haskell-cafe-2013@jaguarpaw.co.uk> wrote:
On Thu, Jun 25, 2015 at 07:50:38PM +0530, Anupam Jain wrote:
data VoidF a instance Functor VoidF where fmap = undefined
Is there a reason something like this is not in the package void? Perhaps we could even have Void1 with kind * -> *, Void2 with kind * -> * -> * etc.
You could use 'Const Void', 'Const (Const Void)' etc..
(Const is in Control.Applicative)
Yes that's perfect! Thanks! -- Anupam -- Sent from my hyper-communicator
participants (2)
-
Anupam Jain
-
Tom Ellis