Skip to content
CCPEDIAby Unity Nodes
App Development

Data type inside list in a template

5 posts388 viewsLast activity Jul 2022

  1. joao_santosOP

    Hello.

    I am struggling to understand why can I not create a list of courses inside my template as an attribute.
    Screenshot 2022-07-18 at 00.13.51

  2. cocreature

    Hi @joao_santos and welcome to the forum!

    Can you share a bit more of your code? I suspect the error isn’t quite in the lines you showed. I tried compiling the following locally and it works without any issues on SDK 2.3:

    module Main where
    
    data Course = Course
      with
        subject : Decimal
        price : Decimal
      deriving (Show, Eq)
    
    template Exlainer
      with
        name : Party
        courses : [Course]
      where
        signatory name
    
  3. Stephen

    Additionally, in general on this forum, please share code and error messages as text instead of screenshots using ``` above and below, as explained in this post.

  4. joao_santos

    I figured out what the error was.

    In the respective choice I was doing:

    let courses = delete courses parameter

    And it was not possible

  5. joao_santos

    Thank you! Will do it next time