I have a query type data Query a
Given that Query has no constructors, how can I define an eval function of type:
eval :: Query ~> H.ComponentDSL State Query Void m
Would I have to add a constructor to Query?
I have a query type data Query a
Given that Query has no constructors, how can I define an eval function of type:
eval :: Query ~> H.ComponentDSL State Query Void m
Would I have to add a constructor to Query?
Copyright © 2021 Jogjafile Inc.
Use
type Query = Const Voidandeval = absurd << un Consttype Query=Const Void = data Query a, They all have typeKind -> Kind, and have no constructor.For
eval = absurd <<< un Constmatch typeQuery ~> H.ComponentDSL State Query Void m.absurd :: forall a. Void -> amake sure return type match.un Const :: forall a b -> Const a b -> amake sure input type match (forall a. Query a -> Void)