Browse files

Added some demo type declarations to prelude

  • Loading branch information...
1 parent 2e63d6c commit 36276e7440c680a1e20e1c96ae5a2dd8d6d3c798 @phyrex1an phyrex1an committed May 30, 2010
Showing with 3 additions and 0 deletions.
  1. +3 −0 hs/Prelude.hs
View
3 hs/Prelude.hs
@@ -27,6 +27,7 @@ not x = case x of
True -> False
False -> True
+otherwise :: Bool
otherwise = True
id x = x
@@ -39,6 +40,7 @@ map f xs = case xs of
(++) [] ys = ys
(++) (x:xs) ys = x : (xs ++ ys)
+concat :: [[a]] -> [a]
concat [] = []
concat (x:xs) = x ++ concat xs
@@ -80,6 +82,7 @@ fib n = case n of
data Int = I# Int#
+(+) :: Num a => a -> a -> a
(+) (I# i1) (I# i2) = I# (i1 +# i2)
(-) (I# i1) (I# i2) = I# (i1 -# i2)

0 comments on commit 36276e7

Please sign in to comment.