-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
This works:
data Foo a where
MkFoo :: Foo Bool
data Bar a where
MkBar :: Int -> Bar Int
deriveUniverseSome ''Foo
deriveUniverseSome ''BarBut if you replace that MkBar's argument (Int) with Foo a, it will fail:
data Foo a where
MkFoo :: Foo Int
data Bar a where
MkBar :: Foo a -> Bar a
deriveUniverseSome ''Foo
deriveUniverseSome ''BarThe compile error being:
• No instance for (Universe (Foo a0))
arising from a use of ‘universe’
• In the second argument of ‘(Data.Universe.Helpers.<+*+>)’, namely
‘universe’
In the second argument of ‘map’, namely
‘([MkBar] Data.Universe.Helpers.<+*+> universe)’
In the expression:
(map Some) ([MkBar] Data.Universe.Helpers.<+*
|
1800 | deriveUniverseSome ''Bar
| ^^^^^^^^^^^^^^^^^^^^^^^^
I'd think it should be using the SomeUniverse Foo (or Universe (Some Foo)) instance instead?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels