I hereby claim:
- I am ddellacosta on github.
- I am ddellacosta (https://keybase.io/ddellacosta) on keybase.
- I have a public key whose fingerprint is 5146 F427 F414 62E7 CB2D 6A5A BAAA 370C 86C3 6DB6
To claim this, I am signing this object:
{-# LANGUAGE LambdaCase #-} | |
module Day18_2 where | |
import Data.Text as T | |
import Data.Void | |
import System.IO | |
import Text.Megaparsec | |
import Text.Megaparsec.Char | |
import qualified Text.Megaparsec.Char.Lexer as L |
{-# LANGUAGE DeriveGeneric #-} | |
module Foo where | |
import qualified GHC.Generics as G |
module Fail where | |
import Data.UUID (UUID) | |
import Simple.JSON as JSON | |
The question was asked why I (as a programmer who prefers dynamic languages) don't consider static types "worth it". Here | |
is a short list of what I would need from a type system for it to be truely useful to me: | |
1) Full type inference. I would really prefer to be able to write: | |
(defn concat-names [person] | |
(assoc person :full-name (str (:first-name person) | |
(:second-name person)))) | |
And have the compiler know that whatever type required and produced from this function was acceptible as long as the |
data Find a = NotFound a | Found a | |
deriving (Eq, Show) | |
instance (Semigroup a) => Semigroup (Find a) where | |
NotFound a <> NotFound b = NotFound (a <> b) | |
NotFound a <> Found b = Found (a <> b) | |
Found a <> NotFound b = Found (a <> b) | |
Found a <> Found b = Found (a <> b) | |
data A = A { _af :: B, _bs :: [Int] } deriving Show | |
data B = B { _bf :: Int, _bs1 :: Char } deriving Show | |
makeLenses ''A | |
makeLenses ''B | |
a = A (B 1 'a') [] | |
-- λ> (over bf (+1) . view af) a |
New-Object : A parameter cannot be found that matches parameter name 'COMObject'. | |
At /Users/ddellacosta/my-script.ps1:202 char:28 | |
+ $shellApp = New-Object -COMObject "Shell.Application" | |
+ ~~~~~~~~~~ | |
+ CategoryInfo : InvalidArgument: (:) [New-Object], ParameterBindingException | |
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.NewObjectCommand |
var ReactDates = | |
/******/ (function(modules) { // webpackBootstrap | |
/******/ // The module cache | |
/******/ var installedModules = {}; | |
/******/ // The require function | |
/******/ function __webpack_require__(moduleId) { | |
/******/ // Check if module is in cache | |
/******/ if(installedModules[moduleId]) |
I hereby claim:
To claim this, I am signing this object:
-- For context, see | |
-- https://github.com/kqr/gists/blob/master/articles/gentle-introduction-monad-transformers.md#introducing-side-effects | |
userLogin :: EitherIO LoginError Text | |
userLogin = do | |
token <- getToken | |
case token of | |
Right domain -> liftIO domain | |
left -> liftEither left |