nixify, README, license
This commit is contained in:
parent
b929e21f82
commit
0a00070dbb
33 changed files with 62 additions and 2112 deletions
|
@ -1,102 +0,0 @@
|
|||
{
|
||||
|
||||
"NoRedInk/elm-json-decode-pipeline" = {
|
||||
sha256 = "1k241pjz1wj5rqv95f1j86msa0s0p6w4v8n0jn26aw6cbadw363b";
|
||||
version = "1.0.1";
|
||||
};
|
||||
|
||||
"bartavelle/json-helpers" = {
|
||||
sha256 = "0k96qra2nq1j4j4ahfl98dkpkc6f2831mq5d5xxg27mp31qwq5nn";
|
||||
version = "2.0.2";
|
||||
};
|
||||
|
||||
"elm/browser" = {
|
||||
sha256 = "0nagb9ajacxbbg985r4k9h0jadqpp0gp84nm94kcgbr5sf8i9x13";
|
||||
version = "1.0.2";
|
||||
};
|
||||
|
||||
"elm/core" = {
|
||||
sha256 = "19w0iisdd66ywjayyga4kv2p1v9rxzqjaxhckp8ni6n8i0fb2dvf";
|
||||
version = "1.0.5";
|
||||
};
|
||||
|
||||
"elm/html" = {
|
||||
sha256 = "1n3gpzmpqqdsldys4ipgyl1zacn0kbpc3g4v3hdpiyfjlgh8bf3k";
|
||||
version = "1.0.0";
|
||||
};
|
||||
|
||||
"elm/json" = {
|
||||
sha256 = "0kjwrz195z84kwywaxhhlnpl3p251qlbm5iz6byd6jky2crmyqyh";
|
||||
version = "1.1.3";
|
||||
};
|
||||
|
||||
"elm/time" = {
|
||||
sha256 = "0vch7i86vn0x8b850w1p69vplll1bnbkp8s383z7pinyg94cm2z1";
|
||||
version = "1.0.0";
|
||||
};
|
||||
|
||||
"elm/url" = {
|
||||
sha256 = "0av8x5syid40sgpl5vd7pry2rq0q4pga28b4yykn9gd9v12rs3l4";
|
||||
version = "1.0.0";
|
||||
};
|
||||
|
||||
"lobanov/elm-localstorage" = {
|
||||
sha256 = "00n3hk6gzrg637n4vfwk7arbj78bppqjn0mcnl7yp2ypva971dia";
|
||||
version = "1.0.1";
|
||||
};
|
||||
|
||||
"rtfeldman/elm-css" = {
|
||||
sha256 = "1gwhgqwclc7clk1ns4qqzyn7b4wvcmccg9qavvb8m694qmwlkzjy";
|
||||
version = "18.0.0";
|
||||
};
|
||||
|
||||
"rtfeldman/elm-iso8601-date-strings" = {
|
||||
sha256 = "1ah491kgyicgvy1c9myylqvhzb7ya9kgmn0hcsv23ymvqgaf6b1a";
|
||||
version = "1.1.4";
|
||||
};
|
||||
|
||||
"elm/bytes" = {
|
||||
sha256 = "02ywbf52akvxclpxwj9n04jydajcbsbcbsnjs53yjc5lwck3abwj";
|
||||
version = "1.0.8";
|
||||
};
|
||||
|
||||
"elm/file" = {
|
||||
sha256 = "1rljcb41dl97myidyjih2yliyzddkr2m7n74x7gg46rcw4jl0ny8";
|
||||
version = "1.0.5";
|
||||
};
|
||||
|
||||
"elm/http" = {
|
||||
sha256 = "008bs76mnp48b4dw8qwjj4fyvzbxvlrl4xpa2qh1gg2kfwyw56v1";
|
||||
version = "2.0.0";
|
||||
};
|
||||
|
||||
"elm/parser" = {
|
||||
sha256 = "0a3cxrvbm7mwg9ykynhp7vjid58zsw03r63qxipxp3z09qks7512";
|
||||
version = "1.1.0";
|
||||
};
|
||||
|
||||
"elm/random" = {
|
||||
sha256 = "138n2455wdjwa657w6sjq18wx2r0k60ibpc4frhbqr50sncxrfdl";
|
||||
version = "1.0.0";
|
||||
};
|
||||
|
||||
"elm/virtual-dom" = {
|
||||
sha256 = "1yvb8px2z62xd578ag2q0r5hd1vkz9y7dfkx05355iiy1d7jwq4v";
|
||||
version = "1.0.3";
|
||||
};
|
||||
|
||||
"lobanov/elm-taskport" = {
|
||||
sha256 = "16vf3k80sicmhnr1k2nmdc9713ips7nyaxzjzkb6w8mi5w4qsmc0";
|
||||
version = "2.0.1";
|
||||
};
|
||||
|
||||
"robinheghan/murmur3" = {
|
||||
sha256 = "15asmgr2zqh7rkywrg5647rpdqkpzxk02v5qc6ndj60jza3gsmjk";
|
||||
version = "1.0.0";
|
||||
};
|
||||
|
||||
"rtfeldman/elm-hex" = {
|
||||
sha256 = "1y0aa16asvwdqmgbskh5iba6psp43lkcjjw9mgzj3gsrg33lp00d";
|
||||
version = "1.0.0";
|
||||
};
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
{
|
||||
"type": "application",
|
||||
"source-directories": [
|
||||
"src"
|
||||
],
|
||||
"elm-version": "0.19.1",
|
||||
"dependencies": {
|
||||
"direct": {
|
||||
"NoRedInk/elm-json-decode-pipeline": "1.0.1",
|
||||
"bartavelle/json-helpers": "2.0.2",
|
||||
"elm/browser": "1.0.2",
|
||||
"elm/core": "1.0.5",
|
||||
"elm/html": "1.0.0",
|
||||
"elm/json": "1.1.3",
|
||||
"elm/time": "1.0.0",
|
||||
"elm/url": "1.0.0",
|
||||
"lobanov/elm-localstorage": "1.0.1",
|
||||
"rtfeldman/elm-css": "18.0.0",
|
||||
"rtfeldman/elm-iso8601-date-strings": "1.1.4"
|
||||
},
|
||||
"indirect": {
|
||||
"elm/bytes": "1.0.8",
|
||||
"elm/file": "1.0.5",
|
||||
"elm/http": "2.0.0",
|
||||
"elm/parser": "1.1.0",
|
||||
"elm/random": "1.0.0",
|
||||
"elm/virtual-dom": "1.0.3",
|
||||
"lobanov/elm-taskport": "2.0.1",
|
||||
"robinheghan/murmur3": "1.0.0",
|
||||
"rtfeldman/elm-hex": "1.0.0"
|
||||
}
|
||||
},
|
||||
"test-dependencies": {
|
||||
"direct": {},
|
||||
"indirect": {}
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -1,9 +0,0 @@
|
|||
{pkgs ? import <nixpkgs> {}}:
|
||||
pkgs.mkShell {
|
||||
nativeBuildInputs = [
|
||||
pkgs.elmPackages.elm
|
||||
pkgs.elmPackages.elm-format
|
||||
pkgs.uglify-js
|
||||
pkgs.ungoogled-chromium
|
||||
];
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
module ElmskellTypes.Generated.Decoder exposing (..)
|
||||
|
||||
import Iso8601 as Iso
|
||||
import Json.Decode as D exposing (..)
|
||||
import Json.Decode.Pipeline as D exposing (required)
|
||||
|
||||
import ElmskellTypes.Generated.ElmStreet exposing (..)
|
||||
import ElmskellTypes.Generated.Types as T
|
||||
|
||||
|
||||
decodeCommand : Decoder T.Command
|
||||
decodeCommand = elmStreetDecodeEnum T.readCommand
|
||||
|
||||
decodeCookiesKept : Decoder T.CookiesKept
|
||||
decodeCookiesKept = D.succeed T.CookiesKept
|
||||
|> required "keepFont" D.bool
|
||||
|> required "keepPrompt" D.bool
|
||||
|> required "keepTheme" D.bool
|
||||
|
||||
decodeCoreColor : Decoder T.CoreColor
|
||||
decodeCoreColor = elmStreetDecodeEnum T.readCoreColor
|
||||
|
||||
decodeFont : Decoder T.Font
|
||||
decodeFont = D.succeed T.Font
|
||||
|> required "fontSize" D.float
|
||||
|
||||
decodeInput : Decoder T.Input
|
||||
decodeInput = D.succeed T.Input
|
||||
|> required "command" decodeCommand
|
||||
|> required "args" (D.list D.string)
|
||||
|
||||
decodePrompt : Decoder T.Prompt
|
||||
decodePrompt = D.succeed T.Prompt
|
||||
|> required "prompt" D.string
|
||||
|
||||
decodeTheme : Decoder T.Theme
|
||||
decodeTheme = elmStreetDecodeEnum T.readTheme
|
||||
|
||||
decodeThemeColor : Decoder T.ThemeColor
|
||||
decodeThemeColor = elmStreetDecodeEnum T.readThemeColor
|
|
@ -1,52 +0,0 @@
|
|||
module ElmskellTypes.Generated.ElmStreet exposing (..)
|
||||
|
||||
import Json.Encode as E exposing (Value)
|
||||
import Json.Decode as D exposing (Decoder)
|
||||
import Json.Decode.Pipeline as D exposing (..)
|
||||
|
||||
|
||||
elmStreetEncodeMaybe : (a -> Value) -> Maybe a -> Value
|
||||
elmStreetEncodeMaybe enc = Maybe.withDefault E.null << Maybe.map enc
|
||||
|
||||
elmStreetEncodeEither : (a -> Value) -> (b -> Value) -> Result a b -> Value
|
||||
elmStreetEncodeEither encA encB res = E.object <| case res of
|
||||
Err a -> [("Left", encA a)]
|
||||
Ok b -> [("Right", encB b)]
|
||||
|
||||
elmStreetEncodePair : (a -> Value) -> (b -> Value) -> (a, b) -> Value
|
||||
elmStreetEncodePair encA encB (a, b) = E.list identity [encA a, encB b]
|
||||
|
||||
elmStreetEncodeTriple : (a -> Value) -> (b -> Value) -> (c -> Value) -> (a, b, c) -> Value
|
||||
elmStreetEncodeTriple encA encB encC (a, b, c) = E.list identity [encA a, encB b, encC c]
|
||||
|
||||
elmStreetEncodeNonEmpty : (a -> Value) -> (a, List a) -> Value
|
||||
elmStreetEncodeNonEmpty encA (a, xs) = E.list encA <| a :: xs
|
||||
|
||||
decodeStr : (String -> Maybe a) -> String -> Decoder a
|
||||
decodeStr readX x = case readX x of
|
||||
Just a -> D.succeed a
|
||||
Nothing -> D.fail "Constructor not matched"
|
||||
|
||||
elmStreetDecodeEnum : (String -> Maybe a) -> Decoder a
|
||||
elmStreetDecodeEnum r = D.andThen (decodeStr r) D.string
|
||||
|
||||
elmStreetDecodeChar : Decoder Char
|
||||
elmStreetDecodeChar = D.andThen (decodeStr (Maybe.map Tuple.first << String.uncons)) D.string
|
||||
|
||||
elmStreetDecodeEither : Decoder a -> Decoder b -> Decoder (Result a b)
|
||||
elmStreetDecodeEither decA decB = D.oneOf
|
||||
[ D.field "Left" (D.map Err decA)
|
||||
, D.field "Right" (D.map Ok decB)
|
||||
]
|
||||
|
||||
elmStreetDecodePair : Decoder a -> Decoder b -> Decoder (a, b)
|
||||
elmStreetDecodePair decA decB = D.map2 Tuple.pair (D.index 0 decA) (D.index 1 decB)
|
||||
|
||||
elmStreetDecodeTriple : Decoder a -> Decoder b -> Decoder c -> Decoder (a, b, c)
|
||||
elmStreetDecodeTriple decA decB decC = D.map3 (\a b c -> (a,b,c)) (D.index 0 decA) (D.index 1 decB) (D.index 2 decC)
|
||||
|
||||
elmStreetDecodeNonEmpty : Decoder a -> Decoder (a, List a)
|
||||
elmStreetDecodeNonEmpty decA = D.list decA |> D.andThen (\xs -> case xs of
|
||||
h::t -> D.succeed (h, t)
|
||||
_ -> D.fail "Expecting non-empty array")
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
module ElmskellTypes.Generated.Encoder exposing (..)
|
||||
|
||||
import Iso8601 as Iso
|
||||
import Json.Encode as E exposing (..)
|
||||
|
||||
import ElmskellTypes.Generated.ElmStreet exposing (..)
|
||||
import ElmskellTypes.Generated.Types as T
|
||||
|
||||
|
||||
encodeCommand : T.Command -> Value
|
||||
encodeCommand = E.string << T.showCommand
|
||||
|
||||
encodeCookiesKept : T.CookiesKept -> Value
|
||||
encodeCookiesKept x = E.object
|
||||
[ ("tag", E.string "CookiesKept")
|
||||
, ("keepFont", E.bool x.keepFont)
|
||||
, ("keepPrompt", E.bool x.keepPrompt)
|
||||
, ("keepTheme", E.bool x.keepTheme)
|
||||
]
|
||||
|
||||
encodeCoreColor : T.CoreColor -> Value
|
||||
encodeCoreColor = E.string << T.showCoreColor
|
||||
|
||||
encodeFont : T.Font -> Value
|
||||
encodeFont x = E.object
|
||||
[ ("tag", E.string "Font")
|
||||
, ("fontSize", E.float x.fontSize)
|
||||
]
|
||||
|
||||
encodeInput : T.Input -> Value
|
||||
encodeInput x = E.object
|
||||
[ ("tag", E.string "Input")
|
||||
, ("command", encodeCommand x.command)
|
||||
, ("args", (E.list E.string) x.args)
|
||||
]
|
||||
|
||||
encodePrompt : T.Prompt -> Value
|
||||
encodePrompt x = E.object
|
||||
[ ("tag", E.string "Prompt")
|
||||
, ("prompt", E.string x.prompt)
|
||||
]
|
||||
|
||||
encodeTheme : T.Theme -> Value
|
||||
encodeTheme = E.string << T.showTheme
|
||||
|
||||
encodeThemeColor : T.ThemeColor -> Value
|
||||
encodeThemeColor = E.string << T.showThemeColor
|
|
@ -1,197 +0,0 @@
|
|||
module ElmskellTypes.Generated.Types exposing (..)
|
||||
|
||||
import Time exposing (Posix)
|
||||
import Json.Decode exposing (Value)
|
||||
|
||||
|
||||
type Command
|
||||
= ClearCommand
|
||||
| ColorsCommand
|
||||
| CookiesCommand
|
||||
| DebugCommand
|
||||
| FontCommand
|
||||
| HelloCommand
|
||||
| HelpCommand
|
||||
| PromptCommand
|
||||
| ThemeCommand
|
||||
| TodoCommand
|
||||
|
||||
showCommand : Command -> String
|
||||
showCommand x = case x of
|
||||
ClearCommand -> "ClearCommand"
|
||||
ColorsCommand -> "ColorsCommand"
|
||||
CookiesCommand -> "CookiesCommand"
|
||||
DebugCommand -> "DebugCommand"
|
||||
FontCommand -> "FontCommand"
|
||||
HelloCommand -> "HelloCommand"
|
||||
HelpCommand -> "HelpCommand"
|
||||
PromptCommand -> "PromptCommand"
|
||||
ThemeCommand -> "ThemeCommand"
|
||||
TodoCommand -> "TodoCommand"
|
||||
|
||||
readCommand : String -> Maybe Command
|
||||
readCommand x = case x of
|
||||
"ClearCommand" -> Just ClearCommand
|
||||
"ColorsCommand" -> Just ColorsCommand
|
||||
"CookiesCommand" -> Just CookiesCommand
|
||||
"DebugCommand" -> Just DebugCommand
|
||||
"FontCommand" -> Just FontCommand
|
||||
"HelloCommand" -> Just HelloCommand
|
||||
"HelpCommand" -> Just HelpCommand
|
||||
"PromptCommand" -> Just PromptCommand
|
||||
"ThemeCommand" -> Just ThemeCommand
|
||||
"TodoCommand" -> Just TodoCommand
|
||||
_ -> Nothing
|
||||
|
||||
universeCommand : List Command
|
||||
universeCommand = [ ClearCommand
|
||||
, ColorsCommand
|
||||
, CookiesCommand
|
||||
, DebugCommand
|
||||
, FontCommand
|
||||
, HelloCommand
|
||||
, HelpCommand
|
||||
, PromptCommand
|
||||
, ThemeCommand
|
||||
, TodoCommand ]
|
||||
|
||||
type alias CookiesKept =
|
||||
{ keepFont : Bool
|
||||
, keepPrompt : Bool
|
||||
, keepTheme : Bool
|
||||
}
|
||||
|
||||
type CoreColor
|
||||
= Red
|
||||
| Green
|
||||
| Yellow
|
||||
| Blue
|
||||
| Magenta
|
||||
| Cyan
|
||||
| BrightRed
|
||||
| BrightGreen
|
||||
| BrightYellow
|
||||
| BrightBlue
|
||||
| BrightMagenta
|
||||
| BrightCyan
|
||||
|
||||
showCoreColor : CoreColor -> String
|
||||
showCoreColor x = case x of
|
||||
Red -> "Red"
|
||||
Green -> "Green"
|
||||
Yellow -> "Yellow"
|
||||
Blue -> "Blue"
|
||||
Magenta -> "Magenta"
|
||||
Cyan -> "Cyan"
|
||||
BrightRed -> "BrightRed"
|
||||
BrightGreen -> "BrightGreen"
|
||||
BrightYellow -> "BrightYellow"
|
||||
BrightBlue -> "BrightBlue"
|
||||
BrightMagenta -> "BrightMagenta"
|
||||
BrightCyan -> "BrightCyan"
|
||||
|
||||
readCoreColor : String -> Maybe CoreColor
|
||||
readCoreColor x = case x of
|
||||
"Red" -> Just Red
|
||||
"Green" -> Just Green
|
||||
"Yellow" -> Just Yellow
|
||||
"Blue" -> Just Blue
|
||||
"Magenta" -> Just Magenta
|
||||
"Cyan" -> Just Cyan
|
||||
"BrightRed" -> Just BrightRed
|
||||
"BrightGreen" -> Just BrightGreen
|
||||
"BrightYellow" -> Just BrightYellow
|
||||
"BrightBlue" -> Just BrightBlue
|
||||
"BrightMagenta" -> Just BrightMagenta
|
||||
"BrightCyan" -> Just BrightCyan
|
||||
_ -> Nothing
|
||||
|
||||
universeCoreColor : List CoreColor
|
||||
universeCoreColor = [ Red
|
||||
, Green
|
||||
, Yellow
|
||||
, Blue
|
||||
, Magenta
|
||||
, Cyan
|
||||
, BrightRed
|
||||
, BrightGreen
|
||||
, BrightYellow
|
||||
, BrightBlue
|
||||
, BrightMagenta
|
||||
, BrightCyan ]
|
||||
|
||||
type alias Font =
|
||||
{ fontSize : Float
|
||||
}
|
||||
|
||||
type alias Input =
|
||||
{ command : Command
|
||||
, args : List String
|
||||
}
|
||||
|
||||
type alias Prompt =
|
||||
{ prompt : String
|
||||
}
|
||||
|
||||
type Theme
|
||||
= Pit
|
||||
| Dim
|
||||
| Sky
|
||||
| Sun
|
||||
|
||||
showTheme : Theme -> String
|
||||
showTheme x = case x of
|
||||
Pit -> "Pit"
|
||||
Dim -> "Dim"
|
||||
Sky -> "Sky"
|
||||
Sun -> "Sun"
|
||||
|
||||
readTheme : String -> Maybe Theme
|
||||
readTheme x = case x of
|
||||
"Pit" -> Just Pit
|
||||
"Dim" -> Just Dim
|
||||
"Sky" -> Just Sky
|
||||
"Sun" -> Just Sun
|
||||
_ -> Nothing
|
||||
|
||||
universeTheme : List Theme
|
||||
universeTheme = [Pit, Dim, Sky, Sun]
|
||||
|
||||
type ThemeColor
|
||||
= Background
|
||||
| Foreground
|
||||
| Cursor
|
||||
| Black
|
||||
| White
|
||||
| BrightBlack
|
||||
| BrightWhite
|
||||
|
||||
showThemeColor : ThemeColor -> String
|
||||
showThemeColor x = case x of
|
||||
Background -> "Background"
|
||||
Foreground -> "Foreground"
|
||||
Cursor -> "Cursor"
|
||||
Black -> "Black"
|
||||
White -> "White"
|
||||
BrightBlack -> "BrightBlack"
|
||||
BrightWhite -> "BrightWhite"
|
||||
|
||||
readThemeColor : String -> Maybe ThemeColor
|
||||
readThemeColor x = case x of
|
||||
"Background" -> Just Background
|
||||
"Foreground" -> Just Foreground
|
||||
"Cursor" -> Just Cursor
|
||||
"Black" -> Just Black
|
||||
"White" -> Just White
|
||||
"BrightBlack" -> Just BrightBlack
|
||||
"BrightWhite" -> Just BrightWhite
|
||||
_ -> Nothing
|
||||
|
||||
universeThemeColor : List ThemeColor
|
||||
universeThemeColor = [ Background
|
||||
, Foreground
|
||||
, Cursor
|
||||
, Black
|
||||
, White
|
||||
, BrightBlack
|
||||
, BrightWhite ]
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue