Skip to content

Instantly share code, notes, and snippets.

View hhefesto's full-sized avatar

Daniel Herrera Rendón hhefesto

View GitHub Profile
Main> pureREval (check zero (completeLam (varN 0)))
SetEnv !!!!!!!!!!!!!!!!:(Pair (Defer (SetEnv (Pair (SetEnv (Pair Abort (SetEnv (SetEnv (Pair (Defer (Pair (PLeft (PRight Env)) (Pair (PLeft Env) (PRight (PRight Env))))) (Pair (PRight Env) (PLeft Env))))))) (PRight Env)))) (Pair (Pair (Defer (PLeft Env)) Zero) Zero),Right (Pair (Defer (SetEnv (Pair (SetEnv (Pair Abort (SetEnv (SetEnv (Pair (Defer (Pair (PLeft (PRight Env)) (Pair (PLeft Env) (PRight (PRight Env))))) (Pair (PRight Env) (PLeft Env))))))) (PRight Env)))) (Pair (Pair (Defer (PLeft Env)) Zero) Zero)))
SetEnv !!!!!!!!!!!!!!!!:(Pair (Defer (Pair (PLeft (PRight Env)) (Pair (PLeft Env) (PRight (PRight Env))))) (Pair (PRight Env) (PLeft Env)),Right (Pair (Defer (Pair (PLeft (PRight Env)) (Pair (PLeft Env) (PRight (PRight Env))))) (Pair Zero Zero)))
SetEnv !!!!!!!!!!!!!!!!:(SetEnv (Pair (Defer (Pair (PLeft (PRight Env)) (Pair (PLeft Env) (PRight (PRight Env))))) (Pair (PRight Env) (PLeft Env))),Right (Pair Zero (Pair Zero Zero)))
SetEnv !!!!!!!!!!!!!!!!
@hhefesto
hhefesto / ParserFormated.hs
Last active June 18, 2020 00:45
Prettified using stylish-haskell
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module SIL.Parser where
Test suite logged to:
/home/hhefesto/src/stand-in-language/dist-newstyle/build/x86_64-linux/ghc-8.6.5/sil-0.1.0.0/t/sil-parser-test/test/sil-0.1.0.0-sil-parser-test.log
1 of 1 test suites (1 of 1 test cases) passed.
type checker
main = \x -> {x,0} FAILED [1]
main = \x -> {x,0} FAILED [2]
main = succ 0
main = succ 0
main = or 0 FAILED [3]
╭─hhefesto@Olimpo ~/src/purescript-nix-example ‹master*›
╰─$ git reset --hard HEAD 1 ↵
HEAD is now at 854868d fix bundle command
╭─hhefesto@Olimpo ~/src/purescript-nix-example ‹master›
╰─$ nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/d3f928282c0989232e425d26f0302120a8c7218b.tar.gz --pure shell.nix
[nix-shell:~/src/purescript-nix-example]$ yarn clean
yarn run v1.19.2
$ rm -rf output .spago dist/* node_modules output .cache .spago2nix
Done in 0.42s.
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
let
nixpkgs-19-03 = import (fetchTarball https://releases.nixos.org/nixos/19.03/nixos-19.03.173684.c8db7a8a16e/nixexprs.tar.xz) { };
in {
imports =
[ # Include the results of the hardware scan.
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE InstanceSigs #-}
module Exercise where
newtype Parser a = P ([Char] -> [(a, [Char])])
deriving (Functor)
[nix-shell:~/src/stand-in-language]$ cabal new-repl
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: sil-0.1.0.0 (user goal)
[__1] trying: vector-0.12.0.1 (dependency of sil)
[__2] trying: primitive-0.6.3.0 (dependency of vector)
[__3] next goal: base (dependency of sil)
[__3] rejecting: base-4.12.0.0/installed-4.1... (conflict: primitive =>
base>=4.5 && <4.12)
[__3] rejecting: base-4.11.1.0 (constraint from non-upgradeable package
[nix-shell:~/src/stand-in-language]$ cabal repl
Build profile: -w ghc-8.6.5 -O1
In order, the following will be built (use -v for more details):
- sil-0.1.0.0 (lib) (ephemeral targets)
Preprocessing library for sil-0.1.0.0..
GHCi, version 8.6.5: http://www.haskell.org/ghc/ :? for help
<command line>: user specified .o/.so/.DLL could not be loaded (libgc.so: cannot open shared object file: No such file or directory)
Whilst trying to load: (dynamic) gc
Additional directories searched: (none)
cabal: repl failed for sil-0.1.0.0.
@hhefesto
hhefesto / cabal2nix.nix
Created May 31, 2019 23:16
My current try to compile with cabal
{ mkDerivation, aeson, base, blaze-builder, blaze-html, bytestring
, case-insensitive, classy-prelude, classy-prelude-conduit
, classy-prelude-yesod, conduit, containers, data-default
, data-lens-light, directory, esqueleto, extra, fast-logger
, file-embed, foreign-store, hashable, hjsmin, hpack, hspec
, http-client-tls, http-conduit, lucid, lucid-from-html, mime-mail
, monad-control, monad-logger, mtl, persistent
, persistent-postgresql, persistent-template, postgresql, safe
, shakespeare, stdenv, template-haskell, text, time
, unordered-containers, vector, wai, wai-extra, wai-logger, warp
@hhefesto
hhefesto / 1error_message.txt
Last active May 22, 2019 19:26
Deployment error: cannot coerce a set to a string, at: ExecStart = "${laurus-nobilis}/.stack-work/install/x86_64-linux-nix/lts-12.26/8.4.4/bin/laurus-nobilis";
$ nixops deploy -d laurus-nobilis-gce
trace: `lib.nixpkgsVersion` is deprecated, use `lib.version` instead!
bootstrap> creating GCE image 'n-a6cb126b7cc011e99d230a0027000000-bootstrap'...
laurus...> creating GCE disk of 20 GiB from image 'n-a6cb126b7cc011e99d230a0027000000-bootstrap'...
laurus...> creating GCE machine 'n-a6cb126b7cc011e99d230a0027000000-laurus'...
laurus...> got public IP: 35.240.125.176
laurus...> attaching GCE disk 'n-a6cb126b7cc011e99d230a0027000000-laurus-root'...
ssh: connect to host 35.240.125.176 port 22: Connection refused
laurus...> could not connect to ‘root@35.240.125.176’, retrying in 1 seconds...
laurus...> setting state version to 18.09