statebox / purescript-halogen-svg

SVG support for purescript-halogen, including SVG animations
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

Issue with the strokeWidth prop #8

Open prescientmoon opened 4 years ago

prescientmoon commented 4 years ago

So say I have this simple code:

 SE.rect
      [ SA.stroke $ Just $ SA.RGB 118 255 2
      , SA.strokeWidth 5.0
      ]

I get a weird error:

strokeWidth :: ∀ r i. Number → IProp ( strokeWidth ∷ Number | r ) i
  Could not match type

    ( strokeWidth :: Number
    ...
    | t1
    )

  with type

    ( class :: String
    , fill :: String
    , height :: Number
    , id :: String
    , onClick :: MouseEvent
    , onContextMenu :: MouseEvent
    , onDoubleClick :: MouseEvent
    , onKeyDown :: KeyboardEvent
    , onKeyPress :: KeyboardEvent
    , onKeyUp :: KeyboardEvent
    , onMouseDown :: MouseEvent
    , onMouseEnter :: MouseEvent
    , onMouseLeave :: MouseEvent
    , onMouseMove :: MouseEvent
    , onMouseOut :: MouseEvent
    , onMouseOver :: MouseEvent
    , onMouseUp :: MouseEvent
    , onWheel :: WheelEvent
    , rx :: Number
    , ry :: Number
    , stroke :: String
    , transform :: String
    , width :: Number
    , x :: Number
    , y :: Number
    ...
    )

while trying to match type
                             ( strokeWidth :: Number
                             ...
                             | t1
                             )

  with type
              ( class :: String
              , fill :: String
              , height :: Number
              , id :: String
              , onClick :: MouseEvent
              , onContextMenu :: MouseEvent
              , onDoubleClick :: MouseEvent
              , onKeyDown :: KeyboardEvent
              , onKeyPress :: KeyboardEvent
              , onKeyUp :: KeyboardEvent
              , onMouseDown :: MouseEvent
              , onMouseEnter :: MouseEvent
              , onMouseLeave :: MouseEvent
              , onMouseMove :: MouseEvent
              , onMouseOut :: MouseEvent
              , onMouseOver :: MouseEvent
              , onMouseUp :: MouseEvent
              , onWheel :: WheelEvent
              , rx :: Number
              , ry :: Number
              , stroke :: String
              , transform :: String
              , width :: Number
              , x :: Number
              , y :: Number
              ...
              )

while checking that expression strokeWidth 5.0
  has type IProp
             ( class :: String
             , fill :: String
             , height :: Number
             , id :: String
             , onClick :: MouseEvent
             , onContextMenu :: MouseEvent
             , onDoubleClick :: MouseEvent
             , onKeyDown :: KeyboardEvent
             , onKeyPress :: KeyboardEvent
             , onKeyUp :: KeyboardEvent
             , onMouseDown :: MouseEvent
             , onMouseEnter :: MouseEvent
             , onMouseLeave :: MouseEvent
             , onMouseMove :: MouseEvent
             , onMouseOut :: MouseEvent
             , onMouseOver :: MouseEvent
             , onMouseUp :: MouseEvent
             , onWheel :: WheelEvent
             , rx :: Number
             , ry :: Number
             , stroke :: String
             , transform :: String
             , width :: Number
             , x :: Number
             , y :: Number
             )
             t0
in value declaration component

where t0 is an unknown type
      t1 is an unknown type
PureScript(TypesDoNotUnify)
Peek Problem
No quick fixes available

how can I fix this?

prescientmoon commented 3 years ago

Was revisiting my old open issues and noticed I had a salty sarcastic comment in here, deleted it and wanted to say sorry:)