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
Multiple chapters: | |
int::to_str(num) --->> std::int::to_str(num) | |
Chapter 6: | |
int::range(1, 101) --->> std::int::range(1, 101) | |
Chapter 7: | |
use core::pipes::{stream, Port, Chan} --->> Nothing? | |
extern mod std; --->> extern mod extra; | |
use std::comm::DuplexStream; --->> use extra:comm::DuplexStream; |
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
import IdrisScript | |
Schema : Type | |
Schema = List (String, Type) | |
-- First class record | |
data Record : Schema -> Type where | |
RecNil : Record Nil | |
RecCons : (key:String) -> (val : t) -> Record lst -> Record ((key, t)::lst) |