Skip to content

Instantly share code, notes, and snippets.

Interactive Elixir (1.3.2) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> 02 Dec 10:34:51 - info: compiling
Elm compile: Main.elm, in web/elm, to ../static/js/elm.js
[BABEL] Note: The code generator has deoptimised the styling of "web/static/js/elm.js" as it exceeds the max of "100KB".
02 Dec 10:36:30 - info: compiling.
[info] GET /about-us
[debug] Processing by MyApp.PageController.index/2
Parameters: %{}
Pipelines: [:browser]
[info] Sent 200 in 357ms
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module OurUsers where
import Control.Monad.Logger (runNoLoggingT)
import qualified Data.Text as T
import GHC.Generics
@twopoint718
twopoint718 / Reader.lhs
Last active April 21, 2024 11:15
An article about the Reader type (functor, applicative, and monad instances)
Okay, so I'll try and walk through the reader monad as best as I can. And
because I think it helps to de-mystify things a bit, I'll also go through
all of the "super classes" of monad: functor and applicative (because every
monad should also be an applicative and every applicative functor should be
a functor). This file is literate Haskell so you should just be able to
load it in the REPL or run it. It's also kinda/sorta markdown, so it should
render that way as well (but the code is formatted wrong).
> module Reader where