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
15data Canonical = Canonical
16 { _package :: Package.Name
19 deriving (Eq, Ord, Show)
22inVirtualDom :: Raw -> Canonical
24 Canonical Package.virtualDom raw
27inCore :: Raw -> Canonical
29 Canonical Package.core raw
32inHtml :: Raw -> Canonical
34 Canonical Package.html raw
37toString :: Raw -> String
48canonicalToText :: Canonical -> Text
49canonicalToText (Canonical _ name) =
53isNative :: Raw -> Bool
55 Text.isPrefixOf "Native." name
58canonicalIsNative :: Canonical -> Bool
59canonicalIsNative (Canonical _ name) =
63instance Binary Canonical where
64 put (Canonical home name) =
68 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