Skip to content

Commit

Permalink
Merge pull request #1183 from elm-lang/dev
Browse files Browse the repository at this point in the history
Adjust `main` check to look for new Element type
  • Loading branch information
process-bot committed Nov 18, 2015
2 parents 888d80a + ddd48ba commit 1b1a899
Showing 1 changed file with 4 additions and 31 deletions.
35 changes: 4 additions & 31 deletions src/Nitpick/TopLevelTypes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -93,43 +93,16 @@ virtualDom =

element :: Type.Canonical
element =
Type.Record
[ ("element", core ["Graphics","Element"] "ElementPrim")
, ("props",
Type.Record
[ ("click" , builtin "_Tuple0")
, ("color" , maybe (core ["Color"] "Color"))
, ("height" , builtin "Int")
, ("hover" , builtin "_Tuple0")
, ("href" , builtin "String")
, ("id" , builtin "Int")
, ("opacity", builtin "Float")
, ("tag" , builtin "String")
, ("width" , builtin "Int")
]
Nothing
)
]
Nothing


core :: [String] -> String -> Type.Canonical
core home name =
Type.Type (Var.inCore home name)
core ["Graphics","Element"] "Element"


signal :: Type.Canonical -> Type.Canonical
signal tipe =
Type.App (core ["Signal"] "Signal") [ tipe ]


maybe :: Type.Canonical -> Type.Canonical
maybe tipe =
Type.App (core ["Maybe"] "Maybe") [ tipe ]


builtin :: String -> Type.Canonical
builtin name =
Type.Type (Var.builtin name)
core :: [String] -> String -> Type.Canonical
core home name =
Type.Type (Var.inCore home name)


0 comments on commit 1b1a899

Please sign in to comment.