1{-# OPTIONS_GHC -Wall #-}
2{-# LANGUAGE OverloadedStrings #-}
3module AST.Module.Name where
6import qualified Data.List as List
7import qualified Data.Text as Text
10import qualified Elm.Package as Package
13type Raw = [Text] -- must be non-empty
16data Canonical = Canonical
17 { _package :: Package.Name
20 deriving (Eq, Ord, Show)
23inVirtualDom :: Raw -> Canonical
25 Canonical Package.virtualDom raw
28inCore :: Raw -> Canonical
30 Canonical Package.core raw
33inHtml :: Raw -> Canonical
35 Canonical Package.html raw
38toString :: Raw -> String
40 List.intercalate "." (map Text.unpack rawName)
43canonicalToString :: Canonical -> String
44canonicalToString (Canonical _ rawName) =
48isNative :: Raw -> Bool
58instance Binary Canonical where
59 put (Canonical home name) =
63 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