2module Types.Unify (unify) where
4import Control.Monad (liftM)
5import qualified Data.Map as Map
9import qualified Types.Constrain as Constrain
10import qualified Types.Solver as Solver
11import qualified Types.Alias as Alias
13import qualified Types.Substitutions as Subst
14import System.IO.Unsafe
15import Control.Arrow (second)
17unify hints modul@(Module _ _ _ stmts) = run $ do
18 result <- Constrain.constrain hints modul
20 Left err -> return (Left err)
21 Right (schemes, constraints) ->
22 do subs <- Solver.solver (Alias.get stmts) Map.empty constraints
23 let ss = either (const []) Map.toList subs
24 unsafePerformIO (mapM print . map (second (Subst.subst ss)) $ concatMap Map.toList schemes) `seq` return subs
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list