YP
Size: a a a
YP
к
YP
IR
data Collection a = Collection
{ thingFoo :: a
, thingBar :: a
}
deriving stock (Show, Functor, Foldable, Traversable, Generic, Generic1)
deriving Applicative via (Co Collection)
instance Distributive Collection where
collect = genericCollect
instance Representable Collection
IR
IR
к
AV
stack exec -- my-exe
и приложение закрывается мгновенно, как будто первая инструкция return 0. Если запускать то же приложение через консоль, то получаю корректную работу + сообщения в консоль. Все каким-то образом связано с зависимостью на cairo, которую я ставил через стаковскую версию mingw: stack exec -- pacman -S bla-bla-bla-cairo
IR
stack exec
, и еще не понимаю почему все завершается без какого-нибудь сообщения об ошибкеghc-options: -optl-mconsole
IR
• Couldn't match representation of type ‘f (WrapCollection
Collection a)’
with that of ‘f (Collection a)’
arising from the coercion of the method ‘distribute’
from type ‘forall (f :: * -> *) a.
Functor f =>
f (WrapCollection Collection a) -> WrapCollection Collection (f a)’
to type ‘forall (f :: * -> *) a.
Functor f =>
f (Collection a) -> Collection (f a)’
NB: We cannot know what roles the parameters to ‘f’ have;
we must assume that the role is nominal
• When deriving the instance for (Distributive Collection)
|
31 | deriving Distributive via (WrapCollection Collection)
| ^^^^^^^^^^^^
IR
type role WrapCollection representational nominalтак всё ещё не знает роль
AV
ghc-options: -optl-mconsole
AV
ghc-options: -optl-mconsole