Skip to content
Browse files

Export BigInt

  • Loading branch information...
1 parent 72988a2 commit 1aa9591a7a48340f669e5883ca8e6d96cce3830c Edwin Brady committed
Showing with 13 additions and 5 deletions.
  1. +10 −3 Epic/Epic.lhs
  2. +1 −0 Epic/Language.lhs
  3. +1 −1 Main.lhs
  4. +1 −1 epic.cabal
View
13 Epic/Epic.lhs
@@ -21,10 +21,11 @@
> lazy_, effect_,
> foreign_, foreignL_, foreignConst_, foreignConstL_,
> let_, letN_, update_, op_,
-> str, int, float, char, bool, unit_, (!.), fn, ref, (+>),
+> str, int, bigint, float, char, bool, unit_,
+> (!.), fn, ref, (+>),
> malloc_,
> -- * Types
-> Type, tyInt, tyChar, tyBool, tyFloat, tyString,
+> Type, tyInt, tyBigInt, tyChar, tyBool, tyFloat, tyString,
> tyPtr, tyUnit, tyAny, tyC,
> -- * Operators
> Op, plus_, minus_, times_, divide_,
@@ -370,6 +371,10 @@ Remaining expression constructs
> int :: Int -> Term
> int x = term $ Const (MkInt x)
+> -- | Constant big integer
+> bigint :: Integer -> Term
+> bigint x = term $ Const (MkBigInt x)
+
> -- | Constant float
> float :: Double -> Term
> float x = term $ Const (MkFloat x)
@@ -391,10 +396,12 @@ Remaining expression constructs
> (+>) :: (EpicExpr c) => c -> Term -> Term
> (+>) c k = let_ c (\(x :: Expr) -> k)
-> tyInt, tyChar, tyBool, tyFloat, tyString, tyPtr, tyUnit, tyAny :: Type
+> tyInt, tyBigInt, tyChar, tyBool, tyFloat :: Type
+> tyString, tyPtr, tyUnit, tyAny :: Type
> tyC :: String -> Type
> tyInt = TyInt
+> tyBigInt = TyBigInt
> tyChar = TyChar
> tyBool = TyBool
> tyFloat = TyFloat
View
1 Epic/Language.lhs
@@ -22,6 +22,7 @@
> | Checking Int -- ^ Checking level (0 none)
> | ExternalMain -- ^ main is defined externally (in C)
> | MainInc FilePath -- ^ File to #include in main program
+> | LinkObj FilePath -- ^ .o file to link with
> deriving Eq
Raw data types. Int, Char, Bool are unboxed.
View
2 Main.lhs
@@ -79,7 +79,7 @@
> return (fns,opts)
> else return (fns,opts)
-> showUsage = do putStrLn $ "Epigram Supercombinator Compiler version " ++ versionString
+> showUsage = do putStrLn $ "Epic version " ++ versionString
> putStrLn "Usage:\n\tepic <input file> [options]"
> exitWith (ExitFailure 1)
View
2 epic.cabal
@@ -1,5 +1,5 @@
Name: epic
-Version: 0.1.14
+Version: 0.9.1
Author: Edwin Brady
License: BSD3
License-file: LICENSE

0 comments on commit 1aa9591

Please sign in to comment.
Something went wrong with that request. Please try again.