1{-# OPTIONS_GHC -Wall #-}
2module Type.Fragment where
4import qualified Data.List as List
5import qualified Data.Map as Map
10data Fragment = Fragment
11 { typeEnv :: Map.Map String Type
13 , typeConstraint :: TypeConstraint
17emptyFragment :: Fragment
19 Fragment Map.empty [] CTrue
22joinFragment :: Fragment -> Fragment -> Fragment
26 Map.union (typeEnv f1) (typeEnv f2)
32 typeConstraint f1 /\ typeConstraint f2
36joinFragments :: [Fragment] -> Fragment
38 List.foldl' (flip joinFragment) emptyFragment
41toScheme :: Fragment -> Scheme Type Variable
43 Scheme [] (vars fragment) (typeConstraint fragment) (typeEnv fragment)
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