If I have the following:

make_xword : { rows : Int, cols : Int } -> Xword

import Xword exposing (Xword, make_xword)

type alias InCell =
  { x : Int
  , y : Int
  , contents : String
  }

type alias InXword =
  { rows : Int
  , cols : Int
  , cells : List InCell
  }

to_xword : InXword -> Xword
to_xword input =
  make_xword { rows = input.rows, cols = input.cols }

why can I not replace the last function with

to_xword : InXword -> Xword
to_xword input =
  make_xword input

since input is a superset of {rows; cols}?

martin

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to