InvalidInstanceHead - PureScript

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

Mason Mackaman

could anyone explain this to me?

class TakeRow (r :: # Type)

-- error
-- instance takeRow :: TakeRow ( a :: Unit )

-- just fine
instance takeRow :: (Union () ( a :: Unit ) r) => TakeRow r
miles

I don't have anything else to add beyond what Jordan mentioned.

PS: You can use the hs tag for better syntax highlighting. Unfortunately no purs support yet.

class TakeRow (r :: # Type)

-- error
-- instance takeRow :: TakeRow ( a :: Unit )

-- just fine
instance takeRow :: (Union () ( a :: Unit ) r) => TakeRow r
Mason Mackaman

You can use the hs tag for better syntax highlighting

ah, so that's how they do it