Skip to content

Commit

Permalink
CHG: Generic constructor name to "fromTime" from "JSDate" so that
Browse files Browse the repository at this point in the history
genericShow produces valid PureScript code.
  • Loading branch information
eric-corumdigital committed Mar 20, 2018
1 parent 357aeec commit 017c4a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Data/JSDate.purs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ instance ordJSDate :: Ord JSDate where
instance showJSDate :: Show JSDate where
show a = "(fromTime " <> show (getTime a) <> ")"

instance genericJSDate :: Generic JSDate (Constructor "JSDate" (Argument Number)) where
instance genericJSDate :: Generic JSDate (Constructor "fromTime" (Argument Number)) where
to (Constructor (Argument time)) = fromTime time
from x = Constructor (Argument (getTime x))

Expand Down

0 comments on commit 017c4a2

Please sign in to comment.