diff --git a/SAM.hs b/SAM.hs index 1a9a83e..a8ebfbe 100644 --- a/SAM.hs +++ b/SAM.hs @@ -42,11 +42,10 @@ import Numeric import Text.Printf import Util -import SCGR import Brainfuck -compile :: SAM -> Process SCGR +compile :: SAM -> Process BF compile (SAM _ [SProc _ [] ss])=return $ BF $ soptBF $ concatMap compileS ss soptBF []=[] diff --git a/Util.hs b/Util.hs index 5c3e0cb..c382ad3 100644 --- a/Util.hs +++ b/Util.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE FlexibleInstances, OverlappingInstances #-} -- | Modular error reporting and common functions -- -- note for future me: Arrow vs. Monad @@ -46,6 +46,7 @@ instance Show CompileError where show (CompileError m p d)=m++":"++p++":\n"++d show (CompileErrorN m d ps)=m++":\n"++d++"\n"++concatMap (\x->"in "++x++"\n") ps + instance Error [CompileError] where noMsg=[]