6

like this:

auctionInstance = Scripts.validator @Auctioning

and Hello-world app from https://playground.plutus.iohkdev.io/tutorial/tutorials/plutus-playground.html#running-the-hello-world-app

hello = logInfo @String "Hello, world"
10

It means type application.

In this case, the function is polymorphic with the following type:

logInfo :: forall a effs. Member (LogMsg a) effs => a -> Eff effs ()

by using TypeApplications extension, you can use @SomeType hint for the compiler, so the logInfo call is not ambiguous.

logInfo @String "Hello world" means apply type String to functions type variable a (the order depends on the order of type variables in explicit forall section - forall a effs - sometimes you may want to add multiple hints e.g. convert @String @Text someArg otherArg).

Ambiguity here stems from multiple string types in Haskell so you need to tell the compiler which type you are using (String, Text orByteString).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.