Skip to content

Vector should be representational #223

Description

@idontgetoutmuch

At the moment we get this

*Numeric.Sundials.CVode.ODE> (coerce ((V.fromList [1,2]) :: Vector CInt)) :: Vector Int
[8589934593,4426664329]

We should really get a type error.

Activity

  1. idontgetoutmuch commented on Oct 27, 2018

    @idontgetoutmuch
    MemberAuthor

    And by making Vector representational we get

    *Data.Vector> (coerce ((Data.Vector.fromList [1,2]) :: Vector CInt)) :: Vector Int
    
    <interactive>:9:2: error:
        • Couldn't match representation of type ‘GHC.Int.Int32’
                                   with that of ‘Int’
            arising from a use of ‘coerce’
        • In the expression:
              (coerce ((Data.Vector.fromList [1, 2]) :: Vector CInt)) ::
                Vector Int
          In an equation for ‘it’:
              it
                = (coerce ((Data.Vector.fromList [1, 2]) :: Vector CInt)) ::
                    Vector Int
    
  2. added a commit that references this issue on Oct 27, 2018
  3. RyanGlScott commented on Oct 27, 2018

    @RyanGlScott
    Member

    Fixed in #224.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions