jaffacakee / elm-tangram

Zijian Chen
0 stars 0 forks source link

Add svg to Model #10

Closed jaffacakee closed 2 years ago

jaffacakee commented 2 years ago

How to add SVG elements to my Model?

type alias Puzzle =
  { image : Html msg
  , imageRotation : Int
  , shape : Shape
  }

Puzzle is a type of my Model, and image is SVG element. But I got error like this:

UNBOUND TYPE VARIABLE - The `Puzzle` type alias uses an unbound type variable #`msg`# in its definition:

44| type alias Puzzle =
45|#>#  { image : Html msg
46|   , imageRotation : Int
47|   , shape : Shape
48|   }

You probably need to change the declaration to something like this:

    type alias Puzzle #msg# = ...
jaffacakee commented 2 years ago

solved