{-# Language PatternSynonyms #-}
{-# Language ViewPatterns #-}
data DMonad m = DMonad
(forall a. a -> m a)
(forall a b. m a -> (a -> m b) -> m b)
(forall a. String -> m a)
pattern Open :: (forall a. a -> [a]) -> (forall a a'. [a] -> (a -> [a']) -> [a']) -> (forall a. String -> [a]) -> xxx
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
(* Functors and modular implicits | |
* opam switch 4.02.0+modular-implicits | |
* eval `opam config env` | |
*) | |
module type FUNCTOR = sig | |
type 'a t | |
val map : ('a -> 'b) -> 'a t -> 'b t | |
end | |
let map {F : FUNCTOR} = F.map |
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 TemplateHaskell #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE DeriveFunctor #-} | |
{-# LANGUAGE DeriveFoldable #-} | |
{-# LANGUAGE DeriveTraversable #-} | |
{-# LANGUAGE StandaloneDeriving #-} | |
module Demo where |
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
-- buildPatSynDetails, so this is a mempty, even the type | |
-- we generate the same location here. | |
hsConDeclDetails _ = pprPanic "tcLHsBindsCtOrigin" (ppr val_val_binds) | |
-------------------- | |
zonkForeignCall :: FlexibleInfo -> CoreBind | |
-> Maybe FreeVars -- True <=> supplied EndBinds | |
-> RecFlag | |
-> Cts -> ForeignOpt Id |
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
{ pkgs }: | |
{ | |
services.windowManager.xmonad = { | |
enable = true; | |
haskellPackages = pkgs.haskellPackages.override { | |
overrides = self: super: { | |
# /path/to/mrkgnaow-xmonad is a path that contains `mrkgnaow-xmonad.cabal` | |
# you can also put an invocation of `fetchgit` or `fetchFromGitHub` there. | |
mrkgnaow-xmonad = self.callCabal2nix "mrkgnaow-xmonad" /path/to/mrkgnaow-xmonad {}; |
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
:set prompt "> " | |
:set -isrc | |
:load Main |
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
{-# OPTIONS_GHC -Wall #-} | |
{-# LANGUAGE DeriveAnyClass #-} | |
{-# LANGUAGE DeriveDataTypeable #-} | |
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE PartialTypeSignatures #-} | |
module RegAlloc1 | |
( -- * Types | |
Var |
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
Copyright 2017 Austin Seipp | |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | |
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | |
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | |
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. |
title | author |
---|---|
Indexed Profunctor optics |
Oleg Grenrus |
This post is a response to the Edward's tweet:
Now try to fit all of the indexed and index-preserving variants. ;) Edward Kmett
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
;; I have no idea why it works. This is the product of 4 hours of trial-and-error. | |
(defun dotspacemacs/user-init () | |
"Initialization function for user code. | |
It is called immediately after `dotspacemacs/init'. You are free to put almost | |
any user code here. The exception is org related code, which should be placed | |
in `dotspacemacs/user-config'." | |
(server-start) | |
(require 'org-protocol) | |
) |