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 crate gl; // 0.6.1 | |
extern crate glfw; // 0.9.1 | |
use std::os::raw::c_void; | |
pub use glfw::Context; | |
fn main() { | |
let mut glfw = glfw::init(glfw::FAIL_ON_ERRORS).unwrap(); |
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
fn test() -> Foo { | |
let i = 3; | |
Foo { | |
updater: Box::new(|| println!("{}", &i)) | |
} | |
} |
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
fn main() -> () { | |
let var0: std::collections::hash::map::HashMap; // a | |
let var1: &'static std::collections::hash::map::HashMap; // __arg0 | |
let mut tmp0: core::iter::Map, [closure@:4:41: 4:55]>; | |
let mut tmp1: collections::vec::IntoIter; | |
let mut tmp2: collections::vec::Vec; | |
let mut tmp3: (); | |
let mut tmp4: Box<[i32]>; | |
let mut tmp5: Box<[i32; 4]>; | |
let mut tmp6: Box<[i32; 4]>; |
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
struct Buffer<C: HasBuffer, T> { | |
repr: C::ABuffer | |
, phantom: PhantomData<T> | |
} |
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 crate glfw; | |
use glfw::{Action, Context, Key}; | |
fn main() { | |
let mut glfw = glfw::init(glfw::FAIL_ON_ERRORS).unwrap(); | |
// Create a windowed mode window and its OpenGL context | |
let (mut window, events) = glfw.create_window(300, 300, "Hello this is window", glfw::WindowMode::Windowed) | |
.expect("Failed to create GLFW window."); |
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
struct Widget { | |
virtual ~Widget(); | |
virtual void foo() = 0; | |
}; | |
class Label : public Widget { | |
std::string _value; | |
public: |
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 FlexibleContexts, ScopedTypeVariables, TupleSections #-} | |
module Test where | |
import Control.Arrow | |
import qualified Control.Monad as M ( unless ) | |
import Control.Wire | |
import Control.Wire.Unsafe.Event | |
import Data.Foldable ( foldMap, for_ ) | |
import Data.Function ( fix ) |
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 AST where | |
data E a | |
= Var a | |
| Add (E a) (E a) | |
| Sub (E a) (E a) | |
| Mul (E a) (E a) | |
| Div (E a) (E a) | |
deriving (Eq,Show) |
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
Graphics/Rendering/Sky/GL/Framebuffer.hs:95:3: Warning: | |
Pattern match(es) are overlapped | |
In a case alternative: | |
gl_FRAMEBUFFER_UNDEFINED -> ... | |
gl_FRAMEBUFFER_INCOMPLETE_ATTACHMENT -> ... | |
gl_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT -> ... | |
gl_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER -> ... | |
... |
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 Test where | |
import Control.Monad.Trans | |
import Control.Monad.Trans.Reader | |
data Env = Env { | |
-- |A very important value. | |
important :: Int | |
-- |A less important value. | |
, notImportant :: Float |