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
with import <nixpkgs> { }; | |
let | |
latest = | |
import (fetchTarball https://github.com/nixos/nixpkgs-channels/archive/129f8d7e999b1a1f0fceaecadca30211e34d85a6.tar.gz) {}; | |
in | |
latest.haskellPackages.callPackage | |
./hpython.nix | |
{ | |
inherit (import ./papa.nix latest.haskellPackages); | |
tasty-hedgehog = import ../tasty-hedgehog { pkgs = latest; }; |
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
{ | |
packageoverrides = super: let self = super.pkgs; in | |
{ | |
haskellPackages = super.haskellPackages.override // { | |
overrides = self: super: { | |
tasty-hedgehog = self.callPackage /home/isaac/data61/tasty-hedgehog {}; | |
hedgehog = self.callPackage /home/isaac/.config/nixpkgs/hedgehog_0_5.nix {}; | |
}; | |
}; | |
}; |
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
class HasIdentifier s a | s -> a where | |
identifier :: Traversal' s (Identifier a) | |
instance HasIdentifier (Identifier a) a where | |
identifier f = f | |
instance HasIdentifier (Atom a) a where | |
identifier f (AtomIdentifier a ann) = AtomIdentifier <$> f a <*> pure ann | |
identifier _ a = pure a |
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
data Context = Regular | Async | |
data Expr :: Context -> * where | |
AwaitExpr :: Expr a -> Expr 'Async -- "await" <expr> | |
IfThenElse:: Expr a -> Expr a -> Expr a -> Expr a -- "if" <expr> "then" <expr> "else" <expr> | |
... | |
data Statement :: Context -> * where | |
ExprStatement :: Expr a -> Statement a | |
... |
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
######### | |
# What happens when you run this? | |
print(1 + 0001) | |
# Does this code run? If not- why? If so- what is the value of `result`? | |
class Foo: | |
foo = 0 |
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
data Context = Foo | Bar | |
data Thing :: Context -> * where | |
ThingFoo :: Int -> Thing 'Foo | |
ThingBar :: Bool -> Thing 'Bar | |
parseThingFoo :: CharParsing m => m (Thing 'Foo) | |
parseThingBar :: CharParsing m => m (Thing 'Bar) | |
-- This pattern seems like it would be unwieldy for more type variables or data-kind constructors |
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
[32 of 32] Compiling Language.Python.Parser.IR.Checker ( src/Language/Python/Parser/IR/Checker.hs, dist/build/Language/Python/Parser/IR/Checker.o ) | |
/nix/store/ysa06zk7hz9k4f9l03681vfnnbscp5l5-stdenv/setup: line 883: 10486 Segmentation fault ./Setup build | |
builder for ‘/nix/store/jkla2x6cwfgd5ldpx7zjlyyzm279x74q-hpython-0.0.1.0.drv’ failed with exit code 139 |
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
- Checked exceptions | |
- Linting | |
- Optimisation | |
- wat detection |
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
module NoDigit (NoDigit, _NoDigit, mkNoDigit, nodigit) where | |
newtype NoDigit = NoDigit { _getNoDigit :: String } | |
-- Succeeds if string does not contain a digit | |
mkNoDigit :: String -> Maybe NoDigit | |
mkNoDigit s | |
| any isDigit s = Nothing | |
| otherwise = Just $ NoDigit s | |
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
data Dict : Constraint -> Type where | |
data Name : Type -> Type where | |
data (=>) : Constraint -> Type -> Type where | |
data Expr : Type -> Type where | |
Var : Name a -> Expr a | |
Abs : (Name a -> Expr b) -> Expr (a -> b) | |
App : Expr (a -> b) -> Expr a -> Expr b | |
DictAbs : (Dict d -> Expr a) -> Expr (d => a) | |
DictApp : Expr (d => a) -> Dict d -> Expr a |