Skip to content

Instantly share code, notes, and snippets.

View useronym's full-sized avatar

Adam Krupicka useronym

  • Breach VR
  • Trondheim, NO
View GitHub Profile
case (f, g, h) of
(Just a, _, _) -> doActionA a
(_, Just b, _) -> doActionB b
(_, _, Just c) -> doActionC c
Nothing -> error ""
@useronym
useronym / gist:6d44ad512738ccbf522f727547b6d435
Created April 16, 2019 13:11
TH parallel compilation error sample
/home/osense/eai/confy/server/src/Confy/Controllers/Messages.hs:564:17: error:
• Found hole:
_controller_entry_conferences_fast_list :: Controller OutType
Or perhaps ‘_controller_entry_conferences_fast_list’ is mis-spelled, or not in scope
• In the expression: _controller_entry_conferences_fast_list
In the expression:
("entry.conferences-fast-list",
_controller_entry_conferences_fast_list)
In the expression:
([("invite.send-message", _controller_invite_send_message),
module EvenOdd where
open import Relation.Binary.PropositionalEquality
open import Data.Nat
open import Data.Nat.Solver
open import Data.Product
open +-*-Solver
module Main where
import Control.Exception
import GHC.Stack
main :: IO ()
main = do
catch letMeCall handler
_ <- getLine
return ()
@useronym
useronym / dsl.hs
Last active March 29, 2019 14:59
Proposal for a Haskell EDSL for specification of processes with protocols
-- Types: Protocol monad: `Protocol a r` describes a computation which behaves
-- according the specification `a` before finally returning the value r.
-- Specification: can describe reading/writing atomic types, composition, and
-- branches, and infinite loops.
data Atomic = String | Int | … -- can this be rather a constraint on, say, Serializable?
-- can we send/receive functions? (we really want to)
data Spec =
| Read Atomic
cannot execute command MAIL "noreply@domain", expected reply code 250, but received 550 5.7.1 Invalid credentials for relay [209.97.189.45]. The IP address you've 5.7.1 registered in your G Suite SMTP Relay service doesn't match domain of 5.7.1 the account this email is being sent from. If you are trying to relay 5.7.1 mail from a domain that isn't registered under your G Suite account 5.7.1 or has empty envelope-from, you must configure your mail server 5.7.1 either to use SMTP AUTH to identify the sending domain or to present 5.7.1 one of your domain names in the HELO or EHLO command. For more 5.7.1 information, please visit 5.7.1 https://support.google.com/a/answer/6140680#invalidcred g16sm147014edp.38 - gsmtp
➜ server git:(stack) ✗ stack solver
Using configuration file: stack.yaml
Using cabal packages:
- ./
Using resolver: lts-12.26
Warning: Installed version of cabal-install (2.4.1.0) is newer than stack has been tested with. If you run into difficulties, consider downgrading.
Using compiler: ghc-8.4.4
open import Relation.Binary.PropositionalEquality
open import Data.Nat
open import Data.Bool
open import Data.Sum
record Stream (A : Set) : Set where
coinductive
field
hd : A
open import Data.Nat
open import Data.Bool
mutual
data Stream (A : Set) : Set where
[]ˢ : Stream A
_∷ˢ_ : A → ∞Stream A → Stream A
record ∞Stream (A : Set) : Set where
coinductive
@useronym
useronym / test.agda
Last active November 27, 2018 17:13
open import Size
mutual
data Delay (A : Set) (i : Size) : Set where
now : A → Delay A i
later : ∞Delay A i → Delay A i
record ∞Delay (A : Set) (i : Size) : Set where
coinductive
field