<p>This is entirely related to Haskell. The kind of <code>(-&gt;)</code> is <code>* -&gt; * -&gt; *</code> thus in your type signature, both left-hand &amp; right-hand side of <code>-&gt;</code> must have kind <code>*</code> but some of your parameters such as <code>RedeemerType</code> &amp; <code>DatumType</code> are higher kinded. If you are new to all this &quot;kind&quot; jargon, I would suggest <a href="https://diogocastro.com/blog/2018/10/17/haskells-kind-system-a-primer/" rel="nofollow noreferrer">this</a> blog post on it.</p>

CC BY-SA 4.0
2023-04-12T09:07:34.583Z
2023-04-12T09:07:34.583Z
Sourabh
<p>My code is here</p>
<pre><code>marketConstraints :: Market -&gt; TxConstraints (RedeemerType -&gt; ScriptContext -&gt; Bool) (DatumType, ())
marketConstraints market = mustValidateIn (to $ scriptAddress market)
</code></pre>
<p>I am not sure how to do to correct this errors.</p>
<pre><code>src/MarketState.hs:58:87: error:
   • Expecting one more argument to ‘RedeemerType’
      Expected a type, but ‘RedeemerType’ has kind ‘* -&gt; *’
    • In the first argument of ‘TxConstraints’, namely
        ‘(RedeemerType -&gt; ScriptContext -&gt; Bool)’
      In the type signature:
        marketConstraints :: Market
                             -&gt; TxConstraints (RedeemerType
                                               -&gt; ScriptContext -&gt; Bool) (DatumType, ())
   |
58 | marketConstraints :: Market -&gt; TxConstraints (RedeemerType -&gt; ScriptContext -&gt; Bool) (DatumType, ())
   |                                               ^^^^^^^^^^^^

src/MarketState.hs:58:87: error:
    • Expecting one more argument to ‘DatumType’
      Expected a type, but ‘DatumType’ has kind ‘* -&gt; *’
    • In the second argument of ‘TxConstraints’, namely
        ‘(DatumType, ())’
      In the type signature:
        marketConstraints :: Market
                             -&gt; TxConstraints (RedeemerType
                                               -&gt; ScriptContext -&gt; Bool) (DatumType, ())
</code></pre>

<plutus><cardano-cli><smart-contract><haskell><marketing>
Expecting one more argument to ‘RedeemerType’
# Expecting one more argument to ‘RedeemerType’

(Asked by: username_0 on 2023-04-12)

My code is here
marketConstraints :: Market -> TxConstraints (RedeemerType -> ScriptContext -> Bool) (DatumType, ())
marketConstraints market = mustValidateIn (to $ scriptAddress market)

I am not sure how to do to correct this errors.
src/MarketState.hs:58:87: error:
   • Expecting one more argument to ‘RedeemerType’
      Expected a type, but ‘RedeemerType’ has kind ‘* -> *’
    • In the first argument of ‘TxConstraints’, namely
        ‘(RedeemerType -> ScriptContext -> Bool)’
      In the type signature:
        marketConstraints :: Market
                             -> TxConstraints (RedeemerType
                                               -> ScriptContext -> Bool) (DatumType, ())
   |
58 | marketConstraints :: Market -> TxConstraints (RedeemerType -> ScriptContext -> Bool) (DatumType, ())
   |                                               ^^^^^^^^^^^^

src/MarketState.hs:58:87: error:
    • Expecting one more argument to ‘DatumType’
      Expected a type, but ‘DatumType’ has kind ‘* -> *’
    • In the second argument of ‘TxConstraints’, namely
        ‘(DatumType, ())’
      In the type signature:
        marketConstraints :: Market
                             -> TxConstraints (RedeemerType
                                               -> ScriptContext -> Bool) (DatumType, ())

**Tags:** plutus, cardano-cli, smart-contract, haskell, marketing

---

## 1 answers

### Answer by username_1 on 2023-04-12. Score: 0

This is entirely related to Haskell. The kind of `(->)` is `* -> * -> *` thus in your type signature, both left-hand & right-hand side of `->` must have kind `*` but some of your parameters such as `RedeemerType` & `DatumType` are higher kinded. If you are new to all this "kind" jargon, I would suggest [this](https://diogocastro.com/blog/2018/10/17/haskells-kind-system-a-primer/) blog post on it.


---

