Blaaargh!!
do x <- SM newVar
as <- SM (newVars (length fs))
bs <- SM (newVars (length fs))
g' <- return $ addSymbols (zip (map (\(n,_,_,_) -> n) fs) (map ATVar as)) Function g
threadSM () (zipWith3 (ff g' x) as bs fs)
collect t g' q
SM (updateEqs (xqNewVars (as ++ bs) []))
SM (updateEqs (uqNewVar x []))
return q
where ff g x a b (f, p, ps, cs) =
do (y:_) <- return $ getConstructorType g Function f l
xs <- SM (newVars (length ps))
atype <- return $ mkArrows ((zipmatch (== p) y ps (map ATVar xs)) ++ [ATVar q])
btype <- return $ mkArrows (map ATVar $ (zipmatch (== p) x ps xs) ++ [q])
eqs <- return [Assign b btype, Assign a atype]
threadSM () (map (cf g a) cs)
SM (updateEqs (xqNewVars xs eqs))
return ()
Why won't it work??!?
Current Location: T2N 1N4 Current Mood: frustrated Current Music: Oasis -- I'm Outta Time Tags: compilers, grad school, haskell, no cat, thesis, type theory
|