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
(prefer-coding-system 'utf-8) | |
(setq default-buffer-file-coding-system 'utf-8-unix) | |
(setq menu-bar-mode nil) | |
(setq scroll-bar-mode nil) | |
(setq scroll-margin 22) | |
(setq show-paren-mode t) | |
(setq tool-bar-mode nil) | |
(setq tooltip-mode nil) | |
(setq undo-limit 800000) |
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
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
class Add a b where | |
type Ret a b :: * | |
add :: a -> b -> Ret a b | |
instance Add Int Double where | |
type Ret Int Double = Double | |
add a b = (fromIntegral a) + 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
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
class Add a b where | |
type Ret a b :: * | |
add :: a -> b -> Ret a b | |
instance Add Int Double where | |
type Ret Int Double = Double | |
add a b = (fromIntegral a) + 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
Error: Type mismatch: Expected `Bool`, found `Bool` | |
Cannot infer or coerce `Bool` to `Bool` | |
--> test.kvs:21:17 | |
21: (if (=i i 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
(extern malloc (-> UInt (Ptr UInt8))) | |
(extern read_int64 (-> RealWorld (Cons Int64 RealWorld))) | |
(extern print_int64 (-> (Cons Int64 RealWorld) (Cons Nil RealWorld))) | |
(extern print_float64 (-> (Cons Float64 RealWorld) (Cons Nil RealWorld))) | |
(extern eq-int64 (-> (Cons Int64 Int64) Bool)) | |
(extern lt-int64 (-> (Cons Int64 Int64) Bool)) | |
(extern gt-int64 (-> (Cons Int64 Int64) Bool)) | |
(extern mul-int64 (-> (Cons Int64 Int64) Int64)) | |
(extern div-int64 (-> (Cons Int64 Int64) Int64)) |
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
match *tree { | |
// Type application, e.g. `(Vec Int32)`; or type variable with constraints, | |
// e.g. `(: t Num)` | |
CST::SExpr(ref app, ref pos) if !app.is_empty() => match app[0] { | |
CST::Ident(":", _) if app.len() > 2 => { | |
let tv = self.parse_constraints_spec(&app[1..]); | |
let name = tv.explicit.unwrap(); | |
if tvars.contains_key(name) { | |
let first_pos = &tvars.get(name).unwrap().1; | |
pos.error("Type variable has already been defined in this scope"); |
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
<h1> hello </h1> | |
<marquee> world </marquee> |
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
#!/usr/bin/env python3 | |
import sys, os, socket, subprocess | |
from pathlib import Path | |
STATIONS = [ | |
("radio noden", "https://streamer.radio.co/sb562d9095/listen"), | |
("p1 - sr", "https://sverigesradio.se/topsy/direkt/132-hi-aac.m3u"), | |
("p2 - sr", "https://http-live.sr.se/p2musik-aac-320"), | |
("p3 - sr", "https://sverigesradio.se/topsy/direkt/164-hi-aac.m3u"), |