Changeset 5890
- Timestamp:
- 07/29/05 17:19:17 (3 years ago)
- svk:copy_cache_prev:
- 7758
- Location:
- src
- Files:
-
- 10 modified
-
Emit/Common.hs (modified) (1 diff)
-
Emit/PIR.hs (modified) (1 diff)
-
Pugs/CodeGen/PIR.hs (modified) (2 diffs)
-
Pugs/Compile.hs (modified) (1 diff)
-
Pugs/Compile/Haskell.hs (modified) (1 diff)
-
Pugs/Junc.hs (modified) (1 diff)
-
Pugs/Monads.hs (modified) (1 diff)
-
Pugs/Pretty.hs (modified) (3 diffs)
-
Pugs/Prim/Code.hs (modified) (1 diff)
-
Pugs/Shell.hs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Emit/Common.hs
r4889 r5890 1 1 {-# OPTIONS_GHC -fglasgow-exts -fallow-overlapping-instances -fno-warn-orphans -cpp #-} 2 2 3 module Emit.Common where 3 module Emit.Common ( 4 Emit(..), 5 nested, eqSep, commaSep, 6 ) where 4 7 import Text.PrettyPrint 5 8 -
src/Emit/PIR.hs
r5413 r5890 1 1 {-# OPTIONS_GHC -fglasgow-exts -fallow-overlapping-instances -fno-warn-orphans -funbox-strict-fields -cpp #-} 2 2 3 module Emit.PIR where 3 module Emit.PIR ( 4 module Emit.PIR, 5 module Emit.Common, 6 ) where 4 7 import Data.Char 5 8 import Data.List -
src/Pugs/CodeGen/PIR.hs
r5646 r5890 18 18 import Pugs.AST 19 19 import Pugs.AST.Internals 20 import Pugs.Types 20 21 import Pugs.Eval.Var 21 import Emit.Common22 22 import Emit.PIR 23 23 import Pugs.Pretty … … 29 29 type CodeGen a = WriterT [Stmt] (ReaderT TEnv IO) a 30 30 type CodeGenMonad = WriterT [Stmt] (ReaderT TEnv IO) 31 32 ratToNum :: VRat -> VNum 33 ratToNum x = (fromIntegral $ numerator x) / (fromIntegral $ denominator x) 31 34 32 35 {-| Currently only 'PIL' → 'PIR' -} -
src/Pugs/Compile.hs
r5853 r5890 11 11 -} 12 12 13 module Pugs.Compile where 13 module Pugs.Compile ( 14 PIL(..), 15 Compile(..), 16 TEnv(..), initTEnv, 17 TCxt(..), tcVoid, tcLValue, 18 TParam(..), 19 EnterClass(..), 20 die, varText, 21 ) where 14 22 import Pugs.AST 15 23 import Pugs.Internals -
src/Pugs/Compile/Haskell.hs
r3906 r5890 1 1 {-# OPTIONS_GHC -fglasgow-exts -fth -cpp #-} 2 2 3 module Pugs.Compile.Haskell where 3 module Pugs.Compile.Haskell ( 4 genGHC, 5 ) where 4 6 5 7 #undef PUGS_HAVE_TH -
src/Pugs/Junc.hs
r5592 r5890 10 10 -} 11 11 12 module Pugs.Junc where 12 module Pugs.Junc ( 13 ApplyArg(..), 14 opJunc, opJuncNone, opJuncAll, opJuncAny, opJuncOne, 15 juncApply, 16 ) where 13 17 import Pugs.Internals 14 18 import Pugs.AST -
src/Pugs/Monads.hs
r5592 r5890 13 13 -} 14 14 15 module Pugs.Monads where 15 module Pugs.Monads ( 16 enterLex, enterContext, enterEvalContext, enterPackage, enterCaller, 17 enterGiven, enterWhen, enterWhile, genSymPrim, genSymCC, 18 enterBlock, enterSub, 19 evalVal, tempVar, 20 21 module Control.Monad.RWS 22 ) where 16 23 import Pugs.Internals 17 24 import Pugs.AST 18 25 import Pugs.Context 19 26 import Pugs.Types 27 import Control.Monad.RWS 20 28 21 29 {-| -
src/Pugs/Pretty.hs
r4934 r5890 13 13 -} 14 14 15 module Pugs.Pretty where 15 module Pugs.Pretty ( 16 Pretty, pretty, 17 ) where 16 18 import Pugs.Internals 17 19 import Pugs.Types … … 143 145 quoted x = [x] 144 146 145 ratToNum :: VRat -> VNum146 ratToNum x = (fromIntegral $ numerator x) / (fromIntegral $ denominator x)147 148 147 doubleBraces :: Doc -> Doc 149 148 doubleBraces x = vcat [ (lbrace <> lbrace), nest defaultIndent x, rbrace <> rbrace] … … 152 151 joinList x y = cat $ punctuate x y 153 152 154 commasep :: [Doc] -> Doc155 commasep x = cat $ (punctuate (char ',')) x156 157 153 pretty :: Pretty a => a -> String 158 154 pretty a = render $ format a -
src/Pugs/Prim/Code.hs
r5173 r5890 1 1 {-# OPTIONS_GHC -fglasgow-exts #-} 2 module Pugs.Prim.Code where 2 module Pugs.Prim.Code ( 3 op1CodeAssoc, op1CodeName, op1CodeArity, op1CodeBody, op1CodePos, 4 ) where 3 5 import Pugs.AST 4 6 import Pugs.Internals -
src/Pugs/Shell.hs
r3701 r5890 11 11 -} 12 12 13 module Pugs.Shell where 13 module Pugs.Shell ( 14 Command(..), 15 RunOptions(..), 16 initializeShell, 17 getCommand, 18 ) where 14 19 import Pugs.Internals 15 20
