Created
April 22, 2013 03:25
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Bar where | |
type A = { x : Int, y : Int } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Foo where | |
import Bar (A) | |
f : Int -> Int -> A | |
f x y = {x=x,y=y} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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