Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update type for iphone

  • Loading branch information...
commit 402edeb9fb83a04386af7c23766e47c7825ec823 1 parent 0eea231
@nfjinjing authored
Showing with 64 additions and 1 deletion.
  1. +4 −0 Nemesis
  2. +60 −1 src/MusicPad/Type.hs
View
4 Nemesis
@@ -24,6 +24,10 @@ nemesis = do
desc "start console"
task "i" - sh "ghci -Iinclude/pc -isrc src/MusicPad/Driver/GLUT.hs"
+ desc "dump TH to slice.txt"
+ task "dump" - do
+ sh "ghci -isrc -Iinclude/pc -ddump-splices src/MusicPad/Driver/GLUT.hs 2> slice.txt"
+
desc "start console shell"
task "ic" - sh "ghci -Iinclude/pc -isrc src/MusicPad/Driver/Shell.hs"
View
61 src/MusicPad/Type.hs
@@ -1,4 +1,7 @@
{-# LANGUAGE TypeOperators, TypeSynonymInstances, TemplateHaskell, DeriveDataTypeable #-}
+{-# LANGUAGE CPP #-}
+
+#include "env.h"
module MusicPad.Type where
@@ -253,6 +256,8 @@ instance Default State where
, user_pref = def
}
+#ifndef __IPHONE__
+
mkLabels
[
''State
@@ -265,4 +270,58 @@ mkLabels
, ''Sample
, ''Track
, ''Song
- ]
+ ]
+
+#else
+
+__song = label song (\ b a -> a {song = b})
+__app_env = label app_env (\ b a -> a {app_env = b})
+__show_debug = label show_debug (\ b a -> a {show_debug = b})
+__last_show_time = label
+ last_show_time (\ b a -> a {last_show_time = b})
+__last_beat = label last_beat (\ b a -> a {last_beat = b})
+__loop_start_time = label
+ loop_start_time (\ b a -> a {loop_start_time = b})
+__sample_db = label sample_db (\ b a -> a {sample_db = b})
+__state_version = label
+ state_version (\ b a -> a {state_version = b})
+__next_state_version_data = label
+ next_state_version_data
+ (\ b a -> a {next_state_version_data = b})
+__user_pref = label user_pref (\ b a -> a {user_pref = b})
+__tracks = label tracks (\ b a -> a {tracks = b})
+__tempo = label tempo (\ b a -> a {tempo = b})
+__beats = label beats (\ b a -> a {beats = b})
+__current_track_index = label
+ current_track_index (\ b a -> a {current_track_index = b})
+__pad_width = label pad_width (\ b a -> a {pad_width = b})
+__pad_height = label pad_height (\ b a -> a {pad_height = b})
+__note_x = label note_x (\ b a -> a {note_x = b})
+__note_y = label note_y (\ b a -> a {note_y = b})
+__note_enabled = label note_enabled (\ b a -> a {note_enabled = b})
+__note_index_x = label note_index_x (\ b a -> a {note_index_x = b})
+__note_index_y = label note_index_y (\ b a -> a {note_index_y = b})
+__track_no = label track_no (\ b a -> a {track_no = b})
+__sample_id = label sample_id (\ b a -> a {sample_id = b})
+__sample_icon = label sample_icon (\ b a -> a {sample_icon = b})
+__sample_type = label sample_type (\ b a -> a {sample_type = b})
+__samples = label samples (\ b a -> a {samples = b})
+__sample_pitch = label sample_pitch (\ b a -> a {sample_pitch = b})
+__sample_path = label sample_path (\ b a -> a {sample_path = b})
+__track_sample_id = label
+ track_sample_id (\ b a -> a {track_sample_id = b})
+__scale = label scale (\ b a -> a {scale = b})
+__key = label key (\ b a -> a {key = b})
+__transpose = label transpose (\ b a -> a {transpose = b})
+__notes = label notes (\ b a -> a {notes = b})
+__song_hash = label song_hash (\ b a -> a {song_hash = b})
+__verses = label verses (\ b a -> a {verses = b})
+__current_verse_index = label
+ current_verse_index (\ b a -> a {current_verse_index = b})
+__solo = label solo (\ b a -> a {solo = b})
+__timestamp = label timestamp (\ b a -> a {timestamp = b})
+__author = label author (\ b a -> a {author = b})
+__title = label title (\ b a -> a {title = b})
+__song_version = label song_version (\ b a -> a {song_version = b})
+
+#endif
Please sign in to comment.
Something went wrong with that request. Please try again.