In #238 I have added FromList typeclass with fromList that behaves very similar to GHC.Exts.IsList.fromList.
And it is defined for NonEmpty too. This means that the following code:
a = fromList [] :: NonEmpty a
as well as the following code:
{-# LANGUAGE OverloadedLists #-}
a = [] :: NonEmpty a
will fail. However, unlike in IsList, currently we will have a callstack attached to the error.
We should consider pros and cons of removing this instance.
In #238 I have added
FromListtypeclass withfromListthat behaves very similar toGHC.Exts.IsList.fromList.And it is defined for
NonEmptytoo. This means that the following code:as well as the following code:
{-# LANGUAGE OverloadedLists #-} a = [] :: NonEmpty awill fail. However, unlike in
IsList, currently we will have a callstack attached to the error.We should consider pros and cons of removing this instance.