commit
stringlengths
40
40
old_file
stringlengths
4
264
new_file
stringlengths
4
264
old_contents
stringlengths
0
4.24k
new_contents
stringlengths
1
5.44k
subject
stringlengths
14
778
message
stringlengths
15
9.92k
lang
stringclasses
277 values
license
stringclasses
13 values
repos
stringlengths
5
127k
2c37599151be57a4cff097f00675708b07f4e567
public/Try.elm
public/Try.elm
import Website.ColorScheme accents = [accent0,accent1,accent2,accent3,accent4] topBar k n = let n' = toFloat n k' = toFloat k segs = map (\i -> round (n' * toFloat i / k')) [1..k] ws = zipWith (-) segs (0:segs) accentCycle = concatMap (\_ -> accents) [ 0 .. k `div` 5 ] in flo...
import Website.ColorScheme accents = [accent0,accent1,accent2,accent3,accent4] topBar k n = let n' = toFloat n k' = toFloat k segs = map (\i -> round (n' * toFloat i / k')) [1..k] ws = zipWith (-) segs (0::segs) accentCycle = concatMap (\_ -> accents) [ 0 .. k `div` 5 ] in fl...
Switch to (:) to (::)
Switch to (:) to (::)
Elm
bsd-3-clause
amitaibu/elm-lang.org,yang-wei/elm-lang.org,inchingforward/elm-lang.org,rtfeldman/elm-lang.org,elm-lang/debug.elm-lang.org,jazmit/elm-lang.org,avh4/elm-lang.org,kevinrood/elm-lang.org,rtfeldman/elm-lang.org,liubko/elm-lang.org,yang-wei/elm-lang.org,thSoft/elm-lang.org,inchingforward/elm-lang.org,FranklinChen/elm-lang.o...
263c28f277ee81b6ee5fd0c7ba95320d7938f913
Types.elm
Types.elm
module NoSyntaxBitch where import Html exposing (text) type alias VariableName = String type Node = Function { args: List Node, body: List Node, return: Node } | BinaryExpression { left: Node, right: Node, operator: String } | VariableDeclaration { identifier: Node, init: Node } | Constant Int | Variable Va...
module NoSyntaxBitch where import Html exposing (text) type alias VariableName = String type alias OperatorName = String type Node = Function { args: List Node, body: List Node, return: Node } | BinaryExpression { left: Node, right: Node, operator: OperatorName } | UnaryExpression { right: Node, operator: Opera...
Add UnaryExpression. Add OperatorName alias
Add UnaryExpression. Add OperatorName alias
Elm
mit
moneyMakesMoney/no-syntax-bitch
a6f033120d5593d113157aa907aaa637ab9bf7bb
client/src/Main.elm
client/src/Main.elm
module Main exposing (..) import Html import Init import Model exposing (Model, Controller) import Update exposing (update) import View exposing (view) -- INIT main : Program Never Model Controller main = Html.program { init = Init.init , update = update , subscriptions = subscriptions ...
module Main exposing (..) import Browser import Html import Init import Model exposing (Model, Controller) import Update exposing (update) import View exposing (view) -- INIT main : Program Never Model Controller main = Browser.element { init = Init.init , update = update , subscription...
Use Browser instead of Html.program
Upgrade: Use Browser instead of Html.program
Elm
mit
ofer987/transit.tips,ofer987/transit.tips,ofer987/transit.tips,ofer987/transit.tips
717c241ddd3c90d36b5ed10a4d931ee1b1b80722
media/src/ReleaseNotes/ArcLengthParameterization.elm
media/src/ReleaseNotes/ArcLengthParameterization.elm
module ReleaseNotes.ArcLengthParameterization exposing (..) import Html exposing (Html) import OpenSolid.CubicSpline2d as CubicSpline2d import OpenSolid.Svg as Svg import ReleaseNotes.Common exposing (..) import Svg main : Html Never main = let parameterization = CubicSpline2d.arcLengthParame...
module ReleaseNotes.ArcLengthParameterization exposing (..) import Html exposing (Html) import OpenSolid.CubicSpline2d as CubicSpline2d import OpenSolid.Svg as Svg import ReleaseNotes.Common exposing (..) import Svg main : Html Never main = let parameterization = CubicSpline2d.arcLengthParame...
Make arc length evaluation more robust and clear
Make arc length evaluation more robust and clear Ensure that roundoff doesn't result in an arc length just *greater* than `overallArcLength`
Elm
mpl-2.0
opensolid/geometry
2d346273846e97e48ebb9578c9580f52fd604bd9
frontend/src/Models.elm
frontend/src/Models.elm
module Models (..) where import Meals.Models exposing (Meal) import Routing type alias AppModel = { meals : List Meal , currentMeal : Maybe Meal , routing : Routing.Model } initialModel : AppModel initialModel = { meals = [] , currentMeal = Nothing , routing = Routing.initialModel }
module Models (..) where import Meals.Models exposing (Meal) import Routing type alias AppModel = { meals : List Meal , currentMeal : Maybe Meal , routing : Routing.Model , errorMessage : String } initialModel : AppModel initialModel = { meals = [] , currentMeal = Nothing , routing = Routing.initia...
Add error message to app model
Add error message to app model
Elm
apache-2.0
ilkka/mealprep,ilkka/mealprep,ilkka/mealprep
0d65c524ae530fdc32f78471eaac76f890cf6673
examples/ScriptExample.elm
examples/ScriptExample.elm
module Main where import Task import Console exposing (..) import ElmTest.Runner.Console as Console import Test tests : IO () tests = consoleRunner Test.suite3 port runner : Signal (Task.Task x ()) port runner = Console.run sigs
module Main where import Task import Console exposing (..) import ElmTest exposing (consoleRunner) import Test tests : IO () tests = consoleRunner Test.suite3 port runner : Signal (Task.Task x ()) port runner = Console.run tests
Update examples for new API
Update examples for new API
Elm
bsd-3-clause
robertjlooby/elm-test,elm-community/elm-test
d725cb01a4059b7778b8d1caea4c4a5a43049895
src/Silences/Decoders.elm
src/Silences/Decoders.elm
module Silences.Decoders exposing (..) import Json.Decode as Json exposing (field) import Utils.Api exposing (iso8601Time, duration) import Silences.Types exposing (Silence) import Utils.Types exposing (Matcher, Time) show : Json.Decoder Silence show = Json.at [ "data" ] silence list : Json.Decoder (List Silen...
module Silences.Decoders exposing (..) import Json.Decode as Json exposing (field) import Utils.Api exposing (iso8601Time, duration) import Silences.Types exposing (Silence) import Utils.Types exposing (Matcher, Time) show : Json.Decoder Silence show = Json.at [ "data" ] silence list : Json.Decoder (List Silen...
Update silence decoders for empty comment
Update silence decoders for empty comment
Elm
apache-2.0
tyrken/alertmanager,joehandzik/alertmanager,GoogleCloudPlatform/alertmanager,joehandzik/alertmanager,GoogleCloudPlatform/alertmanager,Kellel/alertmanager,joehandzik/alertmanager,Kellel/alertmanager,prometheus/alertmanager,stuartnelson3/am-ui,Aloomaio/alertmanager,prometheus/alertmanager,Aloomaio/alertmanager,tyrken/ale...
376fd7e9397d7ef2a71df67223ae6f47018f1865
app/Data/Currency.elm
app/Data/Currency.elm
module Data.Currency exposing (Currency(Bitcoin, Litecoin, Decred, EthereumClassic), currency) type Currency = Bitcoin | Litecoin | Decred | EthereumClassic currency : String -> Currency currency address = let prefix = String.left 1 address in if prefix == "L" the...
module Data.Currency exposing (..) type Currency = Bitcoin | Litecoin | Decred | EthereumClassic currency : String -> Currency currency address = let prefix = String.left 1 address in if prefix == "L" then Litecoin else if prefix == "D" then ...
Make currency module expose everything since no private stuff
Make currency module expose everything since no private stuff
Elm
mit
nilchaos87/cache,nilchaos87/cache
7ed9f04790fdbd7d4114f418400843434ea64501
exercises/hello-world/HelloWorld.elm
exercises/hello-world/HelloWorld.elm
{- This is a "stub" file. It's a little start on your solution. It's not a complete solution though; you have to write some code. The module name is expected by the test program and must match the name of this file. It has to stay just the way it is. -} module HelloWorld exposing (..) -- It's good style to include...
{- This is a "stub" file. It's a little start on your solution. It's not a complete solution though; you have to write some code. The module name is expected by the test program and must match the name of this file. It has to stay just the way it is. -} module HelloWorld exposing (..) -- It's good style to include...
Replace a word in one of the guiding comments for clarity
Replace a word in one of the guiding comments for clarity
Elm
mit
exercism/xelm
eac235ccc50cc4dc34412b62b67fb0a730928a9f
examples/Counter.elm
examples/Counter.elm
import Html import Html (..) import Window counter : Float -> Html counter count = node "div" [] [ "textAlign" := "center" , "verticalAlign" := "center" , "lineHeight" := px (100 + count) , "border" := "1px solid red" , "width" := px (100 + count) ...
import Html (..) import Html.Tags (..) import Window counter : Int -> Html counter count = let px = show (count + 100) ++ "px" in div [ style [ prop "textAlign" "center" , prop "verticalAlign" "center" , prop "lineHeight" px , prop "border" "1px so...
Update for the new API
Update for the new API
Elm
bsd-3-clause
thSoft/virtual-dom,GlenDC/virtual-dom,shaydon/virtual-dom,evancz/virtual-dom,GlenDC/virtual-dom,jadski/virtual-dom,laszlopandy/virtual-dom,seanhess/virtual-dom,seanhess/virtual-dom,thSoft/virtual-dom,wildlyinaccurate/virtual-dom,ajnsit/virtual-dom,evancz/virtual-dom,jadski/virtual-dom,wildlyinaccurate/virtual-dom,shayd...
85864598c1c31751e12905205e0e4f060d14b005
src/App/Entries/State.elm
src/App/Entries/State.elm
module App.Entries.State exposing (..) import App.Entries.Types exposing (..) import App.Control.Types exposing (Filter(..)) -- INIT initialModel : Model initialModel = { list = [ Entry -1 "First Entry" False , Entry -2 "Second Entry" True ] , filter = All , currentId = 0 } ...
module App.Entries.State exposing (..) import App.Entries.Types exposing (..) import App.Control.Types exposing (Filter(..)) -- INIT initialModel : Model initialModel = { list = [] , filter = All , currentId = 0 } init : ( Model, Cmd Msg ) init = initialModel ! [] -- UPDATE updateModel : Ms...
Update Entries currentId on AddEntry
Update Entries currentId on AddEntry
Elm
mit
jackrzhang/lister-elm,jackrzhang/lister-elm
726500c3aa96015878d7fbbcbe54c1c37f78e14d
app/ChapterEditApp/Models.elm
app/ChapterEditApp/Models.elm
module ChapterEditApp.Models exposing (..) import Json.Encode import Json.Decode import Common.Models exposing (FullCharacter, Character, Narration, Chapter, Banner) newEmptyChapter : Narration -> Chapter newEmptyChapter narration = { id = 0 , narrationId = narration.id , title = "" , audio = narrati...
module ChapterEditApp.Models exposing (..) import Json.Encode import Json.Decode import Common.Models exposing (FullCharacter, Character, Narration, Chapter, Banner) newEmptyChapter : Narration -> Chapter newEmptyChapter narration = { id = 0 , narrationId = narration.id , title = "" , audio = narrati...
Fix structure of empty chapters
Fix structure of empty chapters When creating a new chapter, if the Save or Publish buttons are pushed without writing anything in the box, the saved chapter will have an invalid structure (it will be an empty array, instead of an object with the "type" and "content" properties). To fix the issue: define the default, ...
Elm
bsd-3-clause
emanchado/narrows,emanchado/narrows
99b8afbf9b8f458d26e7b8135fe79d142051fd54
web/src/Toolbox/Update.elm
web/src/Toolbox/Update.elm
module Toolbox.Update exposing (..) import Dict import Http import Set import Toolbox.Types exposing (Model, IngredientID, Response) type Msg = DownloadedIngredients Response | DownloadFailed Http.Error | SelectIngredient IngredientID | NoOp update : Msg -> Model -> ( Model, Cmd Msg ) update action...
module Toolbox.Update exposing (..) import Dict import Http import Set import Toolbox.Types exposing (Model, IngredientID, Response) type Msg = DownloadedIngredients Response | DownloadFailed Http.Error | SelectIngredient IngredientID | NoOp update : Msg -> Model -> ( Model, Cmd Msg ) update action...
Use ! [] for empty Cmd in update.
Use ! [] for empty Cmd in update.
Elm
mit
zsiciarz/skyrim-alchemy-toolbox,zsiciarz/skyrim-alchemy-toolbox,zsiciarz/skyrim-alchemy-toolbox
8e95b13d3d4e7cc9024dc75f7eea6976458e35b0
app/Common/Views/Reading.elm
app/Common/Views/Reading.elm
module Common.Views.Reading exposing (..) import Html import Html.Attributes exposing (style) import Common.Models.Reading exposing (PageState(..)) backgroundImageStyle : Int -> Maybe String -> Int -> List (Html.Attribute msg) backgroundImageStyle narrationId maybeBgImage backgroundBlurriness = let imageUrl =...
module Common.Views.Reading exposing (..) import Html import Html.Attributes exposing (style) import Common.Models.Reading exposing (PageState(..)) backgroundImageStyle : Int -> Maybe String -> Int -> List (Html.Attribute msg) backgroundImageStyle narrationId maybeBgImage backgroundBlurriness = let imageUrl =...
Fix background images with spaces in them
Fix background images with spaces in them Background images with spaces in them were broken, at least since the upgrade to Elm 0.19, because of the way the "background-image" style was being generated.
Elm
bsd-3-clause
emanchado/narrows,emanchado/narrows
d157b3220e9d72e9ef143ff6d62c6d5eb4b30602
examples/src/HomepageView.elm
examples/src/HomepageView.elm
module HomepageView exposing (..) import Html exposing (..) import Html.CssHelpers exposing (..) import Html.Attributes exposing (..) import HomepageCss exposing (..) import Json.Encode as Encode import SharedStyles exposing (..) { id, class, classList } = homepageNamespace main : Html main = div [] ...
module HomepageView exposing (..) import Html exposing (..) import Html.CssHelpers exposing (..) import Html.Attributes exposing (..) import HomepageCss exposing (..) import Json.Encode as Encode import SharedStyles exposing (..) { id, class, classList } = homepageNamespace main : Html a main = div [] ...
Fix example by adding missing argument to Html
Fix example by adding missing argument to Html
Elm
bsd-3-clause
rtfeldman/elm-stylesheets,rtfeldman/elm-stylesheets,rtfeldman/elm-css
4fead9e834bfcc9738831a1f48492e22b3e09c44
src/TM.elm
src/TM.elm
module TM exposing (..) import Html exposing (text) main: Html.Html msg main = text "Hello, World!" -- Model type alias Model = { tm: TuringMachine Int String , running: Bool } type alias TuringMachine states symbols = { tape: Tape symbols , state: states , transitions: T...
module TM exposing (..) import Html exposing (text) import List exposing (head, tail) main: Html.Html msg main = text "Hello, World!" -- Model type alias Model = { tm: TuringMachine Int String , running: Bool } type alias TuringMachine states symbols = { tape: Tape symbols , ...
Create a lookup function for a transition
Create a lookup function for a transition
Elm
mit
fifth-postulate/turing-machine,fifth-postulate/turing-machine
48c6faaad9e84abcdc401e79034f5abb13b6657f
src/Main.elm
src/Main.elm
module Main exposing (..) import Model exposing (..) import Update exposing (Msg, update) import View exposing (view) import Html.App as Html import Date.Extra.Create exposing (dateFromFields) import Date exposing (..) main : Program Never main = Html.program { init = init , update = update ...
module Main exposing (..) import Model exposing (..) import Update exposing (Msg, update) import View exposing (view) import Html.App as Html import Date exposing (..) main : Program Never main = Html.program { init = init , update = update , view = view , subscriptions = (always ...
Use 0 msecs as initial date.
Use 0 msecs as initial date.
Elm
mit
joaalto/finnish-harvest-hours,joaalto/finnish-harvest-hours,joaalto/finnish-harvest-hours
6ea2df90c172f92ee7297bc7cabacbad3429c230
src/Main.elm
src/Main.elm
import Time exposing (Time,second) import Html exposing (Html,text) import Set exposing (Set) -- Model type alias Coordinate = (Int, Int) type alias Model = { alive : Set Coordinate , width : Int , height : Int} init : (Model, Cmd Msg) init = ({alive = Set.empty , width = 10 , height = 10}...
import Time exposing (Time,second) import Html exposing (Html,text) import Set exposing (Set) import Random -- Model type alias Coordinate = (Int, Int) type alias Model = { alive : Set Coordinate , width : Int , height : Int} init : (Model, Cmd Msg) init = let width = 10 widthCoordinateG...
Change initial model creation to randomly generate points
Change initial model creation to randomly generate points
Elm
mit
nafarlee/elm-game-of-life
a700b4d0635d69bfec4b74fbeca3bdf389f3c06d
frontend/Component/View.elm
frontend/Component/View.elm
module Component.View exposing (view) import Component.Model exposing (..) import Component.Messages exposing (..) import Html exposing (Html, div, text, a) import Html.Attributes exposing (class, href) import Nav.Nav exposing (toHash) import Nav.Model exposing (Page(..)) statusIcon : Status -> String statusIcon sta...
module Component.View exposing (view) import Component.Model exposing (..) import Component.Messages exposing (..) import Html exposing (Html, div, text, a) import Html.Attributes exposing (class, href) import Nav.Nav exposing (toHash) import Nav.Model exposing (Page(..)) statusIcon : Status -> String statusIcon sta...
Add INFO icon to view as well
Add INFO icon to view as well
Elm
apache-2.0
Espenhh/panopticon,Espenhh/panopticon,Espenhh/panopticon,Espenhh/panopticon
cea87ba36837be104a0c87545195fa3dd3a12b1c
public/Website/Message.elm
public/Website/Message.elm
module Website.Message (report) where import Website.ColorScheme (..) import Window accents = [accent0,accent1,accent2,accent3,accent4] topBar k n = let n' = toFloat n k' = toFloat k segs = map (\i -> round (n' * toFloat i / k')) [1..k] ws = zipWith (-) segs (0::segs) accentCycle...
module Website.Message (report) where import Website.ColorScheme (..) import Window accents = [accent0,accent1,accent2,accent3,accent4] topBar k n = let n' = toFloat n k' = toFloat k segs = map (\i -> round (n' * toFloat i / k')) [1..k] ws = zipWith (-) segs (0::segs) accentCycle...
Fix links to examples and learn page
Fix links to examples and learn page
Elm
bsd-3-clause
frankschmitt/elm-lang.org,kevinrood/elm-lang.org,inchingforward/elm-lang.org,FranklinChen/elm-lang.org,rtorr/elm-lang.org,akeeton/elm-lang.org,amitaibu/elm-lang.org,liubko/elm-lang.org,liubko/elm-lang.org,ThomasWeiser/elm-lang.org,coreyhaines/elm-lang.org,randomer/elm-lang.org,elm-lang/debug.elm-lang.org,jazmit/elm-lan...
cf66d14edcaea670f4c38c48537d5c52794edbb2
web/src/Toolbox/Views.elm
web/src/Toolbox/Views.elm
module Toolbox.Views (..) where import Html exposing (..) import Html.Attributes exposing (..) import Toolbox.Action exposing (Action) import Toolbox.Types exposing (Ingredient, Model) view : Signal.Address Action -> Model -> Html view address model = case model.response of Just r -> div [ class ...
module Toolbox.Views (..) where import Html exposing (..) import Html.Attributes exposing (..) import Html.Events exposing (..) import Json.Decode import Toolbox.Action exposing (Action(..)) import Toolbox.Types exposing (Ingredient, Model) view : Signal.Address Action -> Model -> Html view address model = case mo...
Disable event propagation and send NoOp action on click.
Disable event propagation and send NoOp action on click.
Elm
mit
zsiciarz/skyrim-alchemy-toolbox,zsiciarz/skyrim-alchemy-toolbox,zsiciarz/skyrim-alchemy-toolbox
2e21f02bff991c16c660504beb85957d5b2c872f
src/Rogue/View.elm
src/Rogue/View.elm
module Rogue.View where import Color exposing (..) import Graphics.Collage exposing (..) import Graphics.Element exposing (..) import String exposing (join) import Text import Array exposing (..) import Rogue.Model exposing (..) view : Game -> Element view g = leftAligned (Text.monospace (Text.fromString (toString g...
module Rogue.View where import Color exposing (..) import Graphics.Collage exposing (..) import Graphics.Element exposing (..) import String exposing (join) import Text import Array exposing (..) import Rogue.Model exposing (..) view : Game -> Element view g = viewGameMap g.gameMap viewGameMap : GameMap -> Element ...
Change view code to use elements
Change view code to use elements
Elm
mit
chendrix/elm-rogue,chendrix/elm-rogue,chendrix/elm-rogue
197147f23509e64be5c115e4319b93fbae9a3fa5
src/App/Input/View.elm
src/App/Input/View.elm
module App.Input.View exposing (..) import Html exposing (..) import Html.Attributes exposing (..) import Html.Events exposing (onInput) import Utility.OnEnter exposing (onEnter) import App.Types as App import App.Input.Types as Input import App.List.Types as List view : Input.Model -> Html App.Msg view model = ...
module App.Input.View exposing (..) import Html exposing (..) import Html.Attributes exposing (..) import Html.Events exposing (onInput) import Utility.OnEnter exposing (onEnter) import App.Types as App import App.Input.Types as Input import App.List.Types as List view : Input.Model -> Html App.Msg view model = ...
Refactor add new entries into createAddEntryMsg function
Refactor add new entries into createAddEntryMsg function
Elm
mit
jackrzhang/lister-elm,jackrzhang/lister-elm
1e01f8f7cfca55049cf659c830bfaa516e6df424
src/Timer/Styles.elm
src/Timer/Styles.elm
module Timer.Styles exposing (StyleElement, Styles(..), styleSheet) import Color import Element exposing (Element) import Style import Style.Color import Style.Font import Timer.Msg exposing (Msg) type alias StyleElement = Element Styles Never Msg type Styles = None | Timer | MobsterName | Brea...
module Timer.Styles exposing (StyleElement, Styles(..), styleSheet) import Color import Element exposing (Element) import Style exposing (Font) import Style.Color import Style.Font as Font import Timer.Msg exposing (Msg) type alias StyleElement = Element Styles Never Msg type Styles = None | Timer ...
Add fallback font for timer styles.
Add fallback font for timer styles.
Elm
mit
dillonkearns/mobster,dillonkearns/mobster,dillonkearns/mobster,dillonkearns/mobster
48a9d126dbcbb371f7cf34dc425f698212e11fd0
_layouts/Intro.elm
_layouts/Intro.elm
module Intro exposing (banner) import Html exposing (Html, div, text) import Html.Attributes as Attr exposing (class) banner : Html Never banner = div [ class "intro" ] [ text "Hello, Intro!" , inlineScript "require([\"intro\"]);" ] -- UTILITIES inlineScript : String -> Html Never in...
module Intro exposing (banner) import Html exposing (Html, div, text) import Html.Attributes as Attr exposing (class) banner : Html Never banner = text "" --div [ class "intro" ] -- [ text "Hello, Intro!" -- , inlineScript "require([\"intro\"]);" -- ] -- UTILITIES inlineScript : Str...
Remove JavaScript intro placeholder for now
chore: Remove JavaScript intro placeholder for now We'll come back to this at a later point in time.
Elm
bsd-3-clause
canena/canena.github.io,canena/canena.github.io
395b3b9c082e15c4eb1b416d2d0e69767e451e96
spotify-mini/elm/Routing/App.elm
spotify-mini/elm/Routing/App.elm
module Routing.App exposing (..) import App.Model exposing (App) import App.Msg as App exposing (Msg) import Navigation urlParser : Navigation.Parser String urlParser = Navigation.makeParser (\location -> "/") mapUrl : String -> App -> ( App, Cmd App.Msg ) mapUrl uri model = ( model, Cmd.none )
module Routing.App exposing (..) import App.Model exposing (App) import App.Msg as App exposing (Msg) import Navigation {- Custom URL Parser Transforms location to something Application's init and urlUpdate functions understand, e.g. "/app", 0 or even AppHome Sample Scenario: Given location "localhos...
Set default route and redirect when not matched.
Navigation: Set default route and redirect when not matched.
Elm
isc
maciejsmolinski/elm-playground,maciejsmolinski/elm-playground
23dd9f615f3812a4e7c961de7479d7edbcdaf7a8
app/javascript/biodiversity_reports/Main.elm
app/javascript/biodiversity_reports/Main.elm
module Main exposing (..) import Html exposing (Html, div, input, span, text) import Html.Attributes as H exposing (..) import Html.Events exposing (onInput) -- MAIN main : Program Never { value : String } Msg main = Html.beginnerProgram { model = { value = "20" } , view = view , updat...
module Main exposing (..) import Html exposing (Html, div, input, span, text) import Html.Attributes as H exposing (..) import Html.Events exposing (onInput) -- MAIN main : Program Never Model Msg main = Html.beginnerProgram { model = initialModel , view = view , update = update ...
Use Elm conventions for main, initialModel. One typical signature of an Elm 'main' is 'Program Never Model Msg'. And sometimes folks use an 'initialModel' for the initial model, rather than an explicit inline record within 'main'. - Replace record type with Model. - Declare 'initialModel' using literal record, and refe...
Use Elm conventions for main, initialModel. One typical signature of an Elm 'main' is 'Program Never Model Msg'. And sometimes folks use an 'initialModel' for the initial model, rather than an explicit inline record within 'main'. - Replace record type with Model. - Declare 'initialModel' using literal record, and refe...
Elm
mit
osu-cascades/ecotone-web,osu-cascades/ecotone-web,osu-cascades/ecotone-web,osu-cascades/ecotone-web
8407a4140bfd1241a9a1c5c334ac2c62f27b0243
web/Dashboard.elm
web/Dashboard.elm
Dashboard.elm
module Dashboard where import Html exposing (..) import Html.Attributes exposing (..) import Maybe import Signal exposing (Signal, Address) import String type alias Dashboard = { circuits : List String } type alias Circuit = { serviceName: String , name: String , currentStatus: BreakerStatus , currentLa...
Add the rest of dashboard
Add the rest of dashboard
Elm
mit
hatchery/cbdb,hatchery/cbdb
a28c6bd8e302826e765fd9f28f60ec7bf50ba6d5
src/Game.elm
src/Game.elm
module Game exposing (Model, init, Msg(..), update, view, subscriptions) import Html exposing (Html, div, text, br, h1) import Html.Attributes exposing (class) import Html.App as App import Time exposing (Time) import Level --MODEL type alias Level = Level.Model type alias Model = { level : Level } ...
module Game exposing (Model, init, Msg(..), update, view, subscriptions) import Html exposing (Html, div, text, br, h1) import Html.Attributes exposing (class) import Html.App as App import Time exposing (Time) import Level --MODEL type alias Level = Level.Model type View = GameView | MainMenu | ...
Add type for routing between the current level, main menu and pause menu.
Add type for routing between the current level, main menu and pause menu.
Elm
bsd-3-clause
undreren/lightsout,undreren/lightsout
efcab7898bd28b3ec879a02248d1b809d9c0b732
Main.elm
Main.elm
import Html.App as App import Html exposing (Html) import IdeaFight.LandingPage as LandingPage type Model = LandingPageModel LandingPage.Model type Msg = LandingPageMsg LandingPage.Msg mapTEA : (modela -> modelb) -> (msga -> msgb) -> (modela, Cmd msga) -> (modelb, Cmd msgb) mapTEA modelTransform msgTransform (oldM...
import Html.App as App import Html exposing (Html) import IdeaFight.LandingPage as LandingPage import IdeaFight.Compete as Compete type Model = LandingPageModel LandingPage.Model | CompeteModel Compete.Model type Msg = LandingPageMsg LandingPage.Msg | CompeteMsg Compete.Msg mapTEA : (modela -> modelb) -> (msga -> ...
Add simple binding for compete subapp
Add simple binding for compete subapp Main now compiles with it
Elm
mit
hoelzro/idea-fight
633743c237e4aa619b0f874f96c104833305521a
frontend/src/Update.elm
frontend/src/Update.elm
module Update (..) where import Models exposing (..) import Debug import Actions exposing (..) import Effects exposing (Effects) import Routing import Mailboxes exposing (..) import Meals.Update import Meals.Effects update : Action -> AppModel -> ( AppModel, Effects Action ) update action model = case (Debug.log "...
module Update (..) where import Models exposing (..) import Debug import Actions exposing (..) import Effects exposing (Effects) import Routing import Mailboxes exposing (..) import Meals.Update import Meals.Effects update : Action -> AppModel -> ( AppModel, Effects Action ) update action model = case (Debug.log "...
Fix edit route not fetching data
Fix edit route not fetching data The main app updater wasn't checking for the edit route subaction.
Elm
apache-2.0
ilkka/mealprep,ilkka/mealprep,ilkka/mealprep
ee912a12cdd1ad812e680ad8b5d9d972845bae26
elm/src/Main.elm
elm/src/Main.elm
module Main exposing (..) import Navigation import View import Update import Model exposing (Model) import Types exposing (User) import Route import Msg exposing (Msg(..)) import Task import Material import Http import Decoders main : Program Never main = Navigation.program (Navigation.makeParser Route.locFor) ...
module Main exposing (..) import Navigation import View import Update import Model exposing (Model) import Types exposing (User) import Route import Msg exposing (Msg(..)) import Task import Material import Http import Decoders main : Program Never main = Navigation.program (Navigation.makeParser Route.locFor) ...
Stop using the API for now
Stop using the API for now
Elm
mit
knewter/time-tracker,knewter/time-tracker
428ffa9102f61d4063136d0eeab197eb51edc73e
frontend/Nav/Nav.elm
frontend/Nav/Nav.elm
module Nav.Nav exposing (..) import Navigation import UrlParser exposing (Parser, (</>), oneOf, map, s, string, parseHash, top) import Nav.Model exposing (Page(..)) toHash : Page -> String toHash page = case page of Components -> "#" Component env system component server -> ...
module Nav.Nav exposing (..) import Navigation import UrlParser exposing (Parser, (</>), oneOf, map, s, string, parseHash, top) import Nav.Model exposing (Page(..)) import String exposing (join) toHash : Page -> String toHash page = case page of Components -> "#" Component env system...
Use String.join instead of ++
Use String.join instead of ++
Elm
apache-2.0
Espenhh/panopticon,Espenhh/panopticon,Espenhh/panopticon,Espenhh/panopticon
646cdb806b6b265faaf196d02e304f46312af7ab
web/src/Toolbox/Update.elm
web/src/Toolbox/Update.elm
module Toolbox.Update exposing (..) import Dict import Http import Set import Toolbox.Types exposing (Model, IngredientID, Response) type Msg = DownloadedIngredients Response | DownloadFailed Http.Error | SelectIngredient IngredientID | NoOp update : Msg -> Model -> ( Model, Cmd Msg ) update action...
module Toolbox.Update exposing (..) import Dict import Http import Set import Toolbox.Types exposing (Model, IngredientID, Response) type Msg = DownloadedIngredients Response | DownloadFailed Http.Error | SelectIngredient IngredientID | NoOp update : Msg -> Model -> ( Model, Cmd Msg ) update action...
Allow to select max 3 ingredients.
Allow to select max 3 ingredients.
Elm
mit
zsiciarz/skyrim-alchemy-toolbox,zsiciarz/skyrim-alchemy-toolbox,zsiciarz/skyrim-alchemy-toolbox
4b4b8dc770281eefff0dc4d8b95d6d9e88791047
public/examples/Reactive/Bounce.elm
public/examples/Reactive/Bounce.elm
main = draw <~ ball -- Draw the sky, ball, and ground draw ball = collage 200 400 [ rect 200 400 |> filled (rgb 135 206 250) , circle 15 |> filled red |> move (0, ball.height - 160) , rect 200 50 |> filled green |> move (0,-200) ] -- Physics gravity = 140 bounceV...
main = draw <~ ball -- Draw the sky, ball, and ground draw ball = collage 150 400 [ rect 150 400 |> filled (rgb 135 206 250) , circle 15 |> filled red |> move (0, ball.height - 160) , rect 150 50 |> filled green |> move (0,-200) ] -- Physics gravity = 140 bounceV...
Make the bounce world skinnier
Make the bounce world skinnier
Elm
bsd-3-clause
yang-wei/elm-lang.org,eeue56/elm-lang.org,jvoigtlaender/elm-lang.org,thSoft/elm-lang.org,liubko/elm-lang.org,avh4/elm-lang.org,randomer/elm-lang.org,coreyhaines/elm-lang.org,FranklinChen/elm-lang.org,jazmit/elm-lang.org,rtorr/elm-lang.org,eeue56/elm-lang.org,rtorr/elm-lang.org,yang-wei/elm-lang.org,jazmit/elm-lang.org,...
658d13058e6fa0da5ea9224951ba64e0be5fae09
elmstreet/src/Main.elm
elmstreet/src/Main.elm
module Main exposing (..) import Browser import Html exposing (Html, text, div, h1, img) import Html.Attributes exposing (src) ---- MODEL ---- type alias Model = {} init : ( Model, Cmd Msg ) init = ( {}, Cmd.none ) ---- UPDATE ---- type Msg = NoOp update : Msg -> Model -> ( Model, Cmd Msg ) up...
module Main exposing (Model, Msg(..), init, main, update, view) import Browser import Html exposing (Html, button, div, h1, img, text) import Html.Attributes exposing (src) import Html.Events exposing (onClick) ---- MODEL ---- type alias Model = Int init : ( Model, Cmd Msg ) init = ( 0, Cmd.none ) --...
Add counter example in Elm
Add counter example in Elm
Elm
mit
kevgathuku/trackflix,kevgathuku/trackflix
0cb89c6c46d551d71fc04e8f95ef2e4bd62540b9
examples/Intermediate/Stamps.elm
examples/Intermediate/Stamps.elm
import Mouse import Window main = lift2 scene Window.dimensions clickLocations -- for a good time, remove "sampleOn Mouse.clicks" ;) clickLocations = foldp (::) [] (sampleOn Mouse.clicks Mouse.position) scene (w,h) locs = let drawPentagon (x,y) = ngon 5 20 |> filled (hsva (toFloat x) 1 1 0.7) ...
import Mouse import Window main : Signal Element main = lift2 scene Window.dimensions clickLocations clickLocations : Signal [(Int,Int)] clickLocations = foldp (::) [] (sampleOn Mouse.clicks Mouse.position) scene : (Int,Int) -> [(Int,Int)] -> Element scene (w,h) locs = let drawPentagon (x,y) = ngon 5 20...
Make example clearer and thinner
Make example clearer and thinner
Elm
bsd-3-clause
elm-lang/debug.elm-lang.org,elm-lang/debug.elm-lang.org
32f1b50a403c13d26d1932d64bd58a50d98a3861
simulator/Simulator/Input.elm
simulator/Simulator/Input.elm
module Simulator.Input where import Json.Decode as Json exposing (..) import Simulator.Cell exposing (Cell) import Simulator.Unit exposing (Unit) type alias Input = { id: Int , width: Int , height: Int , filled: List Cell , units: List Unit , sourceSeeds: List Int , sourceLength: Int } parse : Strin...
module Simulator.Input where import Json.Decode as Json exposing (..) import Simulator.Cell exposing (Cell, fromInputCell, InputCell(..)) import Simulator.Unit exposing (Unit) type alias Input = { id: Int , width: Int , height: Int , filled: List Cell , units: List Unit , sourceSeeds: List Int , source...
Convert coordinates when reading input
Convert coordinates when reading input
Elm
bsd-3-clause
blax/icfp-contest-2015,mietek/icfp-contest-2015
76fcb0a0812d0a8660869dda6c42c533decfcc8c
Licht.elm
Licht.elm
import Html exposing (..) import Html.Events exposing (onClick) import StartApp main = StartApp.start { model = init, view = view, update = update } -- Model type alias AppState = { nextID : Int , layers : List ( ID, String ) } type alias ID = Int init : AppState init = { layers = [(0, "one"), (1, "two"...
import Html exposing (..) import Html.Events exposing (onClick) import StartApp main = StartApp.start { model = init, view = view, update = update } -- Model type alias AppState = { nextID : Int , layers : List ( ID, String ) } type alias ID = Int init : AppState init = { layers = [(0, "one"), (1, "two"...
Change in formatting, so it doesn't look like the ( is being backslash-escaped
Change in formatting, so it doesn't look like the ( is being backslash-escaped
Elm
mit
spiralman/licht,spiralman/licht
099f660bc39e0f9e0a5d379a1b51f2c1bd5bb036
lib/keystone.elm
lib/keystone.elm
port module Keystone exposing (..) import Html exposing (..) import Html.App as Html import Html.Attributes as Att exposing (..) -- import Html.Events exposing (onClick, onInput, onCheck) -- import String main : Program Never main = Html.program { init = init , view = view , update = update , subscript...
port module Keystone exposing (..) import Html exposing (..) import Html.Attributes as Att exposing (..) -- import Html.Events exposing (onClick, onInput, onCheck) -- import String main : Program Never Model Msg main = program { init = init , view = view , update = update , subscriptions = subscription...
Fix compilation errors from Elm upgrade.
Fix compilation errors from Elm upgrade.
Elm
apache-2.0
google/keystone,google/keystone
f1a34404627de51437b1d2e4bf462a628d0ad645
Dreamwriter/View/CurrentDoc.elm
Dreamwriter/View/CurrentDoc.elm
module Dreamwriter.View.CurrentDoc (view) where import Dreamwriter.Doc (..) import Dreamwriter.Action (..) import Html (..) import Html.Attributes (..) import Html.Events (..) import Html.Tags (..) view : Doc -> Html view currentDoc = div [key "current-doc-view", id "current-doc-view"] [ div [id "title", oncli...
module Dreamwriter.View.CurrentDoc (view) where import Dreamwriter.Doc (..) import Dreamwriter.Action (..) import Html (..) import Html.Attributes (..) import Html.Events (..) import Html.Tags (..) view : Doc -> Html view currentDoc = div [key "current-doc-view", id "current-doc-view"] [ div [id "title", oncli...
Make add-chapter a span so it doesn't take up the whole line.
Make add-chapter a span so it doesn't take up the whole line.
Elm
apache-2.0
Softsapiens/dreamwriter,manesiotise/dreamwriter,manesiotise/dreamwriter,makyo/dreamwriter,jlongster/dreamwriter,ajnsit/dreamwriter,rtfeldman/dreamwriter,ajnsit/dreamwriter,Softsapiens/dreamwriter,rtfeldman/dreamwriter,Iced-Tea/dreamwriter,makyo/dreamwriter,Iced-Tea/dreamwriter,jlongster/dreamwriter,zztczcx/dreamwriter,...
602117f211eb665a1f98ba79b32ada1bb1fd16f2
libraries/Char.elm
libraries/Char.elm
module Char where import Native.Char as Native -- True for upper case letters. isUpper : Char -> Bool isUpper = Native.isUpper -- True for lower case letters. isLower : Char -> Bool isLower = Native.isLower -- True for ASCII digits (`0..9`). isDigit : Char -> Bool isDigit = Native.isDigit -- True for ASCII octal ...
module Char where import Native.Char as Native -- True for upper case letters. isUpper : Char -> Bool isUpper = Native.isUpper -- True for lower case letters. isLower : Char -> Bool isLower = Native.isLower -- True for ASCII digits (`0..9`). isDigit : Char -> Bool isDigit = Native.isDigit -- True for ASCII octal ...
Correct types (Int back to KeyCode)
Correct types (Int back to KeyCode)
Elm
bsd-3-clause
mgold/Elm,laszlopandy/elm-compiler,5outh/Elm,deadfoxygrandpa/Elm,pairyo/elm-compiler,JoeyEremondi/elm-pattern-effects,Axure/elm-compiler
653a3ebf212910e29e521d4f6366a701274e689b
public/learn/Using-Signals.elm
public/learn/Using-Signals.elm
import Website.Skeleton (skeleton) import Window port title : String port title = "Using Signals" main = skeleton "Learn" (content << min 600) <~ Window.dimensions content w = width w [markdown| # Using Signals Signals are values that change over time. You can learn more about the basics of signals in [this post]...
import Website.Skeleton (skeleton) import Window port title : String port title = "Using Signals" main = skeleton "Learn" (content << min 600) <~ Window.dimensions content w = width w [markdown| # Using Signals Signals are values that change over time. You can learn more about the basics of signals in [this post]...
Write up "The Typical Pattern"
Write up "The Typical Pattern"
Elm
bsd-3-clause
randomer/elm-lang.org,kevinrood/elm-lang.org,inchingforward/elm-lang.org,akeeton/elm-lang.org,liubko/elm-lang.org,rtorr/elm-lang.org,jvoigtlaender/elm-lang.org,coreyhaines/elm-lang.org,elm-guides/elm-lang.org,yang-wei/elm-lang.org,liubko/elm-lang.org,avh4/elm-lang.org,jvoigtlaender/elm-lang.org,yang-wei/elm-lang.org,fr...
ed7a70b9ea4a100f002e26ad335305260b8fbdf3
IdeaFight/Compete.elm
IdeaFight/Compete.elm
module IdeaFight.Compete exposing (Model, Msg, init, update, subscriptions, view) import IdeaFight.Shuffle as Shuffle import Html.App as App import Html exposing (Html, text) import Random import String type alias Model = List String type Msg = ShuffledContents (List String) init : String -> (Model, Cmd Msg) init ...
module IdeaFight.Compete exposing (Model, Msg, init, update, subscriptions, view) import IdeaFight.Shuffle as Shuffle import Html.App as App import Html exposing (Html, text) import Random import String type alias Model = (List String, Int) type Msg = ShuffledContents (List String) init : String -> (Model, Cmd Msg...
Introduce numTop model member for compete subapp
Introduce numTop model member for compete subapp This is hardcoded as 3 for now, but it will be the number of best ideas to result from the application
Elm
mit
hoelzro/idea-fight
b17cb63bea9aba1c7579453619c1cc2a0f6f47c6
src/Test/Reporter/Console/Format/Color.elm
src/Test/Reporter/Console/Format/Color.elm
module Test.Reporter.Console.Format.Color exposing (formatEquality) import Test.Reporter.Highlightable as Highlightable exposing (Highlightable(..)) import Test.Runner.Node.Vendor.Console as Console formatEquality : List (Highlightable String) -> List (Highlightable String) -> ( String, String ) formatEquality highl...
module Test.Reporter.Console.Format.Color exposing (formatEquality) import Test.Reporter.Highlightable as Highlightable exposing (Highlightable(..)) import Test.Runner.Node.Vendor.Console as Console formatEquality : List (Highlightable String) -> List (Highlightable String) -> ( String, String ) formatEquality highl...
Use inverted colors over cyan for accessible diffs
Use inverted colors over cyan for accessible diffs This should mean that the diffs are high enough contrast to read on any terminal where the original text was high enough contrast to read. Fixes https://github.com/elm-community/elm-test/issues/218
Elm
bsd-3-clause
rtfeldman/node-test-runner,ento/node-elm-test,rtfeldman/node-elm-test,ento/node-elm-test,rtfeldman/node-elm-test
55f1ae2f423ec8da1982915c9a008e6f812ce5c9
tests/Main.elm
tests/Main.elm
{- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/. Copyright 2016 by Ian Mackenzie ian.e.mackenzie@gmail.com -} module Main exposing (..) import ElmTest exposi...
{- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/. Copyright 2016 by Ian Mackenzie ian.e.mackenzie@gmail.com -} module Main exposing (..) import ElmTest import...
Make test code a bit more explicit
Make test code a bit more explicit
Elm
mpl-2.0
opensolid/geometry
474a6c8558a42f235b4ceef875d2a19d1d6ecfa0
frontend/App/Update.elm
frontend/App/Update.elm
module App.Update exposing (update) import App.Messages exposing (..) import App.Model exposing (..) import Components.Update import Detail.Update import Nav.Requests exposing (getSystemStatus, getDetails) import Nav.Model exposing (..) update : Msg -> Model -> ( Model, Cmd Msg ) update msg model = case msg of ...
module App.Update exposing (update) import App.Messages exposing (..) import App.Model exposing (..) import Components.Update import Detail.Update import Detail.Model import Nav.Requests exposing (getSystemStatus, getDetails) import Nav.Model exposing (..) update : Msg -> Model -> ( Model, Cmd Msg ) update msg model...
Clear component details when navigating away from component
Clear component details when navigating away from component
Elm
apache-2.0
Espenhh/panopticon,Espenhh/panopticon,Espenhh/panopticon,Espenhh/panopticon
c559bab7909906b6bf20ad28ec41b6b14f0b1956
elm/records.elm
elm/records.elm
import Graphics.Element exposing (Element) import ElmTest exposing (elementRunner, suite, test, assertEqual) import Date -- a = {name = "Alice"} b = {name = "Bob", supervisor = a} c = {a | birthday = Date.fromString "1998-12-31"} main : Element main = elementRunner <| suite "Exploring records" [ test "one" <| ....
import ElmTest exposing (elementRunner, suite, defaultTest, assertEqual) import List exposing (map) boss = {name = "Alice", salary = 200000 } worker = {name = "Bob", salary = 50000, supervisor = boss} newWorker = {worker | name = "Carol" } payrollTax : {a | salary : Float} -> Float payrollTax {salary} = salary * 0....
Complete the intro record example in Elm
Complete the intro record example in Elm
Elm
mit
rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal...
74aa6df32bd56f26349abcd70c8f642c293b48c8
src/OpenSolid/Direction2d.elm
src/OpenSolid/Direction2d.elm
module OpenSolid.Direction2d ( Direction2d(Direction2d) , none , polar , xDirection , yDirection , xComponent , yComponent , components , normalDirection ) where type Direction2d = Direction2d Float Float none: Direction2d none = Direction2d 0 0 polar: Float -> Direction2d polar angle = ...
module OpenSolid.Direction2d ( Direction2d(Direction2d) , none , xDirection , yDirection , polar , xComponent , yComponent , components , normalDirection ) where type Direction2d = Direction2d Float Float none: Direction2d none = Direction2d 0 0 xDirection: Direction2d xDirection = Direc...
Rearrange to put constants first
Rearrange to put constants first Primary constructor, then constants, then auxiliary constructors, then 'member functions'
Elm
mpl-2.0
opensolid/geometry
2107ab11ab784b93ed2ff01691cdb5b9295acfdf
frontend/App/Update.elm
frontend/App/Update.elm
module App.Update exposing (update) import App.Messages exposing (..) import App.Model exposing (..) import Components.Update import Detail.Update import Nav.Requests exposing (getSystemStatus, getDetails) import Nav.Model exposing (..) update : Msg -> Model -> ( Model, Cmd Msg ) update msg model = case msg of ...
module App.Update exposing (update) import App.Messages exposing (..) import App.Model exposing (..) import Components.Update import Detail.Update import Nav.Requests exposing (getSystemStatus, getDetails) import Nav.Model exposing (..) update : Msg -> Model -> ( Model, Cmd Msg ) update msg model = case msg of ...
Move page update logic into separate function
Move page update logic into separate function
Elm
apache-2.0
Espenhh/panopticon,Espenhh/panopticon,Espenhh/panopticon,Espenhh/panopticon
695a831191d82b9954a158b245a8d22c73ac0677
Dreamwriter/Model.elm
Dreamwriter/Model.elm
module Dreamwriter.Model where import Dreamwriter (Identifier) data LeftSidebarView = CurrentDocView | OpenMenuView type MsSinceEpoch = Int type HtmlString = String -- TODO make this a proper ADT once outbound ports can accept them type FullscreenState = Bool type AppState = { leftSidebarView : LeftSidebarView...
module Dreamwriter.Model where import Dreamwriter (Identifier) import Dict data LeftSidebarView = CurrentDocView | OpenMenuView type MsSinceEpoch = Int type HtmlString = String -- TODO make this a proper ADT once outbound ports can accept them type FullscreenState = Bool type AppState = { leftSidebarView : Lef...
Add a Dict of snapshots to AppState.
Add a Dict of snapshots to AppState.
Elm
apache-2.0
Iced-Tea/dreamwriter,rtfeldman/dreamwriter,manesiotise/dreamwriter,Softsapiens/dreamwriter,zztczcx/dreamwriter,makyo/dreamwriter,ajnsit/dreamwriter,manesiotise/dreamwriter,zztczcx/dreamwriter,Softsapiens/dreamwriter,jlongster/dreamwriter,Iced-Tea/dreamwriter,makyo/dreamwriter,jlongster/dreamwriter,ajnsit/dreamwriter,rt...
f81487d6c0de7b961503a73144b30dcb3faab0a1
src/Main.elm
src/Main.elm
module Main exposing (main) import Html exposing (..) import Html.Attributes exposing (..) import ChartCard import Samples main : Program Never Model Msg main = Html.beginnerProgram { model = model , view = view , update = update } -- MODEL type alias Model = List ChartCa...
module Main exposing (main) import Html exposing (..) import Html.Attributes exposing (..) import ChartCard import Samples main : Program Never Model Msg main = Html.beginnerProgram { model = model , view = view , update = update } -- MODEL type alias Model = List ChartCa...
Rename ChartCard to ChartCardMsg to explicit it's a Msg
Rename ChartCard to ChartCardMsg to explicit it's a Msg
Elm
agpl-3.0
open-chords-charts/chart-editor,open-chords-charts/chart-editor
0d55f209309a109887e0a5ed0567a9d06ef38c5c
app/src/Views/Retro/Contents.elm
app/src/Views/Retro/Contents.elm
module Views.Retro.Contents exposing (view) import Bitwise import Bulma import Char import Data.Content exposing (Content) import Html exposing (Html) import Html.Attributes as Attr view : List Content -> Html msg view contents = contents |> List.map contentView |> List.intersperse (Html.hr [] []...
module Views.Retro.Contents exposing (view) import Bitwise import Bulma import Char import Data.Content exposing (Content) import Html exposing (Html) import Html.Attributes as Attr view : List Content -> Html msg view contents = contents |> List.map contentView |> List.intersperse (Html.hr [] []...
Add link to where code was lifted
Add link to where code was lifted
Elm
mit
hawx/retro,hawx/retro,hawx/retro
1f8c818f52447445d65d8a8d7e6d0a799905d13e
spotify-mini/elm/Main.elm
spotify-mini/elm/Main.elm
module Main exposing (main) import Html.App import App.Model exposing (App) import App.View import App.Action exposing (Action(UpdateTrackList)) import Ports.Ports exposing (updateTrackList) main : Program Never main = Html.App.program { init = App.Model.initial , view = App.View.render ,...
module Main exposing (main) import Html.App import App.Model exposing (App) import App.View import App.Action exposing (Action(UpdateTrackList)) import Ports.Ports exposing (updateTrackList) main : Program Never main = Html.App.program { init = App.Model.initial , view = App.View.render ,...
Use `Sub.batch` to process many ports if needed.
SpotifyMini: Use `Sub.batch` to process many ports if needed.
Elm
isc
maciejsmolinski/elm-playground,maciejsmolinski/elm-playground
b80ebe9884765ddc30e56cc428c2cbe73afc41a7
IdeaFight/ForestTest.elm
IdeaFight/ForestTest.elm
import Html.App as App import Html exposing (Html, br, div, text) import IdeaFight.PartialForest as Forest import IdeaFight.Shuffle as Shuffle import Random import Time type alias Model = Forest.Forest Int type Msg = ShuffleMe (List Int) | Tick stepForest : Forest.Forest comparable -> Forest.Forest comparable stepF...
import Html.App as App import Html exposing (Html, br, div, text) import IdeaFight.PartialForest as Forest import IdeaFight.Shuffle as Shuffle import Random import Time type alias Model = Forest.Forest Int type Msg = ShuffleMe (List Int) | Advance stepForest : Forest.Forest comparable -> Forest.Forest comparable st...
Rename Tick to Advance in forest test
Rename Tick to Advance in forest test I'm going to change it to clicking
Elm
mit
hoelzro/idea-fight
a5006e1784a0e3e2ed1683af87a96b41e2a358ff
public/examples/Intermediate/TextReverse.elm
public/examples/Intermediate/TextReverse.elm
import Graphics.Input (Input, input) import Graphics.Input.Field (Content, noContent, field, defaultStyle, Forward, Backward) import String import Window main : Signal Element main = display <~ Window.dimensions ~ content.signal content : Input Content content = input noContent display : (Int,Int) -> Content -> Elem...
import Graphics.Input (Input, input) import Graphics.Input.Field (Content, noContent, field, defaultStyle, Forward, Backward) import String import Window main : Signal Element main = display <~ Window.dimensions ~ content.signal content : Input Content content = input noContent display : (Int,Int) -> Content -> Elem...
Make the reversal example more fun and informative
Make the reversal example more fun and informative
Elm
bsd-3-clause
coreyhaines/elm-lang.org,frankschmitt/elm-lang.org,akeeton/elm-lang.org,yang-wei/elm-lang.org,ThomasWeiser/elm-lang.org,elm-lang/debug.elm-lang.org,elm-guides/elm-lang.org,coreyhaines/elm-lang.org,rtorr/elm-lang.org,FranklinChen/elm-lang.org,jvoigtlaender/elm-lang.org,FranklinChen/elm-lang.org,randomer/elm-lang.org,eeu...
efd6ee2d8074d0bc45f5a9747ea05c8afa92dc7d
src/Ref.elm
src/Ref.elm
module Ref exposing (resolveReference) import Json.Schema.Definitions exposing (Schema(ObjectSchema, BooleanSchema), SubSchema, Schemata(Schemata)) resolveReference : Schema -> String -> Maybe Schema resolveReference schema ref = schema |> whenObjectSchema |> Maybe.andThen (\os -> ...
module Ref exposing (resolveReference) import Json.Schema.Definitions exposing (Schema(ObjectSchema, BooleanSchema), SubSchema, Schemata(Schemata)) resolveReference : Schema -> String -> Maybe Schema resolveReference schema ref = schema |> whenObjectSchema |> Maybe.andThen (\os -> ...
Add ability to resolve boolean schema
Add ability to resolve boolean schema
Elm
bsd-3-clause
1602/elm-json-schema
aa4f5fcb0f7447644ac9c679ebb0a9e44b578878
src/Utils/HttpUtils.elm
src/Utils/HttpUtils.elm
module Utils.HttpUtils exposing (..) import HttpBuilder exposing (..) httpErrorToString : HttpBuilder.Error String -> String httpErrorToString error = case error of UnexpectedPayload str -> """ Internal Error! You can't do anything about this, contact someone who does tech stuff! ...
module Utils.HttpUtils exposing (..) import HttpBuilder exposing (..) httpErrorToString : HttpBuilder.Error String -> String httpErrorToString error = case error of UnexpectedPayload str -> """ Internal Error! You can't do anything about this, contact someone who does tech stuff! ...
Add userExists error to httpErrorToString
Add userExists error to httpErrorToString
Elm
apache-2.0
bnkrs/bnk-frontend,bnkrs/bnk-frontend,bnkrs/bnk-frontend
31b984650566b56c51d16fea913929909a1ce643
Chain.elm
Chain.elm
module Chain exposing (Model, init, update, subscriptions) import Html exposing (Html) import Piece exposing (Msg) import AnimationFrame import Time exposing (Time) import Style type alias Model = List Piece.Model init : ( Model, Cmd Msg ) init = ( [], Cmd.none ) subscriptions : Model -> Sub Msg subscrip...
module Chain exposing (Model, init, update, subscriptions) import Html exposing (Html) import Piece import AnimationFrame import Time exposing (Time) import Style type alias Model = List Piece.Model init : ( Model, Cmd Msg ) init = ( [], Cmd.none ) subscriptions : Model -> Sub Msg subscriptions model = ...
Remove unneeded exposing of Piece.Msg
Remove unneeded exposing of Piece.Msg
Elm
mit
oc-elixir-elm/oc-elixir-elm.github.io,oc-elixir-elm/oc-elixir-elm.github.io,oc-elixir-elm/oc-elixir-elm.github.io,oc-elixir-elm/oc-elixir-elm.github.io
1836b6cb75019a3bdef94b82fc8f48f360fab540
src/Data/Attribution.elm
src/Data/Attribution.elm
module Data.Attribution exposing ( Attribution , toHtml ) import Html exposing (Html, li, a, text) import Html.Attributes exposing (href) type alias Attribution = { name : String , author : String , link : String } toHtml : Attribution -> Html msg toHtml attribution = ...
module Data.Attribution exposing ( Attribution , toHtml ) import Html exposing (Html, li, a, text) import Html.Attributes exposing (href, rel) type alias Attribution = { name : String , author : String , link : String } toHtml : Attribution -> Html msg toHtml attribution...
Add nofollow to icon links
Add nofollow to icon links
Elm
mit
phated/metax-deck-builder,phated/metax-deck-builder,phated/metax-deck-builder
7b02e3ab0ad248e11fd2bd45cc3b079be3a86fee
src/Main.elm
src/Main.elm
import Time exposing (Time,second) import Html exposing (Html,text) import Set exposing (Set) import Random -- Model type alias Coordinate = (Int, Int) type alias Model = { alive : Set Coordinate , width : Int , height : Int} init : (Model, Cmd Msg) init = let width = 10 widthCoordinateG...
import Time exposing (Time,second) import Html exposing (Html,text) import Set exposing (Set) import Random -- Model type alias Coordinate = (Int, Int) type alias Model = { alive : Set Coordinate , width : Int , height : Int} init : (Model, Cmd Msg) init = let width = 10 widthCoordinateG...
Change view to a temporary representation
Change view to a temporary representation
Elm
mit
nafarlee/elm-game-of-life
b97c8aef141ecd6f28e66375bbe47b1d1e630b15
src/State.elm
src/State.elm
module State exposing (..) import Types exposing (..) import Spotify init : ( Model, Cmd Msg ) init = ( { query = Nothing , albums = [] } , Cmd.none ) search : String -> Cmd Msg search q = if String.length q >= 3 then Spotify.albumSearch q else Cmd.none update : Ms...
module State exposing (..) import Types exposing (..) import Spotify init : ( Model, Cmd Msg ) init = ( { query = Nothing , albums = [] } , Cmd.none ) search : String -> Cmd Msg search q = if String.length q >= 3 then Spotify.albumSearch q else Cmd.none update : Ms...
Reset results when search is cleared
Reset results when search is cleared
Elm
mit
cloud8421/music-search-buddy,cloud8421/music-search-buddy
6e9e21fcfacfeedff631026623c243dcd0b6e121
src/App/View.elm
src/App/View.elm
module App.View exposing (..) import Html exposing (..) import Html.Attributes exposing (..) import App.Types exposing (..) import App.Input.View as Input import App.Entries.View as Entries import App.Control.View as Control view : Model -> Html Msg view model = div [] [ Input.view model.input ,...
module App.View exposing (..) import Html exposing (..) import Html.Attributes exposing (..) import App.Types exposing (..) import App.Input.View as Input import App.Entries.View as Entries import App.Control.View as Control view : Model -> Html Msg view model = div [] [ title , Input.view model...
Add view functions for header and footer
Add view functions for header and footer
Elm
mit
jackrzhang/lister-elm,jackrzhang/lister-elm
72f3c4ab70c2173bfb972fdcc1e9e8d64fb7a136
tests/Main.elm
tests/Main.elm
{- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/. Copyright 2016 by Ian Mackenzie ian.e.mackenzie@gmail.com -} module Main exposing (..) import ElmTest exposi...
{- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/. Copyright 2016 by Ian Mackenzie ian.e.mackenzie@gmail.com -} module Main exposing (..) import ElmTest exposi...
Add direction tests to main suite
Add direction tests to main suite Also simplify test code slightly
Elm
mpl-2.0
opensolid/geometry
f4d9c99d7ab354bae99e8f22b7dac90c4ab32502
Sublist/SublistExample.elm
Sublist/SublistExample.elm
module SublistExample where import List exposing (..) import String sublist : List a -> List a -> String sublist alist blist = if alist == blist then "Equal" else if alist == [] then "Sublist" else if blist == [] then "Superlist" else if inList alist blist then "Superlist" else if inList...
module SublistExample where import List exposing (..) import String sublist : List a -> List a -> String sublist alist blist = if alist == blist then "Equal" else if inList alist blist then "Superlist" else if inList blist alist then "Sublist" else "Unequal" inList : List a -> List a -> Bool inList alist ...
Remove unnecessary code from Sublist example
Remove unnecessary code from Sublist example
Elm
mit
exercism/xelm
bb0e9661f95ddfe8630c76a96571bfa342233e27
src/Music/Chord.elm
src/Music/Chord.elm
module Music.Chord exposing (..) import Music.Note as Note exposing (Note, Interval) -- TYPES type Chord = Chord Note Quality type Quality = Major | Minor | Sixth | Seventh | MinorSeventh | HalfDiminished qualities : List Quality qualities = [ Major, Minor, Sixth, Seventh, Minor...
module Music.Chord exposing (..) import Music.Note as Note exposing (Note, Interval) -- TYPES type Chord = Chord Note Quality type Quality = Major | Minor | Sixth | Seventh | MinorSeventh | HalfDiminished qualities : List Quality qualities = [ Major, Minor, Sixth, Seventh, Minor...
Change representation of half-diminished chords
Change representation of half-diminished chords
Elm
agpl-3.0
open-chords-charts/chart-editor,open-chords-charts/chart-editor
79ded57bc05ed4f949395f765bed755c5d8fbb9a
elm-tutorial-application/src/Players/Edit.elm
elm-tutorial-application/src/Players/Edit.elm
module Players.Edit exposing (..) import Html exposing (..) import Html.Attributes exposing (class, href, value) import Models exposing (Player) import Msgs exposing (Msg) view : Player -> Html Msg view player = div [] [ nav player , form player ] nav : Player -> Html Msg nav _ = di...
module Players.Edit exposing (..) import Html exposing (..) import Html.Attributes exposing (class, href, value) import Models exposing (Player) import Msgs exposing (Msg) import Routing exposing (playersPath) view : Player -> Html Msg view player = div [] [ nav player , form player ] n...
Embed link for top page
:+1: Embed link for top page
Elm
mit
otofu-square/elm-sandbox,otofu-square/elm-sandbox
db864d3f732d002185a1f7d82d6a2df150bd63e8
app/Caldwell/Constants.elm
app/Caldwell/Constants.elm
module Caldwell.Constants exposing (..) -- Libraries import Css exposing (hex, Color, Rem) -- Source import Caldwell.Types exposing (Page(..)) -- Paddings / Margins gutterSize : Rem gutterSize = Css.rem 1 titleHeight : Rem titleHeight = Css.rem 3 -- Colors white : Color white = hex "#FFFFFF" l...
module Caldwell.Constants exposing (..) -- Libraries import Css exposing (hex, Color, Rem) -- Source import Caldwell.Types exposing (Page(..)) -- Paddings / Margins gutterSize : Rem gutterSize = Css.rem 1 titleHeight : Rem titleHeight = Css.rem 2.7 -- Colors white : Color white = hex "#FFFFFF" ...
Fix header font size so my head doesn't get chopped on mobile.
Fix header font size so my head doesn't get chopped on mobile.
Elm
mit
erlandsona/A-Em,erlandsona/A-Em,erlandsona/A-Em
499e87be3861f0efdb05b1714c85874c3d429e41
Main.elm
Main.elm
module Main exposing (main) import Html exposing (..) main = view initialModel type State = Open | Closed initialModel : { state : State, values : List String } initialModel = { state = Open , values = fruits } fruits : List String fruits = [ "bananas" , "apples" , "oranges"...
module Main exposing (main) import Html exposing (..) main = view initialModel type State = Open | Closed type alias Model = { state : State, values : List String } initialModel : Model initialModel = { state = Open , values = fruits } fruits : List String fruits = [ "bananas"...
Add a `Model` type alias
Add a `Model` type alias Using the record type is awkward so alias it as `Model` so we can use it in signatures easily. Note that this is different than the `State` type which is _not_ an alias but instead is its own thing.
Elm
bsd-3-clause
JoelQ/example-elm-searchable-dropdown
224796ebc427e2c76da9d0a71eafa5dca184b229
frontend/src/Models.elm
frontend/src/Models.elm
module Models (..) where import Meals.Models exposing (Meal) import Routing type alias AppModel = { meals : List Meal , routing : Routing.Model } initialModel : AppModel initialModel = { meals = [ Meal 1 "Sufuruoka" [] ] , routing = Routing.initialModel }
module Models (..) where import Meals.Models exposing (Meal, MealIngredient) import Ingredients.Models exposing (Ingredient) import Routing type alias AppModel = { meals : List Meal , routing : Routing.Model } initialModel : AppModel initialModel = { meals = [ Meal 1 "Sufuruoka" ...
Add some ingredients to initial model
Add some ingredients to initial model So we get the ingredient rows in the view
Elm
apache-2.0
ilkka/mealprep,ilkka/mealprep,ilkka/mealprep
045676ded9977a09234bf04f6c07bab7693ebe8f
src/Views/BreakProgress.elm
src/Views/BreakProgress.elm
module Views.BreakProgress exposing (view) import Break import Element exposing (Device) import Element.Attributes as Attr import Element.Events import Setup.Msg as Msg import Setup.Settings as Settings import Styles exposing (StyleElement) circleView : Styles.CircleFill -> StyleElement circleView circleFill = E...
module Views.BreakProgress exposing (view) import Break import Element exposing (Device) import Element.Attributes as Attr import Element.Events import Setup.Msg as Msg import Setup.Settings as Settings import Styles exposing (StyleElement) circleView : { model | device : Device } -> Styles.CircleFill -> StyleElemen...
Make remaining break interval indicators responsive.
Make remaining break interval indicators responsive.
Elm
mit
dillonkearns/mobster,dillonkearns/mobster,dillonkearns/mobster,dillonkearns/mobster
bb286f9e9f20dd0bf1068d2493e1ca38b580ff59
src/Rails.elm
src/Rails.elm
module Rails (send) where {-| # Http @docs send -} import Http exposing (Value(..)) import Task exposing (Task) import Json.Decode exposing (Decoder) -- Http {-| Utility for working with rails. Wraps Http.send passing an Authenticity Token along with the type of request and a way to decode results. -} send : Str...
module Rails (send) where {-| # Http @docs send -} import Http import Task exposing (Task) import Json.Decode exposing (Decoder) -- Http {-| Utility for working with rails. Wraps Http.send passing an Authenticity Token along with the type of request and a way to decode results. -} send : String -> Decoder value ...
Revert "Translate empty body to null."
Revert "Translate empty body to null." This reverts commit a4852e5acf620ed489514b34f39e9679c9a673a7.
Elm
bsd-3-clause
NoRedInk/elm-rails
94d3cf442eeb97ca045dc2a96eaf144628f012d7
frontend/public/examples/Reactive/DropDown.elm
frontend/public/examples/Reactive/DropDown.elm
import Color (..) import Graphics.Element (..) import Graphics.Input (dropDown) import Signal import Text main : Signal Element main = Signal.map display (Signal.subscribe style) style : Signal.Channel (Text.Text -> Text.Text) style = Signal.channel identity display : (Text.Text -> Text.Text) -> Element displ...
import Color (..) import Graphics.Element (..) import Graphics.Input (dropDown) import Signal import Text main : Signal Element main = Signal.map display (Signal.subscribe style) style : Signal.Channel (Text.Text -> Text.Text) style = Signal.channel identity display : (Text.Text -> Text.Text) -> Element displ...
Update for latest Input.dropDown API
Update for latest Input.dropDown API
Elm
bsd-3-clause
randomer/elm-lang.org,FranklinChen/elm-lang.org,inchingforward/elm-lang.org,coreyhaines/elm-lang.org,coreyhaines/elm-lang.org,elm-guides/elm-lang.org,rtfeldman/elm-lang.org,yang-wei/elm-lang.org,rtorr/elm-lang.org,randomer/elm-lang.org,FranklinChen/elm-lang.org,jazmit/elm-lang.org,eeue56/elm-lang.org,inchingforward/elm...
4190a1f50ab5ede897d7c073cb341540bfdfa238
test/fixtures/BasicWorker.elm
test/fixtures/BasicWorker.elm
port module BasicWorker exposing (..) import Html.App import Html main : Program Never main = Html.App.program { init = ( "", report "it's alive!" ) , view = \_ -> Html.text "" , update = \_ _ -> ( "", Cmd.none ) , subscriptions = (\_ -> Sub.none) } port report : String ...
port module BasicWorker exposing (..) import Html import Platform main : Program Never String msg main = Platform.program { init = ( "", report "it's alive!" ) , update = \_ _ -> ( "", Cmd.none ) , subscriptions = (\_ -> Sub.none) } port report : String -> Cmd a
Replace Html.App.program not available in 0.18 to Platform.program
Replace Html.App.program not available in 0.18 to Platform.program
Elm
bsd-3-clause
rtfeldman/node-elm-compiler
93c52243486f5b87ad4554f8d1add2dc7ba87070
tests/test-files/good/AllSyntax/Declarations.elm
tests/test-files/good/AllSyntax/Declarations.elm
module AllSyntax.Declarations (..) where expressionDefinition _ _ = () expressionDefinitionNoPatterns = () expressionDefinitionsInLet = let def1 = () def2 = () in () expressionTypeAnnotation : () expressionTypeAnnotation = ()
module AllSyntax.Declarations (..) where type DataType = Ctor1 | Ctor2 () | Ctor3 (List ()) () type DataTypeWithParams a b c = Ctor1' | Ctor2' a | Ctor3' b c type alias TypeAlias = { x : Int, y : Int } expressionDefinition _ _ = () expressionDefinitionNoPatterns = () expressionDefinitionsI...
Add tests for type declarations
Add tests for type declarations
Elm
bsd-3-clause
fredcy/elm-format,avh4/elm-format,nukisman/elm-format-short,fredcy/elm-format,nukisman/elm-format-short,avh4/elm-format,nukisman/elm-format-short,avh4/elm-format,fredcy/elm-format,nukisman/elm-format-short,nukisman/elm-format-short,avh4/elm-format
297f0d095228f6f382078e9b3f896f23efac54db
src/Game/Account/Requests.elm
src/Game/Account/Requests.elm
module Game.Account.Requests exposing (Response(..), receive) import Game.Account.Requests.ServerIndex as ServerIndex import Game.Account.Messages exposing (..) type Response = ServerIndexResponse ServerIndex.Response receive : RequestMsg -> Response receive response = case response of ServerIndexR...
module Game.Account.Requests exposing (Response(..), receive) import Game.Account.Requests.ServerIndex as ServerIndex import Game.Account.Messages exposing (..) type Response = ServerIndexResponse ServerIndex.Response | NoOpResponse receive : RequestMsg -> Response receive response = case response of ...
Fix random crash at logout (server randomly replies logout topic).
Fix random crash at logout (server randomly replies logout topic).
Elm
agpl-3.0
HackerExperience/HEBorn,HackerExperience/HEBorn,HackerExperience/HEBorn
859ba6491f8d68340fd508b891cd7a575ce95f31
public/examples/Functional/QuickSort.elm
public/examples/Functional/QuickSort.elm
import JavaScript as JS main = asText (quicksort [5,3,8,1,9,4,7]) quicksort list = case list of [] -> [] pivot::rest -> let lower = filter (\n -> n <= pivot) rest higher = filter (\n -> n > pivot) rest in quicksort lower ++ [pivot] ++ quicksort higher {---------------------...
main = asText (quicksort [5,3,8,1,9,4,7]) quicksort list = case list of [] -> [] pivot::rest -> let lower = filter (\n -> n <= pivot) rest higher = filter (\n -> n > pivot) rest in quicksort lower ++ [pivot] ++ quicksort higher {--------------------- QuickSort works as foll...
Make quicksort explanation more concise
Make quicksort explanation more concise
Elm
bsd-3-clause
kevinrood/elm-lang.org,akeeton/elm-lang.org,eeue56/elm-lang.org,liubko/elm-lang.org,thSoft/elm-lang.org,elm-lang/debug.elm-lang.org,yang-wei/elm-lang.org,kevinrood/elm-lang.org,madsflensted/elm-lang.org,elm-guides/elm-lang.org,jazmit/elm-lang.org,elm-lang/debug.elm-lang.org,rtfeldman/elm-lang.org,ThomasWeiser/elm-lang....
4a77d037d02aba3ac7c2fef37f94cdec65c1f9be
src/elm-scripts/LoginForm.elm
src/elm-scripts/LoginForm.elm
module LoginForm exposing (..) import Html exposing (..) import Html.App as Html import Html.Attributes exposing (..) import Html.Events exposing (onInput) main : Program Never main = Html.beginnerProgram { model = model, view = view, update = update } -- MODEL type alias Model = { name : String , p...
module LoginForm exposing (..) import Html exposing (..) import Html.App as Html import Html.Attributes exposing (..) import Html.Events exposing (onInput) main : Program Never main = Html.beginnerProgram { model = model, view = view, update = update } -- MODEL type alias Model = { name : String , p...
Move model validation into its own function
Move model validation into its own function
Elm
mit
Crevax/elm-guide-follow-along
7867ee62e22d868a02bd1f59ecacff12ae86249b
test/fixtures/BasicWorker.elm
test/fixtures/BasicWorker.elm
port module BasicWorker exposing (..) import Html import Platform main : Program Never String msg main = Platform.program { init = ( "", report "it's alive!" ) , update = \_ _ -> ( "", Cmd.none ) , subscriptions = (\_ -> Sub.none) } port report : String -> Cmd a
port module BasicWorker exposing (..) import Platform main : Program () String msg main = Platform.worker { init = \_ -> ( "", reportFromWorker "it's alive!" ) , update = \_ _ -> ( "", Cmd.none ) , subscriptions = \_ -> Sub.none } port reportFromWorker : String -> Cmd a
Rename report port to reportFromWorker
Rename report port to reportFromWorker
Elm
bsd-3-clause
rtfeldman/node-elm-compiler
26bcdd201a95eeac20a2751a3890dd85b720eb4e
libraries/Char.elm
libraries/Char.elm
module Char where import Native.Char as N -- Selects upper case letters. isUpper : Char -> Bool -- Selects lower case letters. isLower : Char -> Bool -- Selects ASCII digits (0..9). isDigit : Char -> Bool -- Selects ASCII octal digits (0..7). isOctDigit : Char -> Bool -- Selects ASCII hexadecimal digits (0..9a.....
module Char where import Native.Char as N -- Selects upper case letters. isUpper : Char -> Bool -- Selects lower case letters. isLower : Char -> Bool -- Selects ASCII digits (0..9). isDigit : Char -> Bool -- Selects ASCII octal digits (0..7). isOctDigit : Char -> Bool -- Selects ASCII hexadecimal digits (0..9a.....
Change type of toCode and fromCode
Change type of toCode and fromCode
Elm
bsd-3-clause
JoeyEremondi/elm-pattern-effects,deadfoxygrandpa/Elm,5outh/Elm,pairyo/elm-compiler,laszlopandy/elm-compiler,mgold/Elm,Axure/elm-compiler
3831976c72d851f8813c5dd191964ac8bcd15a17
binarySearch/elm/BinarySearch.elm
binarySearch/elm/BinarySearch.elm
module BinarySearch exposing (..) -- There is an issue searching a list bigger than ~10000 -- because not tail recursive -- RangeError: Maximum call stack size exceeded findNumber : List Int -> Int -> Bool findNumber numbers numberToFind = let sortedList = List.sort numbers middleIndex = List.length sortedLi...
module BinarySearch exposing (..) -- There is an issue searching a list bigger than ~10000 -- because not tail recursive -- RangeError: Maximum call stack size exceeded findNumber : List Int -> Int -> Bool findNumber numbers numberToFind = case numbers of [] -> False [number] -> number == numberT...
Fix implementation for 1 element lists
Fix implementation for 1 element lists
Elm
mit
mikegehard/grokkingAlgorithms
839220af5fd1363689c58e5bd9ad4815773aed97
client/src/App.elm
client/src/App.elm
import Html exposing (div, button, text) import Game import Time import Random main : Program Never Model Msg main = Html.program { init = init, view = view, update = update, subscriptions = subscriptions } type Msg = Game Game.Msg | TimeUpdate Time.Time type alias Model = { timeMilli : Int, game : ...
import Html exposing (div, button, text) import Game import Time import Random main : Program Never Model Msg main = Html.program { init = init, view = view, update = update, subscriptions = subscriptions } type Msg = Game Game.Msg | TimeUpdate Time.Time type alias Model = { timeMilli : Int, game : ...
Improve visuals: Increase framerate to 50Hz.
Improve visuals: Increase framerate to 50Hz.
Elm
mit
Viir/Baustelle
5e9c9933d450c740b3deeb08b216ad0f6b442653
libraries/WebSocket.elm
libraries/WebSocket.elm
-- A library for low latency HTTP communication. See the HTTP library for -- standard requests like GET, POST, etc. module WebSocket where import Signal (Signal) import Basics (String) import Native.WebSocket -- Create a web-socket. The first argument is the URL of the desired -- web-socket server. The input signal h...
module WebSocket where {-| A library for low latency HTTP communication. See the HTTP library for standard requests like GET, POST, etc. -} import Signal (Signal) import Basics (String) import Native.WebSocket {-| Create a web-socket. The first argument is the URL of the desired web-socket server. The input signal ho...
Update to new doc format
Update to new doc format
Elm
bsd-3-clause
5outh/Elm,JoeyEremondi/elm-pattern-effects,pairyo/elm-compiler,Axure/elm-compiler,deadfoxygrandpa/Elm,mgold/Elm,laszlopandy/elm-compiler
c41c31528fb6a2502fd01cf1749efadaa48cc88c
src/NativeUi/Alert.elm
src/NativeUi/Alert.elm
module NativeUi.Alert exposing (Error, alert) {-| @docs Error, alert -} import Native.NativeUi.Alert import Task exposing (Task) {-| -} type Error = Error String type alias AlertButton = { text : String , value : Bool } {-| -} alert : String -> String -> List AlertButton -> Task Error Bool alert...
module NativeUi.Alert exposing (alert) {-| @docs alert -} import Native.NativeUi.Alert import Task exposing (Task) type alias AlertButton = { text : String , value : Bool } {-| -} alert : String -> String -> List AlertButton -> Task String Bool alert = Native.NativeUi.Alert.alert
Use String instead of custom type for alert error
Use String instead of custom type for alert error
Elm
bsd-3-clause
elm-native-ui/elm-native-ui,ohanhi/elm-native-ui
9bb4c3919d4d3c8c02e4db1aae925c22ebe85946
Main.elm
Main.elm
import Html exposing (div, button, text) import Html.Events exposing (onClick) import StartApp.Simple as StartApp main = StartApp.start { model = model, view = view, update = update } model = 0 view address model = div [] [ button [ onClick address Decrement ] [ text "-" ] , div [] [ tex...
import Html exposing (div, button, text) import Html.Events exposing (onClick) import StartApp.Simple as StartApp main = StartApp.start { model = model, view = view, update = update } partialAllCardsJson = """{"Air Elemental":{"layout":"normal","name":"Air Elemental","manaCost":"{3}{U}{U}","cmc":5,"colors":["Bl...
Bring in some partial AllCards.json
Bring in some partial AllCards.json
Elm
bsd-3-clause
akeeton/mtg-toolkit-elm,akeeton/mtg-toolkit-elm
ad1e546faadbbb260de5d19d8529e5849c1aac44
tests/fixtures/tests/Passing/Unexposed.elm
tests/fixtures/tests/Passing/Unexposed.elm
module Passing.Unexposed exposing (all) import Expect import Test exposing (..) all : Test all = describe "all" [ test "Expect.equal works" <| \() -> "success" |> Expect.equal "success" , testTrue ] testTrue : Test testTrue = test "Exp...
module Passing.Unexposed exposing (all) {- Ideally we would detect unexposed tests and warn users about them. In elm 0.18.0 we did this, but internal compiler changes mean we no longer can. This test passes if unexposed tests are ignored to keep the behavior consistent. Ideas about how we can detect unexposed tests (...
Add more detail to the test
Add more detail to the test Co-authored-by: Harry Sarson <2a31db68ff6018f85d870211853cce7b60d8171c@hotmail.co.uk>
Elm
bsd-3-clause
rtfeldman/node-elm-test,rtfeldman/node-elm-test,rtfeldman/node-test-runner
30b1e5406e2959176d67e25993853b68eab061da
frontend/Component/TopBar.elm
frontend/Component/TopBar.elm
module Component.TopBar where import Color import ColorScheme as C import Graphics.Element (..) import Signal type SearchScope = Package String | Global type Status = Normal | Hover | Focus type alias Model = { searchScope : SearchScope , query : String , status : Status } t...
module Component.TopBar where import Color import ColorScheme as C import Graphics.Element (..) import Signal import Text type SearchScope = Package String | Global type Status = Normal | Hover | Focus type alias Model = { searchScope : SearchScope , query : String , status : Stat...
Remove search bar for now
Remove search bar for now
Elm
bsd-3-clause
mgold/package.elm-lang.org,Dedoig/package.elm-lang.org,itsgreggreg/package.elm-lang.org,jvoigtlaender/package.elm-lang.org
f654889e91649d135997681f7f539a8d192bd99e
web/elm/Views/Loading.elm
web/elm/Views/Loading.elm
module Views.Loading exposing (..) import Components.QuoteBubble exposing (quoteBubble) import Html exposing (..) import Html.Attributes exposing (..) import Model exposing (..) loading : Html Msg loading = div [ class "relative z-9999 top--1" ] [ div [ class "mw5 center" ] [ quoteBubble "Just a Moment" ...
module Views.Loading exposing (..) import Components.LogoFooter exposing (logoFooter) import Components.QuoteBubble exposing (quoteBubble) import Html exposing (..) import Html.Attributes exposing (..) import Model exposing (..) loading : Html Msg loading = div [ class "relative z-9999 top--1" ] [ div [ ...
Update copy and add PUK logo to loading screen.
Update copy and add PUK logo to loading screen.
Elm
mit
ParkisonsUK-fuse/what3things,ParkisonsUK-fuse/what3things
900deec591564e2223d48d3cd607f54c776d367d
src/Views.elm
src/Views.elm
module Views exposing (formField, epButton) import Html exposing (..) import Html.Attributes exposing (..) import Html.Events exposing (onInput) formField : String -> (String -> msg) -> String -> String -> String -> String -> Html msg formField inputValue msg inputId labelText inputType descText = -- TODO: That ...
module Views exposing (formField, epButton) import Html exposing (..) import Html.Attributes exposing (..) import Html.Events exposing (onInput) formField : String -> (String -> msg) -> String -> String -> String -> String -> Html msg formField inputValue msg inputId labelText inputType descText = -- TODO: That ...
Fix bug in label display
Fix bug in label display
Elm
mit
fpapado/ephemeral,fpapado/ephemeral,fpapado/ephemeral,fpapado/ephemeral
0931007d6b3f64de3f8dd7e2bff1ff73d28c2294
src/Foreign/Marshall.elm
src/Foreign/Marshall.elm
module Foreign.Marshall where import Foreign.Types exposing (JSRaw) import Native.Foreign unsafeNull : a unsafeNull = Native.Foreign.unsafeNull unsafeRequire : String -> a unsafeRequire = Native.Foreign.unsafeRequire unsafeGetGlobalConstant : String -> a unsafeGetGlobalConstant = Native.Foreign.unsafeGetGlobalConst...
module Foreign.Marshall where import Json.Decode as Json import Foreign.Types exposing (JSRaw) import Native.Foreign unsafeNull : a unsafeNull = Native.Foreign.unsafeNull unsafeRequire : String -> a unsafeRequire = Native.Foreign.unsafeRequire unsafeGetGlobalConstant : String -> a unsafeGetGlobalConstant = Native.F...
Use Json.Value over anything else
Use Json.Value over anything else
Elm
mit
Fresheyeball/elm-node
eae5300f9523006ef271cc7ee38212a8e6936511
src/Game/Servers/Settings/Types.elm
src/Game/Servers/Settings/Types.elm
module Game.Servers.Settings.Types exposing (..) import Json.Encode as Encode import Json.Decode as Decode exposing (Decoder, Value) import Utils.Ports.Map exposing (Coordinates) type Settings = Location Coordinates | Name String encode : Settings -> Value encode config = case config of Locatio...
module Game.Servers.Settings.Types exposing ( Settings(..) , encode , decodeLocation , decodeError ) import Json.Encode as Encode import Json.Decode as Decode exposing (Decoder, Value) import Utils.Ports.Map exposing (Coordinates) type Settings = Location Coordinates ...
Update Settings payload to include config key.
Update Settings payload to include config key.
Elm
agpl-3.0
HackerExperience/HEBorn,HackerExperience/HEBorn,HackerExperience/HEBorn
6ffefd804561f96e067c7ad0b9ccb0d7678264d4
ElmTest/Runner/Element.elm
ElmTest/Runner/Element.elm
module ElmTest.Runner.Element (runDisplay) where {-| Run a test suite and display it as an Element # Run @docs runDisplay -} import ElmTest.Run as Run import ElmTest.Test (..) import ElmTest.Runner.String as String -- Given a result, render it in plainText and return a pass/fail color pretty : (String, Run.Result)...
module ElmTest.Runner.Element (runDisplay) where {-| Run a test suite and display it as an Element # Run @docs runDisplay -} import String import ElmTest.Run as Run import ElmTest.Test (..) import ElmTest.Runner.String as String -- Given a result, render it in plainText and return a pass/fail color pretty : (Stri...
Clean up visual style of element runner
Clean up visual style of element runner
Elm
bsd-3-clause
robertjlooby/elm-test,elm-community/elm-test
1795485eb127a0c8158b2ec72c65dfd6ae0ecf2d
doc/HelloWorld.elm
doc/HelloWorld.elm
module HelloWorld exposing (..) import Html import OpenSolid.Core.Types exposing (..) import OpenSolid.Core.Vector2d as Vector2d main = Html.text (toString (Vector2d.length (Vector2d ( 2, 3 ))))
module HelloWorld exposing (..) import Html exposing (Html) import Svg exposing (Svg) import OpenSolid.Core.Types exposing (..) import OpenSolid.Core.Point2d as Point2d import OpenSolid.BoundingBox.Types exposing (..) import OpenSolid.Svg as Svg import Svg.Attributes as Attributes angles = [0..24] |> List.map (\...
Update doc test image to use OpenSolid.Svg module
Update doc test image to use OpenSolid.Svg module
Elm
mpl-2.0
opensolid/geometry
d982eeecf3749d59fd574b7913ec884ec9b8b974
src/setup/Main.elm
src/setup/Main.elm
port module Setup.Main exposing (..) import Html exposing (..) import Html.Attributes exposing (class) import Html.Events exposing (onClick) type Msg = StartTimer type alias Model = Int type alias TimerConfiguration = { minutes : Int, driver : String, navigator : String } flags : TimerConfiguration...
port module Setup.Main exposing (..) import Html exposing (..) import Html.Attributes exposing (class, value, type_) import Html.Events exposing (onClick, onInput) type Msg = StartTimer | ChangeTimerDuration String type alias Model = Int type alias TimerConfiguration = { minutes : Int, driver : S...
Add field for changing timer length
Add field for changing timer length
Elm
mit
dillonkearns/mobster,dillonkearns/mobster,dillonkearns/mobster,dillonkearns/mobster
9977929158de3246db8b44de658f2cbc1fe9828c
src/Util.elm
src/Util.elm
module Util exposing (..) import Date exposing (Date) import Date.Extra import Date.Distance import Date.Distance.I18n.En dateDistance : Date -> Date -> String dateDistance = let locale = Date.Distance.I18n.En.locale { addSuffix = True } defaultConfig = Date.Distance.defa...
module Util exposing (..) import Date exposing (Date) import Date.Extra import Date.Distance import Date.Distance.I18n.En dateDistance : Date -> Date -> String dateDistance = let locale = Date.Distance.I18n.En.locale { addSuffix = True } defaultConfig = Date.Distance.defa...
Fix day number in date strings
Fix day number in date strings
Elm
mit
dalen/elm-puppetexplorer,dalen/elm-puppetexplorer
333640a8f23a7deb59450f5470446778cd76d937
src/View/SearchableDropdown.elm
src/View/SearchableDropdown.elm
module View.SearchableDropdown exposing (State, Config, init, view) import Html exposing (Html, text, div, input, table, tbody, tr, td) import Html.Attributes exposing (class, style, type_, value, placeholder, autofocus) import Html.Events exposing (onInput, onClick) type alias State = { value : String , res...
module View.SearchableDropdown exposing (State, Config, init, view) import Html exposing (Html, text, div, input, table, tbody, tr, td) import Html.Attributes exposing (class, style, type_, value, placeholder, autofocus) import Html.Events exposing (onInput, onClick) type alias State = { value : String , res...
Hide results when empty search term
Hide results when empty search term
Elm
mit
hurwitzlab/elm-imicrobe-spa,hurwitzlab/elm-imicrobe-spa
bce5df26e5646f14577cd60472fab03101346a74
tests/Triangle2d.elm
tests/Triangle2d.elm
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- This Source Code Form is subject to the terms of the Mozilla Public -- -- License, v. 2.0. If a copy of the MPL was not distributed with this file, ...
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- This Source Code Form is subject to the terms of the Mozilla Public -- -- License, v. 2.0. If a copy of the MPL was not distributed with this file, ...
Tweak triangle test to avoid spurious failure
Tweak triangle test to avoid spurious failure Degenerate (zero area) triangle may not contain its own centroid (the centroid should lie on the triangle, but there might be slight numerical roundoff)
Elm
mpl-2.0
opensolid/geometry
c8c9913983e11ba207a4acb1c386249e59b63f01
libraries/Lazy.elm
libraries/Lazy.elm
module Lazy ( force, lazy, map, apply, bind ) where {-| Library for efficient Lazy evaluation. # Delay @docs lazy # Evaluate @docs force # Transform @docs map, apply, bind -} import Basics ((<|), (.)) import Native.Lazy data Lazy a = L { force : () -> a } {-| Memoize a thunk so it is evaluated at mos...
module Lazy ( force, lazy, map, apply, bind ) where {-| Library for efficient Lazy evaluation. # Delay @docs lazy # Evaluate @docs force # Transform @docs map, apply, bind -} import Basics ((<|), (.)) import Native.Lazy data Lazy a = L { force : () -> a } {-| Delay a computation. This function memoiz...
Add more info to comments
Add more info to comments
Elm
bsd-3-clause
5outh/Elm,JoeyEremondi/elm-pattern-effects,laszlopandy/elm-compiler,Axure/elm-compiler,mgold/Elm,pairyo/elm-compiler,deadfoxygrandpa/Elm
d9cd27a8ca4d668450b8ada165e01f39555b125d
public/docs/Signal/Touch.elm
public/docs/Signal/Touch.elm
import Website.Docs (createDocs2) touches = [ ("touches", "Signal [{ x :: Int, y :: Int, id :: Int,\n x0 :: Int, y0 :: Int, t0 :: Time }]", [markdown| A list of touches. Each ongoing touch is represented by a set of `x` and `y` coordinates and an identifier `id` that allows you to distinguish ...
import Website.Docs (createDocs2) touches = [ ("touches", "Signal [{ x :: Int, y :: Int, id :: Int,\n x0 :: Int, y0 :: Int, t0 :: Time }]", [markdown| A list of touches. Each ongoing touch is represented by a set of `x` and `y` coordinates and an identifier `id` that allows you to distinguish ...
Fix error in type of `taps`
Fix error in type of `taps`
Elm
bsd-3-clause
rtfeldman/elm-lang.org,akeeton/elm-lang.org,FranklinChen/elm-lang.org,liubko/elm-lang.org,rtfeldman/elm-lang.org,akeeton/elm-lang.org,frankschmitt/elm-lang.org,kevinrood/elm-lang.org,randomer/elm-lang.org,frankschmitt/elm-lang.org,jvoigtlaender/elm-lang.org,eeue56/elm-lang.org,amitaibu/elm-lang.org,coreyhaines/elm-lang...
0c62c9b2663ed4143f2f46d985f9bb11e8f0ac6c
public/Try.elm
public/Try.elm
import Website.ColorScheme accents = [accent0,accent1,accent2,accent3,accent4] topBar k n = let n' = toFloat n k' = toFloat k segs = map (\i -> round (n' * toFloat i / k')) [1..k] ws = zipWith (-) segs (0::segs) accentCycle = concatMap (\_ -> accents) [ 0 .. k `div` 5 ] in fl...
import Website.ColorScheme import Window as Window accents = [accent0,accent1,accent2,accent3,accent4] topBar k n = let n' = toFloat n k' = toFloat k segs = map (\i -> round (n' * toFloat i / k')) [1..k] ws = zipWith (-) segs (0::segs) accentCycle = concatMap (\_ -> accents) [ 0 ....
Fix the "try elm" message
Fix the "try elm" message
Elm
bsd-3-clause
yang-wei/elm-lang.org,madsflensted/elm-lang.org,amitaibu/elm-lang.org,liubko/elm-lang.org,kevinrood/elm-lang.org,kevinrood/elm-lang.org,jazmit/elm-lang.org,coreyhaines/elm-lang.org,amitaibu/elm-lang.org,thSoft/elm-lang.org,coreyhaines/elm-lang.org,FranklinChen/elm-lang.org,randomer/elm-lang.org,jvoigtlaender/elm-lang.o...