We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1e1472c commit 33e1fbfCopy full SHA for 33e1fbf
src/Lapse/Types.hs
@@ -130,3 +130,16 @@ instance A.FromJSON Value where
130
A.Bool b -> pure $ if b then Number 1 else Number 0
131
A.Array arr -> pure $ foldr (Pair . unsafeFromJSON) Nil $ toList arr
132
A.Object obj -> Dict <$> A.parseJSON (A.Object obj)
133
+
134
+showConstr :: Value -> String
135
+showConstr = \case
136
+ Number _ -> "number"
137
+ Float _ -> "float"
138
+ String _ -> "string"
139
+ Name _ -> "name"
140
+ Function _ -> "function"
141
+ Macros _ -> "macros"
142
+ Pair _ _ -> "list"
143
+ Nil -> "()"
144
+ Dict _ -> "dict"
145
+ External _ -> "external"
0 commit comments