<p>Take into account that <strong>:t</strong> is for getting the type of a function, and <strong>EmulatorEvent'</strong> is not a function but a type. So, because it's a type you can use <code>:i EmulatorEvent'</code> but not <code>:t EmulatorEvent'</code>.</p>
<p>You can use <strong>:t</strong> with the constructors (they are functions) of <strong>EmulatorEvent'</strong>, say <code>:t ChainEvent</code>.</p>
<p><a href="https://i.sstatic.net/AWcL7.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/AWcL7.png" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2022-02-06T01:43:35.657Z
Part of me thinks this should "fail" gracefully, since the focus of the monad video was elegant failure.
XiTouch
CC BY-SA 4.0
2022-02-06T10:40:50.713Z
What do you mean with fail gracefully? Can you elaborate?
kindofdev
CC BY-SA 4.0
2022-02-06T19:49:35.090Z
@XiTouch, Do you consider that my answer is correct? I so, you might accept it and help others wiith the same question. Thanks!
kindofdev
CC BY-SA 4.0
2022-02-06T20:52:52.520Z
your answer is helpful, correct, useful, the best offered, and the best ever likely to be offered so yes, it's "answered" and thank you. By "fail gracefully" I mean cabal should produce a message that is helpful and accurately informative, rather than basically "you screwed up, I won't help you, you should know better." For example, a message like "foo is not a type. Use {>:i foo} for info about foo".
XiTouch
CC BY-SA 4.0
2022-02-06T21:41:25.360Z
@XiTouch, I agree that the message is not very helpful (in general Haskell error messages are not good), but this message doesn't come from cabal or Plutus. :t and :i is a ghci thing.
kindofdev
CC BY-SA 4.0
2022-02-06T00:34:34.140Z
2022-02-06T00:45:18.020Z
2022-02-06T00:45:18.020Z
kindofdev
<p>Doing week 04, watching &quot;PPP 030403 - The EmulatorTrace Monad&quot;</p>
<p>In the repl, having already imported as follows</p>
<blockquote><pre>
>import Data.Char
>import Text.Read
>import Plutus.Trace.Emulator
>import Data.Default
</pre></blockquote>
<p>If I enter &quot;:t TraceConfig&quot; I see</p>
<blockquote><pre>
Prelude Data.Char Text.Read Plutus.Trace.Emulator Data.Default> :t TraceConfig
TraceConfig
  :: (Wallet.Emulator.MultiAgent.EmulatorEvent' -> Maybe String)
     -> GHC.IO.Handle.Types.Handle -> TraceConfig
Prelude Data.Char Text.Read Plutus.Trace.Emulator Data.Default>
</pre></blockquote>
Attempting to explore that, I enter (and get error) as follows:
<blockquote><pre>
Prelude Data.Char Text.Read Plutus.Trace.Emulator Data.Default> :t Wallet.Emulator.MultiAgent.EmulatorEvent'
 
:1:1: error:
&nbsp;&nbsp;&nbsp;&nbsp;Not in scope:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data constructor ‘Wallet.Emulator.MultiAgent.EmulatorEvent'’
&nbsp;&nbsp;&nbsp;&nbsp;No module named ‘Wallet.Emulator.MultiAgent’ is imported.
&nbsp;
&nbsp;
Prelude Data.Char Text.Read Plutus.Trace.Emulator Data.Default> :i Wallet.Emulator.MultiAgent.EmulatorEvent'
type Wallet.Emulator.MultiAgent.EmulatorEvent' :: *
data Wallet.Emulator.MultiAgent.EmulatorEvent'
&nbsp;&nbsp;= Wallet.Emulator.MultiAgent.ChainEvent Wallet.Emulator.Chain.ChainEvent
&nbsp;&nbsp;| Wallet.Emulator.MultiAgent.ClientEvent Wallet.Emulator.Wallet.Wallet
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Wallet.Emulator.NodeClient.NodeClientEvent
&nbsp;&nbsp;| Wallet.Emulator.MultiAgent.WalletEvent Wallet.Emulator.Wallet.Wallet
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Wallet.Emulator.Wallet.WalletEvent
&nbsp;&nbsp;| Wallet.Emulator.MultiAgent.ChainIndexEvent Wallet.Emulator.Wallet.Wallet
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;plutus-chain-index-core-0.1.0.0:Plutus.ChainIndex.ChainIndexLog.ChainIndexLog
&nbsp;&nbsp;| Wallet.Emulator.MultiAgent.SchedulerEvent Plutus.Trace.Scheduler.SchedulerLog
&nbsp;&nbsp;| Wallet.Emulator.MultiAgent.InstanceEvent Plutus.Trace.Emulator.Types.ContractInstanceLog
&nbsp;&nbsp;| Wallet.Emulator.MultiAgent.UserThreadEvent Plutus.Trace.Emulator.Types.UserThreadMsg
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- Defined in ‘Wallet.Emulator.MultiAgent’
instance Eq Wallet.Emulator.MultiAgent.EmulatorEvent'
&nbsp;&nbsp;-- Defined in ‘Wallet.Emulator.MultiAgent’
instance Show Wallet.Emulator.MultiAgent.EmulatorEvent'
&nbsp;&nbsp;-- Defined in ‘Wallet.Emulator.MultiAgent’
Prelude Data.Char Text.Read Plutus.Trace.Emulator Data.Default>
</pre></blockquote>
My question is, why does ":i" (requesting info about) work, but ":t" (requesting merely the type, which is actually included in the info) does not?
 
Tracking these multiple nestings of data structures is straining my brain.

<plutus><plutus-pioneer-program><repl>
Why would ">:i " work in the repl but not "> :t "?
# Why would ">:i " work in the repl but not "> :t "?

(Asked by: username_0 on 2022-02-06)

Doing week 04, watching "PPP 030403 - The EmulatorTrace Monad"
In the repl, having already imported as follows

>import Data.Char
>import Text.Read
>import Plutus.Trace.Emulator
>import Data.Default

If I enter ":t TraceConfig" I see

Prelude Data.Char Text.Read Plutus.Trace.Emulator Data.Default> :t TraceConfig
TraceConfig
  :: (Wallet.Emulator.MultiAgent.EmulatorEvent' -> Maybe String)
     -> GHC.IO.Handle.Types.Handle -> TraceConfig
Prelude Data.Char Text.Read Plutus.Trace.Emulator Data.Default>

Attempting to explore that, I enter (and get error) as follows:

Prelude Data.Char Text.Read Plutus.Trace.Emulator Data.Default> :t Wallet.Emulator.MultiAgent.EmulatorEvent'
 
:1:1: error:
    Not in scope:
      data constructor ‘Wallet.Emulator.MultiAgent.EmulatorEvent'’
    No module named ‘Wallet.Emulator.MultiAgent’ is imported.
 
 
Prelude Data.Char Text.Read Plutus.Trace.Emulator Data.Default> :i Wallet.Emulator.MultiAgent.EmulatorEvent'
type Wallet.Emulator.MultiAgent.EmulatorEvent' :: *
data Wallet.Emulator.MultiAgent.EmulatorEvent'
  = Wallet.Emulator.MultiAgent.ChainEvent Wallet.Emulator.Chain.ChainEvent
  | Wallet.Emulator.MultiAgent.ClientEvent Wallet.Emulator.Wallet.Wallet
                                          Wallet.Emulator.NodeClient.NodeClientEvent
  | Wallet.Emulator.MultiAgent.WalletEvent Wallet.Emulator.Wallet.Wallet
                                         Wallet.Emulator.Wallet.WalletEvent
  | Wallet.Emulator.MultiAgent.ChainIndexEvent Wallet.Emulator.Wallet.Wallet
                                          plutus-chain-index-core-0.1.0.0:Plutus.ChainIndex.ChainIndexLog.ChainIndexLog
  | Wallet.Emulator.MultiAgent.SchedulerEvent Plutus.Trace.Scheduler.SchedulerLog
  | Wallet.Emulator.MultiAgent.InstanceEvent Plutus.Trace.Emulator.Types.ContractInstanceLog
  | Wallet.Emulator.MultiAgent.UserThreadEvent Plutus.Trace.Emulator.Types.UserThreadMsg
      -- Defined in ‘Wallet.Emulator.MultiAgent’
instance Eq Wallet.Emulator.MultiAgent.EmulatorEvent'
  -- Defined in ‘Wallet.Emulator.MultiAgent’
instance Show Wallet.Emulator.MultiAgent.EmulatorEvent'
  -- Defined in ‘Wallet.Emulator.MultiAgent’
Prelude Data.Char Text.Read Plutus.Trace.Emulator Data.Default>

My question is, why does ":i" (requesting info about) work, but ":t" (requesting merely the type, which is actually included in the info) does not?
 
Tracking these multiple nestings of data structures is straining my brain.

**Tags:** plutus, plutus-pioneer-program, repl

---

## 1 answers

### Answer by username_1 on 2022-02-06. Score: 4 | Accepted answer

Take into account that **:t** is for getting the type of a function, and **EmulatorEvent'** is not a function but a type. So, because it's a type you can use `:i EmulatorEvent'` but not `:t EmulatorEvent'`.

You can use **:t** with the constructors (they are functions) of **EmulatorEvent'**, say `:t ChainEvent`.

[![enter image description here](https://i.sstatic.net/AWcL7.png)](https://i.sstatic.net/AWcL7.png)

> **Comments:**
> **username_0**: Part of me thinks this should "fail" gracefully, since the focus of the monad video was elegant failure.  
> **username_1**: What do you mean with fail gracefully? Can you elaborate?  
> **username_1**: @XiTouch, Do you consider that my answer is correct? I so, you might accept it and help others wiith the same question. Thanks!  
> **username_0**: your answer is helpful, correct, useful, the best offered, and the best ever likely to be offered so yes, it's "answered" and thank you. By "fail gracefully" I mean cabal should produce a message that is helpful and accurately informative, rather than basically "you screwed up, I won't help you, you should know better." For example, a message like "foo is not a type. Use {>:i foo} for info about foo".  
> **username_1**: @XiTouch, I agree that the message is not very helpful (in general Haskell error messages are not good), but this message doesn't come from cabal or Plutus. :t and :i is a ghci thing.  

---

