1module AST.Module.Name where
3import Control.Applicative ((<$>),(<*>))
5import qualified Data.List as List
7import qualified Elm.Package as Package
10type Raw = [String] -- must be non-empty
13data Canonical = Canonical
14 { _package :: Package.Name
17 deriving (Eq, Ord, Show)
20inCore :: Raw -> Canonical
22 Canonical Package.coreName raw
25toString :: Raw -> String
27 List.intercalate "." rawName
30canonicalToString :: Canonical -> String
31canonicalToString (Canonical _ rawName) =
35isNative :: Raw -> Bool
45instance Binary Canonical where
46 put (Canonical home name) =
50 Canonical <$> get <*> get
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