\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{zed-csp}
\usepackage{amsthm}
\theoremstyle{definition}
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 Foo a = Bar a | |
| Baz (Foo a) (Foo a) | |
fooEq : DecEq a => a -> a -> Foo a -> Foo a -> Maybe (Foo a) | |
fooEq x y f g = case decEq x y of | |
Yes _ => Just (Baz f g) | |
No _ => Nothing | |
comb : DecEq a => Foo a -> Foo a -> Maybe (Foo a) | |
comb f@(Bar x ) g@(Bar y ) = fooEq x y f g -- < ok |
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 Foo : (x : List a) -> (y : List b) -> Type where | |
MkFoo : (bar: a -> b) -> Foo x y | |
bar : Foo {a} {b} x y -> a -> b | |
bar (MkFoo _) x' = ?rhs | |
{- | |
b : Type | |
a : Type | |
y : List b |
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
record Foo where | |
constructor MkFoo | |
from : Type | |
to : Type | |
bar : (a : Foo) -> (x : from a) -> (to a) | |
-- impl not important | |
baz : (a : Foo) -> (b : Foo) -> ((to b) = (from a)) => (x: from b) -> (to 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
module RandomDouble | |
import Data.Bits | |
import Data.Vect | |
import Effects | |
import Effect.StdIO | |
import Effect.Random | |
-- 2^53 as an Integer | |
twoTo53 : Integer |
Follow the recommended approach to prepare for the standard Linux install (below).
- Get Haskell Stack
- And [Haskell VS Code Extension)(https://marketplace.visualstudio.com/items?itemName=haskell.haskell)
curl -sSL https://get.haskellstack.org/ | sh