1{-# OPTIONS_GHC -Wall #-}
11import Control.Monad (liftM4)
14import qualified Data.Map as Map
16import qualified AST.Canonical as Can
17import qualified AST.Module.Name as ModuleName
18import qualified AST.Utils.Binop as Binop
19import qualified Elm.Name as N
27 Map.Map ModuleName.Canonical Interface
36 { _types :: Map.Map N.Name Can.Annotation
37 , _unions :: Map.Map N.Name Can.Union
38 , _aliases :: Map.Map N.Name Can.Alias
39 , _binops :: Map.Map N.Name Binop
46 , _op_annotation :: Can.Annotation
47 , _op_associativity :: Binop.Associativity
48 , _op_precedence :: Binop.Precedence
56fromModule :: Map.Map N.Name Can.Annotation -> Can.Module -> Interface
57fromModule types (Can.Module _ _ _ _ unions aliases binops _) =
62 , _binops = Map.map (toOp types) binops
66toOp :: Map.Map N.Name Can.Annotation -> Can.Binop -> Binop
67toOp types (Can.Binop_ associativity precedence name) =
68 Binop name (types ! name) associativity precedence
75instance Binary Interface where
77 liftM4 Interface get get get get
79 put (Interface a b c d) =
80 put a >> put b >> put c >> put d
83instance Binary Binop where
85 liftM4 Binop get get get get
88 put a >> put b >> put c >> put d
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