From e011a718353ec54515a69acbdd2b53398e036afb Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 21 Dec 2017 17:05:51 -0500 Subject: [PATCH] :fire: :*. --- src/Data/Abstract/Type.hs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Data/Abstract/Type.hs b/src/Data/Abstract/Type.hs index 05d665269..2977e3893 100644 --- a/src/Data/Abstract/Type.hs +++ b/src/Data/Abstract/Type.hs @@ -14,12 +14,10 @@ data Type | String -- ^ Primitive string type. | Unit -- ^ The unit type. | Type :-> Type -- ^ Binary function types. - | Type :* Type -- ^ Binary products. | TVar TName -- ^ A type variable. | Product [Type] -- ^ N-ary products. deriving (Eq, Ord, Show) --- TODO: Do we need both Product and :*? -- TODO: À la carte representation of types. @@ -28,7 +26,6 @@ unify :: MonadFail m => Type -> Type -> m Type unify Int Int = pure Int unify Bool Bool = pure Bool unify (a1 :-> b1) (a2 :-> b2) = (:->) <$> unify a1 a2 <*> unify b1 b2 -unify (a1 :* b1) (a2 :* b2) = (:*) <$> unify a1 a2 <*> unify b1 b2 unify (TVar _) b = pure b unify a (TVar _) = pure a -- FIXME: this can succeed incorrectly for lists of inequal length.