You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we support a few special case ADTs. It would be nice to declare them in the Prelude and allow others to add their own. Just like in Haskell, we would need to wire some back in for things like box and reification.
Fortunately though, we because we don't offer recursion, we can restrict our types to simple products and sums.
dataUnit=Unit-- 1dataEmpty-- 0data (a*b) =Productab-- a * bdata (a+b) =Inla | Inrb-- a + b-- We don't need these in Icicle-- data Exp a b = Exp (a -> b) -- a^b-- data Rec f = Rec (f (Rec f)) -- \mu
should do it.
The text was updated successfully, but these errors were encountered:
Currently we support a few special case ADTs. It would be nice to declare them in the Prelude and allow others to add their own. Just like in Haskell, we would need to wire some back in for things like
box
and reification.Fortunately though, we because we don't offer recursion, we can restrict our types to simple products and sums.
From http://dev.stephendiehl.com/fun/009_datatypes.html
should do it.
The text was updated successfully, but these errors were encountered: