- Install Haskell Platform
 
- Install Visual Studo Code
 - Install VS Code Plugin Haskell Syntax Highlighting
 
| module Main exposing (main) | |
| import Bootstrap.CDN as CDN | |
| import Bootstrap.Card as Card | |
| import Bootstrap.Card.Block as Block | |
| import Bootstrap.Form as Form | |
| import Bootstrap.Form.Input as Input | |
| import Bootstrap.Grid as Grid | |
| import Bootstrap.Utilities.Spacing as Spacing | |
| import Browser | 
| import WebMidi from 'webmidi' | |
| var btn1 = document.createElement('BUTTON') | |
| btn1.innerHTML = 'send to all channels' | |
| btn1.onclick = function () { play(song, 'all') } | |
| document.body.appendChild(btn1) | |
| var btn2 = document.createElement('BUTTON') | |
| btn2.innerHTML = 'only one channel' | |
| btn2.onclick = function () { play(song, 1) } | 
| object SameGame { | |
| final case class Position(col: Int, row: Int) | |
| sealed trait Color | |
| case object Green extends Color | |
| case object Blue extends Color | |
| case object Red extends Color | |
| case object Brown extends Color | |
| case object Gray extends Color | 
| module MusicTheory.Music exposing | |
| ( Control(..) | |
| , Division(..) | |
| , Duration(..) | |
| , Music(..) | |
| , Primitive(..) | |
| , PrimitiveGroup(..) | |
| , TiedOrSeparate(..) | |
| , dotted | |
| , eighth | 
| import $ivy.`com.github.battermann::pureapp:0.6.0` | |
| import com.github.battermann.pureapp._ | |
| import com.github.battermann.pureapp.interpreters.Terminal._ | |
| import cats.effect.IO | |
| import cats.implicits._ | |
| import scala.util.Try | |
| object Main extends StandardPureApp[IO] { | 
| port module Ports exposing (Header, Part, FileUploadRequest, uploadProgress, uploadFile) | |
| import Json.Decode exposing (Value) | |
| port uploadFile : { elementId : ElementId, request : FileUploadRequest } -> Cmd msg | |
| port uploadProgress : (Value -> msg) -> Sub msg | 
| module Types.Interval exposing (IntervalSize(..), IntervalQuality(..), Interval, addIntervalSizeToLetter, noteLetterDistance, addIntervalToNote, perfectUnison, minorSecond, majorSecond, minorThird, majorThird, perfectFourth, augmentedFourth, diminishedFifth, perfectFifth, minorSixth, majorSixth, minorSeventh, majorSeventh) | |
| import Types.Note exposing (..) | |
| import List.Extra | |
| type IntervalSize | |
| = Unison | |
| | Second | |
| | Third | 
| javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint", "-g:none") | |
| resolvers += Resolver.sonatypeRepo("releases") | |
| val http4sVersion = "0.18.0" | |
| val circeVersion = "0.9.1" | |
| val catsEffectVersion = "0.9" | |
| libraryDependencies ++= Seq( | |
| "org.http4s" %% "http4s-dsl" % http4sVersion exclude ("org.typelevel", "cats-effect_2.12"), | 
| // Note: pure != good, this is just a demo for the sake of purity. There are no claims that this is a particularly good design. | |
| import PRNG.Seed | |
| import cats.data.{State, StateT} | |
| import cats.effect._ | |
| import scala.util.Try | |
| object DiceGame extends App { | |
| type StateIO[A] = StateT[IO, Seed, A] |