To install in Vivaldi, open the Extensions page, enable developer mode, and then drag & drop the file into the page.
This file contains hidden or 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
Rolands-MBP:idris-test rkuhn$ idris test.idr -o test | |
idris: Can't happen pickAlt - impossible case found | |
CallStack (from HasCallStack): | |
error, called at src/IRTS/LangOpts.hs:248:25 in idris-1.3.2-9ZZwhBKx1W3Fg3FkIorcnE:IRTS.LangOpts |
This file contains hidden or 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 Main | |
%default total | |
data Event = Started Int | Stopped Int | Completed Int | |
data State = Idle | Running | Finished | |
data S : s -> Type | |
data Activity : Type -> Event -> Type -> Type where |
This file contains hidden or 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
struct X<T>(T); | |
impl<T> X<T> { | |
pub fn new(t: T) -> Self { | |
Self(t) | |
} | |
pub fn map<U>(&self, mut f: impl FnMut(&T) -> U + 'static) -> X<U> { | |
X(f(&self.0)) | |
} | |
} |
This file contains hidden or 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
pub fn merge_sort<T: Ord>(a: &mut [T]) { | |
let len = a.len(); | |
if len < 2 { return } | |
let mid = len / 2; | |
{ | |
let (left, right) = a.split_at_mut(mid); | |
merge_sort(left); | |
merge_sort(right); | |
} |
This file contains hidden or 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
use super::{ | |
handler::{self, IntoHandler, Request, Response}, | |
RequestReceived, StreamingResponseConfig, | |
}; | |
use crate::Codec; | |
use futures::channel::mpsc; | |
use libp2p::{ | |
core::connection::ConnectionId, | |
swarm::{NetworkBehaviour, NetworkBehaviourAction, NotifyHandler, PollParameters}, | |
PeerId, |
OlderNewer