Skip to content

Commit

Permalink
Adjust main check to look for new Element type
Browse files Browse the repository at this point in the history
  • Loading branch information
process-bot committed Nov 18, 2015
1 parent 888d80a commit ddd48ba
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 ddd48ba

Please sign in to comment.