on master help sign in
Add terse way to do type application
commit90c5c7d21c71243064b0c46bb93964f4091e5053 authorEvan Czaplicki <info@elm-lang.org> dateWed 17 Jul 2013, 19:26 (13 years ago) parent334d39c
1 file changed+4
compiler/Type/Type.hs+4
compiler/Type/Type.hs+4
@@ -84,6 +84,9 @@ infixr 9 ==>
8484(==>) :: Type -> Type -> Type
8585a ==> b = TermN (Fun1 a b)
8686
87+f <| a = TermN (App1 f a)
88+
89+
8790namedVar name = UF.fresh $ Descriptor {
8891 structure = Nothing,
8992 rank = noRank,
@@ -124,6 +127,7 @@ exists f = do
124127 v <- flexibleVar
125128 ex [v] <$> f (VarN v)
126129
130+
127131instance Show a => Show (UF.Point a) where
128132 show point = unsafePerformIO $ fmap show (UF.descriptor point)
129133