on 385dcbf help sign in
Idris-dev/src/IRTS/BCImp.hs
23 lines 509 B history raw
1{-|
2Module : IRTS.BCImp
3Description : Bytecode for a register/variable based VM (e.g. for generating code in an imperative language where we let the language deal with GC)
4Copyright :
5License : BSD3
6Maintainer : The Idris Community.
7-}
8module IRTS.BCImp where
10import Idris.Core.TT
11import IRTS.Lang
12import IRTS.Simplified
14data Reg = RVal | L Int
16data BC = NOP
18toBC :: (Name, SDecl) -> (Name, [BC])
19toBC (n, SFun n' args locs exp)
20 = (n, bc RVal exp)
22bc :: Reg -> SExp -> [BC]
23bc = undefined