1{-# OPTIONS_GHC -Wall #-}
2module Type.Fragment where
4import qualified Data.List as List
5import qualified Data.Map as Map
7import Reporting.Annotation as A
11data Fragment = Fragment
12 { typeEnv :: Map.Map String (A.Located Type)
14 , typeConstraint :: TypeConstraint
18emptyFragment :: Fragment
20 Fragment Map.empty [] CTrue
23joinFragment :: Fragment -> Fragment -> Fragment
27 Map.union (typeEnv f1) (typeEnv f2)
33 typeConstraint f1 /\ typeConstraint f2
37joinFragments :: [Fragment] -> Fragment
39 List.foldl' (flip joinFragment) emptyFragment
42toScheme :: Fragment -> Scheme Type Variable
44 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