1{-# OPTIONS_GHC -Wall #-}
2{-# LANGUAGE OverloadedStrings #-}
3module Type.Occurs (occurs) where
5import qualified Data.Map.Strict as Map
7import Type.Type as Type
8import qualified Type.UnionFind as UF
15occurs :: Type.Variable -> IO Bool
20occursHelp :: [Type.Variable] -> Type.Variable -> IO Bool
26 do (Descriptor content _ _ _) <- UF.descriptor var
42 go = occursHelp (var:seen)
46 or <$> traverse go args
49 (||) <$> go a <*> go b
55 or <$> traverse go (ext : Map.elems fields)
58 -- TODO is it okay to only check args?
59 or <$> traverse (occursHelp (var:seen) . snd) args
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