1{-# OPTIONS_GHC -Wall #-}
2{-# LANGUAGE OverloadedStrings #-}
3module AST.Module.Name where
6import qualified Data.Text as Text
9import qualified Elm.Package as Package
12type Raw = Text -- must be non-empty
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
49canonicalToText :: Canonical -> Text
50canonicalToText (Canonical _ name) =
54isNative :: Raw -> Bool
56 Text.isPrefixOf "Native." name
59canonicalIsNative :: Canonical -> Bool
60canonicalIsNative (Canonical _ name) =
64instance Binary Canonical where
65 put (Canonical home name) =
69 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