- Install GHCup, this will manage all of your Haskell development tools. Follow the onscreen instructions. When it asks you if you'd like to install Haskell language server, say yes.
- Install the Haskell extension for VSCode. This is the front end for the Haskell Language Server (hls). If you'd like to use hls with another editor of your choice (any editor with lsp support), see this section of the hls documentation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE GADTs #-} | |
module Shoe where | |
data ShoeState = Off | Untied | On | |
data Shoes l r where | |
PutOnL :: Shoes Off r -> Shoes Untied r | |
PutOnR :: Shoes l Off -> Shoes l Untied | |
TieL :: Shoes Untied r -> Shoes On r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE PatternSynonyms #-} | |
module Phantom where | |
import Data.List | |
newtype Part (bool :: Bool) a = Part { unPart :: [a] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main (main) where | |
import Codec.Picture | |
import Data.Bifunctor | |
import Data.Foldable | |
import Data.List | |
import Text.Printf | |
main :: IO () | |
main = gif $ frameList (-20) 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Haskell Discourse Dark Mode Logo | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Better dark mode logo for Haskell Discourse instance. | |
// @author Morrow | |
// @match https://discourse.haskell.org/* | |
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE QuasiQuotes #-} | |
import Data.Foldable | |
import Data.List | |
import PyF | |
f = ([1, 2, 2, 3, 3, 4] !!) . pred | |
g = ([1, 3, 4, 5, 6, 8] !!) . pred |