This file contains hidden or 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
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 |
This file contains hidden or 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 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 |
This file contains hidden or 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
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 |