Checks only applications, there are no lets or lambda abstractions :)
Control.Unification comes from unification-fd
package.
Unifier.Unifier
and Unifier.Restricted
can be copy-pasted from https://github.com/nponeccop/HNC/tree/master/Unifier
#!/bin/bash | |
set -ex -o pipefail | |
podman build . -t small-tar | |
podman rm small-tar || true | |
podman create --name small-tar small-tar /bin/dummycmd | |
podman cp small-tar:/rootfs.tar rootfs.tar | |
podman rm small-tar || true |
digraph Foo { | |
"MetaCPAN-Client" -> "LWP-Protocol-https"; | |
"LWP-Protocol-https" -> "Test-RequiresInternet"; | |
"LWP-Protocol-https" -> "libwww-perl"; | |
"libwww-perl" -> "Test-RequiresInternet"; | |
"libwww-perl" -> "Test-Fatal"; | |
"Test-Fatal" -> "Try-Tiny"; | |
"Try-Tiny" -> "CPAN-Meta-Check" [style=dotted]; | |
"CPAN-Meta-Check" -> "Test-Deep"; | |
"Try-Tiny" -> "Capture-Tiny" [style=dotted]; |
{-# LANGUAGE NoMonomorphismRestriction, Rank2Types #-} | |
import Control.Monad.Cont | |
type State s v = s -> (s, v) | |
set :: a -> State a () | |
set x = const (x, ()) | |
get :: State a a | |
get = \s -> (s, s) |
{-# LANGUAGE NoMonomorphismRestriction #-} | |
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE TypeFamilies #-} | |
import Data.Functor.Foldable | |
import Data.Maybe | |
import qualified Data.Map as M | |
listCata :: ListCata a b | |
listCata = cata | |
reduceBy :: Ord k => ListAlgebra t b -> (t -> k) -> [t] -> M.Map k b |
Checks only applications, there are no lets or lambda abstractions :)
Control.Unification comes from unification-fd
package.
Unifier.Unifier
and Unifier.Restricted
can be copy-pasted from https://github.com/nponeccop/HNC/tree/master/Unifier
{-# LANGUAGE LambdaCase #-} | |
import Unifier.Unifier | |
import Unifier.Restricted | |
import Control.Monad.Identity | |
import Control.Unification (freeVar, freshen, applyBindings) | |
import Control.Unification.IntVar | |
import Control.Monad.Trans | |
import qualified Data.Map as M | |
data Expression = Atom String | App Expression Expression |
{-# LANGUAGE NoMonomorphismRestriction, FlexibleContexts #-} | |
import Control.Unification (freeVar) | |
import Control.Unification.IntVar | |
import Control.Monad.Trans | |
import Control.Monad.Identity | |
import Unifier.Unifier | |
import Unifier.Restricted | |
t = UTerm . T | |
ar a b = UTerm $ TT [a, b] |
digraph smtp { | |
init -> A [label=greet]; | |
A -> done [label=ehlo]; | |
} |
license: gpl-3.0 |