Changeset 28 for sizechecking/branches/macs/SizedFun.hs
- Timestamp:
- May 14, 2014, 10:44:07 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sizechecking/branches/macs/SizedFun.hs
r27 r28 11 11 import qualified Data.Supply as S 12 12 import Data.Lens.Light 13 import Control.Monad.IO.Class 14 13 15 14 16 class Infer a b where 15 17 instance (Infer a b, Infer p q) => Infer (a->p) (b->q) 16 18 instance Infer a b => Infer [a] [b] 17 instance (a~b)=> Infer a b19 instance a~b => Infer a b 18 20 instance Infer Unsized Int 19 21 … … 53 55 54 56 instance SizedFun Q where 55 type SizeExp Q = S S BData57 type SizeExp Q = S SData 56 58 bind name size exp = exp 57 59 58 data DeclSize b where59 DeclSize :: Infer a b => S SData a -> DeclSize b60 61 instance Lambda DeclSize where62 instance LOps DeclSize where63 instance Exp DeclSize where64 instance SizedFun DeclSize where65 type SizeExp DeclSize = S SData66 bind name size exp = DeclSize size67 68 --getDeclSize (DeclSize size) = size
Note: See TracChangeset
for help on using the changeset viewer.