Skip to content

Instantly share code, notes, and snippets.

View expipiplus1's full-sized avatar
🙀
Trying to `fix error` in Haskell

Ellie Hermaszewska expipiplus1

🙀
Trying to `fix error` in Haskell
View GitHub Profile
{-# LANGUAGE RecordWildCards #-}
module Joystick (
JoystickState(..),
joystickSource,
selectJoystick,
withJoystickOr,
getJoystickNames,
) where
{-# LANGUAGE DeriveDataTypeable #-}
module Main where
import Data.Data
import System.Console.CmdArgs
data FooBar = Foo { fooArg :: Int}
| Bar { barArg :: Int}
deriving (Show, Data, Typeable)
clang
-L../gcc-arm-none-eabi/lib/gcc/arm-none-eabi/4.9.3/
-L../gcc-arm-none-eabi/arm-none-eabi/lib
-lc
-Wall
-Wno-multichar
-Os
-mcpu=cortex-m4
-mthumb
-m32
# clang++ (for build/src/main.cpp.o)
# clang++ (for build/src/Uplink.cpp.o)
# clang++ (for build/src/Joystick.cpp.o)
# clang++ (for build/src/FlightData.cpp.o)
# clang++ (for build/src/Assert.cpp.o)
# clang++ (for build/i2c_t3/i2c_t3.cpp.o)
# clang++ (for build/cores/teensy3/yield.cpp.o)
# clang (for build/cores/teensy3/usb_serial.c.o)
# clang (for build/cores/teensy3/usb_seremu.c.o)
# clang (for build/cores/teensy3/usb_rawhid.c.o)
$ cabal install
Some add-source dependencies have been modified. They will be reinstalled...
Resolving dependencies...
In order, the following will be installed:
sdl2-2.0.0 (reinstall)
jpl-0.1.0.0 (new package)
Warning: Note that reinstalls are always dangerous. Continuing anyway...
Notice: installing into a sandbox located at
C:\Users\jophish\projects\a-crummiest-nth-loop\jpl\.cabal-sandbox
Configuring sdl2-2.0.0...
$ cabal exec -- ghc --make Main.hs -fforce-recomp
[1 of 4] Compiling Uplink ( Uplink.hs, Uplink.o )
[2 of 4] Compiling FlightData ( FlightData.hs, FlightData.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
[3 of 4] Compiling Joystick ( Joystick.hs, Joystick.o )
[4 of 4] Compiling Main ( Main.hs, Main.o )
Linking Main.exe ...
* = song I've yet to buy
Happy
Happy to be Unhappy - Captain Tractor
* Wake up Boo - Boo Radleys
Here Comes the Sun - The Beatles
Good Day Sunshine - The Beatles
* Walking On Sunshine - Katrina and the Waves
Good Vibrations - Beach Boys
Wouldn't it be nice - Beach Boys
/* lighting fragment shader (not quite phong)
* http://www.lighthouse3d.com/opengl/glsl/index.php/index.php?ogldir1
* James Stanley 2011
*/
#version 120
uniform sampler2D texture;
void main() {
template <std::string literal, std::string name>
std::unique_ptr< LiteralTerminal< literal, name > > LiteralTerminal::Parse( std::string::const_iterator& stream_begin, std::string::const_iterator stream_end )
{
if( ( stream_end - stream_begin ) < literal.size() )
{
if( std::equal( literal.begin(), literal.end(), stream_begin ) )
{
stream_begin += literal.size();
return std::unique_ptr< LiteralTerminal< literal, name > >( new LiteralTerminal< literal, name > );
}