user6051: I am new to haskell and I am trying to run a few expressions from the English Auction Contract in the repl.
So if I want to run ValidatorHash "f" from the second last line of the Contract in week01, how do I do it in the repl here [nix-shell:~/plutus-pioneer-program/code/week01]$ cabal repl?
What I tried
> import Ledger.ValidatorHash
> Ledger.ValidatorHash "f"
error: Couldn't match expected type ‘PlutusTx.Builtins.Internal.BuiltinByteString’
                  with actual type ‘[Char]’

then
> import PlutusTx.Builtins.Internal
> Ledger.ValidatorHash (BuiltinByteString "f")
error: Couldn't match expected type ‘bytestring-0.10.12.0:Data.ByteString.Internal.ByteString’
                  with actual type ‘[Char]’

then
> import Data.ByString as BS
error: Could not find module ‘Data.ByString’
    Perhaps you meant
      Data.ByteString (needs flag -package-key bytestring-0.10.12.0)
      Data.String (from base-4.14.1.0)

So do I really need to close this repl and figure out the way to open the repl with the flag?
Or is there something very obvious that I am missing?

Edit #1: added non-typo error for bytestring
> import Data.ByteString as BS
error: Could not load module ‘Data.ByteString’
    It is a member of the hidden package ‘bytestring-0.10.12.0’.
    Perhaps you need to add ‘bytestring’ to the build-depends in your .cabal file.

Looks like bytestring is hidden. Is it still possible to run ValidatorHash "f" using any other means?

Edit #2
My question was initially specific to find out the origin of 66 when using the token in week01 code as ValidatorHash "f" is taken from this statement in the contract myToken = KnownCurrency (ValidatorHash "f") "Token" (TokenName "T" :| []). But I was unable to evaluate it.

user5926: Somewhere you have a typo. "ByString" should be "ByteString".

user6051: It was newbie mistake. There are these lines at the top
{-# LANGUAGE DataKinds                  #-}
{-# LANGUAGE DeriveAnyClass             #-}
{-# LANGUAGE DeriveGeneric              #-}
{-# LANGUAGE DerivingStrategies         #-}
{-# LANGUAGE FlexibleContexts           #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase                 #-}
{-# LANGUAGE MultiParamTypeClasses      #-}
{-# LANGUAGE NoImplicitPrelude          #-}
{-# LANGUAGE OverloadedStrings          #-}
{-# LANGUAGE RecordWildCards            #-}
{-# LANGUAGE ScopedTypeVariables        #-}
{-# LANGUAGE TemplateHaskell            #-}
{-# LANGUAGE TypeApplications           #-}
{-# LANGUAGE TypeFamilies               #-}
{-# LANGUAGE TypeOperators              #-}

I ran the following in the repl
:set -XDataKinds
:set -XDeriveAnyClass
:set -XDeriveGeneric
:set -XDerivingStrategies
:set -XFlexibleContexts
:set -XGeneralizedNewtypeDeriving
:set -XLambdaCase
:set -XMultiParamTypeClasses
:set -XNoImplicitPrelude
:set -XOverloadedStrings
:set -XRecordWildCards
:set -XScopedTypeVariables
:set -XTemplateHaskell
:set -XTypeApplications
:set -XTypeFamilies
:set -XTypeOperators

and then simply evaluated the expression and it worked!
> Ledger.ValidatorHash "f"
66


6051: <p>I am new to haskell and I am trying to run a few expressions from the <a href="https://github.com/input-output-hk/plutus-pioneer-program/blob/main/code/week01/src/Week01/EnglishAuction.hs" rel="nofollow noreferrer">English Auction Contract</a> in the repl.</p>
<p>So if I want to run <code>ValidatorHash &quot;f&quot;</code> from the second last line of the Contract in week01, how do I do it in the repl here <code>[nix-shell:~/plutus-pioneer-program/code/week01]$ cabal repl</code>?</p>
<p>What I tried</p>
<pre><code>&gt; import Ledger.ValidatorHash
&gt; Ledger.ValidatorHash &quot;f&quot;
error: Couldn't match expected type ‘PlutusTx.Builtins.Internal.BuiltinByteString’
                  with actual type ‘[Char]’
</code></pre>
<p>then</p>
<pre><code>&gt; import PlutusTx.Builtins.Internal
&gt; Ledger.ValidatorHash (BuiltinByteString &quot;f&quot;)
error: Couldn't match expected type ‘bytestring-0.10.12.0:Data.ByteString.Internal.ByteString’
                  with actual type ‘[Char]’
</code></pre>
<p>then</p>
<pre><code>&gt; import Data.ByString as BS
error: Could not find module ‘Data.ByString’
    Perhaps you meant
      Data.ByteString (needs flag -package-key bytestring-0.10.12.0)
      Data.String (from base-4.14.1.0)
</code></pre>
<p>So do I really need to close this repl and figure out the way to open the repl with the flag?
Or is there something very obvious that I am missing?</p>
<hr />
<p>Edit #1: added non-typo error for bytestring</p>
<pre><code>&gt; import Data.ByteString as BS
error: Could not load module ‘Data.ByteString’
    It is a member of the hidden package ‘bytestring-0.10.12.0’.
    Perhaps you need to add ‘bytestring’ to the build-depends in your .cabal file.
</code></pre>
<p>Looks like bytestring is hidden. Is it still possible to run <code>ValidatorHash &quot;f&quot;</code> using any other means?</p>
<hr />
<p>Edit #2</p>
<p>My question was initially specific to find out the origin of <code>66</code> when using the token in week01 code as <code>ValidatorHash &quot;f&quot;</code> is taken from this statement in the contract <code>myToken = KnownCurrency (ValidatorHash &quot;f&quot;) &quot;Token&quot; (TokenName &quot;T&quot; :| [])</code>. But I was unable to evaluate it.</p>
 5926: <p>Somewhere you have a typo. &quot;ByString&quot; should be &quot;ByteString&quot;.</p>
 6051: <p>It was newbie mistake. There are these lines at the top</p>
<pre><code>{-# LANGUAGE DataKinds                  #-}
{-# LANGUAGE DeriveAnyClass             #-}
{-# LANGUAGE DeriveGeneric              #-}
{-# LANGUAGE DerivingStrategies         #-}
{-# LANGUAGE FlexibleContexts           #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase                 #-}
{-# LANGUAGE MultiParamTypeClasses      #-}
{-# LANGUAGE NoImplicitPrelude          #-}
{-# LANGUAGE OverloadedStrings          #-}
{-# LANGUAGE RecordWildCards            #-}
{-# LANGUAGE ScopedTypeVariables        #-}
{-# LANGUAGE TemplateHaskell            #-}
{-# LANGUAGE TypeApplications           #-}
{-# LANGUAGE TypeFamilies               #-}
{-# LANGUAGE TypeOperators              #-}
</code></pre>
<p>I ran the following in the repl</p>
<pre><code>:set -XDataKinds
:set -XDeriveAnyClass
:set -XDeriveGeneric
:set -XDerivingStrategies
:set -XFlexibleContexts
:set -XGeneralizedNewtypeDeriving
:set -XLambdaCase
:set -XMultiParamTypeClasses
:set -XNoImplicitPrelude
:set -XOverloadedStrings
:set -XRecordWildCards
:set -XScopedTypeVariables
:set -XTemplateHaskell
:set -XTypeApplications
:set -XTypeFamilies
:set -XTypeOperators
</code></pre>
<p>and then simply evaluated the expression and it worked!</p>
<pre><code>&gt; Ledger.ValidatorHash &quot;f&quot;
66
</code></pre>
