Skip to content
This repository has been archived by the owner on Feb 18, 2020. It is now read-only.

Commit

Permalink
+ Small modification to the main compiler function
Browse files Browse the repository at this point in the history
  • Loading branch information
Averethel committed Mar 31, 2013
1 parent 6bf7519 commit 3234e35
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Compiler.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ module Compiler (compile) where
import LetFlatten
import PatternMatching
import Syntax
import TypedSyntax
import TypeInference

compiler :: Integer -> Expr -> IO Program
compiler :: Integer -> TypedExpr -> IO Program
compiler t e0 = do
let e1 = compilePatternMatching e0
let e2 = convertToKNormal e1
Expand All @@ -26,6 +27,6 @@ module Compiler (compile) where
compile :: Integer -> Expr -> IO (Either String Program)
compile inlineTreshold expr = case typeOfExpression emptyEnv expr of
Left er -> return $ Left er
Right _ -> do
c <- compiler inlineTreshold expr
Right t -> do
c <- compiler inlineTreshold t
return $ Right c

0 comments on commit 3234e35

Please sign in to comment.