Log in

No account? Create an account
Blaaargh!! - MrPutter: doing things the hard way, because it is there.
June 8th, 2009
03:42 pm
[User Picture]


Previous Entry Share Next Entry
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: frustratedfrustrated
Current Music: Oasis -- I'm Outta Time
Tags: , , , , ,

(2 comments , Leave a comment)

[User Picture]
Date:June 8th, 2009 09:56 pm (UTC)
Why won't it work??!?
Wish I could help you, but it's all Geek to me. (And alas, I am not conversant with that dialect.)
[User Picture]
Date:June 8th, 2009 10:59 pm (UTC)
While I don't understand this code either, I noticed this:

do (y:_) <- return $ getConstructorType g Function f l

The trailing l at the end of this line is the only place it exists in this entire code.
Beware of Road Surprises Powered by LiveJournal.com