Skip to content

Instantly share code, notes, and snippets.

@johnpmayer
Created April 22, 2013 03:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnpmayer/5432261 to your computer and use it in GitHub Desktop.
Save johnpmayer/5432261 to your computer and use it in GitHub Desktop.
Demo of how I'd like to be able to import type aliases
module Bar where
type A = { x : Int, y : Int }
module Foo where
import Bar (A)
f : Int -> Int -> A
f x y = {x=x,y=y}
$ elm --make Foo.elm
[1 of 2] Compiling Bar
[2 of 2] Compiling Foo
Error while compiling Foo.elm:
Type error ():
{ x : Int, y : Int } is not equal to A
In context: f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment