Skip to content

Commit e9bd168

Browse files
committed
made a ghcjs buildable version
Signed-off-by: buckie <[email protected]>
1 parent 41baf2c commit e9bd168

File tree

9 files changed

+23
-266
lines changed

9 files changed

+23
-266
lines changed

lens/Control/Lens.hs

Lines changed: 0 additions & 156 deletions
This file was deleted.

src/Data/Thyme/Calendar/Internal.hs

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
{-# LANGUAGE ViewPatterns #-}
1414
{-# OPTIONS_HADDOCK hide #-}
1515

16-
1716
#if HLINT
1817
#include "cabal_macros.h"
1918
#endif
@@ -206,11 +205,6 @@ data YearMonthDay = YearMonthDay
206205
, ymdDay :: {-# UNPACK #-}!DayOfMonth
207206
} deriving (Eq, Ord, Data, Typeable, Generic, Show)
208207

209-
makeLensesFor [("ymdYear","_ymdYear"),("ymdMonth","_ymdMonth"),("ymdDay","_ymdDay")] ''YearMonthDay
210-
{-# INLINE _ymdYear #-}
211-
{-# INLINE _ymdMonth #-}
212-
{-# INLINE _ymdDay #-}
213-
214208
instance Hashable YearMonthDay
215209
instance NFData YearMonthDay
216210

@@ -231,10 +225,6 @@ data OrdinalDate = OrdinalDate
231225
, odDay :: {-# UNPACK #-}!DayOfYear
232226
} deriving (Eq, Ord, Data, Typeable, Generic, Show)
233227

234-
makeLensesFor [("odYear","_odYear"),("odDay","_odDay")] ''OrdinalDate
235-
{-# INLINE _odYear #-}
236-
{-# INLINE _odDay #-}
237-
238228
instance Hashable OrdinalDate
239229
instance NFData OrdinalDate
240230

@@ -372,10 +362,6 @@ data MonthDay = MonthDay
372362
, mdDay :: {-# UNPACK #-}!DayOfMonth
373363
} deriving (Eq, Ord, Data, Typeable, Generic, Show)
374364

375-
makeLensesFor [("mdMonth","_mdMonth"),("mdDay","_mdDay")] ''MonthDay
376-
{-# INLINE _mdMonth #-}
377-
{-# INLINE _mdDay #-}
378-
379365
instance Hashable MonthDay
380366
instance NFData MonthDay
381367

@@ -517,11 +503,6 @@ data WeekDate = WeekDate
517503
-- ^ /1 = Monday/ … /7 = Sunday/.
518504
} deriving (Eq, Ord, Data, Typeable, Generic, Show)
519505

520-
makeLensesFor [("wdYear","_wdYear"),("wdWeek","_wdWeek"),("wdDay","_wdDay")] ''WeekDate
521-
{-# INLINE _wdYear #-}
522-
{-# INLINE _wdWeek #-}
523-
{-# INLINE _wdDay #-}
524-
525506
instance Hashable WeekDate
526507
instance NFData WeekDate
527508

@@ -608,11 +589,6 @@ data SundayWeek = SundayWeek
608589
-- ^ /0 = Sunday/.
609590
} deriving (Eq, Ord, Data, Typeable, Generic, Show)
610591

611-
makeLensesFor [("swYear","_swYear"),("swWeek","_swWeek"),("swDay","_swDay")] ''SundayWeek
612-
{-# INLINE _swYear #-}
613-
{-# INLINE _swWeek #-}
614-
{-# INLINE _swDay #-}
615-
616592
instance Hashable SundayWeek
617593
instance NFData SundayWeek
618594

@@ -675,11 +651,6 @@ data MondayWeek = MondayWeek
675651
-- ^ /7 = Sunday/.
676652
} deriving (Eq, Ord, Data, Typeable, Generic, Show)
677653

678-
makeLensesFor [("mwYear","_mwYear"),("mwWeek","_mwWeek"),("mwDay","_mwDay")] ''MondayWeek
679-
{-# INLINE _mwYear #-}
680-
{-# INLINE _mwWeek #-}
681-
{-# INLINE _mwDay #-}
682-
683654
instance Hashable MondayWeek
684655
instance NFData MondayWeek
685656

@@ -753,3 +724,15 @@ derivingUnbox "SundayWeek" [t| SundayWeek -> Int |]
753724
derivingUnbox "MondayWeek" [t| MondayWeek -> Int |]
754725
[| \ MondayWeek {..} -> shiftL mwYear 9 .|. shiftL mwWeek 3 .|. mwDay |]
755726
[| \ n -> MondayWeek (shiftR n 9) (shiftR n 3 .&. 0x3f) (n .&. 0x7) |]
727+
728+
makeLensesFor [("ymdYear","_ymdYear"),("ymdMonth","_ymdMonth"),("ymdDay","_ymdDay")] ''YearMonthDay
729+
730+
makeLensesFor [("odYear","_odYear"),("odDay","_odDay")] ''OrdinalDate
731+
732+
makeLensesFor [("mdMonth","_mdMonth"),("mdDay","_mdDay")] ''MonthDay
733+
734+
makeLensesFor [("wdYear","_wdYear"),("wdWeek","_wdWeek"),("wdDay","_wdDay")] ''WeekDate
735+
736+
makeLensesFor [("swYear","_swYear"),("swWeek","_swWeek"),("swDay","_swDay")] ''SundayWeek
737+
738+
makeLensesFor [("mwYear","_mwYear"),("mwWeek","_mwWeek"),("mwDay","_mwDay")] ''MondayWeek

src/Data/Thyme/Calendar/WeekdayOfMonth.hs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,6 @@ data WeekdayOfMonth = WeekdayOfMonth
5353
-- ^ Day of week. /1 = Monday, 7 = Sunday/, like ISO 8601 'WeekDate'.
5454
} deriving (Eq, Ord, Data, Typeable, Generic, Show)
5555

56-
makeLensesFor [("womYear","_womYear"),("womMonth","_womMonth"),("womNth","_womNth"),("womDayOfWeek","_womDayOfWeek")] ''WeekdayOfMonth
57-
{-# INLINE _womYear #-}
58-
{-# INLINE _womMonth #-}
59-
{-# INLINE _womNth #-}
60-
{-# INLINE _womDayOfWeek #-}
61-
6256
derivingUnbox "WeekdayOfMonth"
6357
[t| WeekdayOfMonth -> Int |]
6458
[| \ WeekdayOfMonth {..} -> shiftL womYear 11 .|. shiftL womMonth 7
@@ -145,3 +139,5 @@ weekdayOfMonthValid (WeekdayOfMonth y m n wd) = (refDay .+^ s * offset)
145139
s = signum n
146140
wo = s * (wd - wd1)
147141
offset = (abs n - 1) * 7 + if wo < 0 then wo + 7 else wo
142+
143+
makeLensesFor [("womYear","_womYear"),("womMonth","_womMonth"),("womNth","_womNth"),("womDayOfWeek","_womDayOfWeek")] ''WeekdayOfMonth

src/Data/Thyme/Clock/Internal.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,11 +328,9 @@ data UTCView = UTCView
328328

329329
-- | 'Lens'' for the calendar 'Day' component of a 'UTCView'.
330330
makeLensesFor [("utcvDay","_utcvDay")] ''UTCView
331-
{-# INLINE _utcvDay #-}
332331

333332
-- | 'Lens'' for the time-of-day 'DiffTime' component of a 'UTCView'.
334333
makeLensesFor [("utcvDayTime","_utcvDayTime")] ''UTCView
335-
{-# INLINE _utcvDayTime #-}
336334

337335
derivingUnbox "UTCView" [t| UTCView -> (Day, DiffTime) |]
338336
[| \ UTCView {..} -> (utcvDay, utcvDayTime) |]

src/Data/Thyme/Format.hs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE TemplateHaskell #-}
12
{-# LANGUAGE CPP #-}
23
{-# LANGUAGE RankNTypes #-}
34
{-# LANGUAGE RecordWildCards #-}
@@ -499,20 +500,6 @@ makeLensesFor [ ("tpCentury","_tpCentury")
499500
, ("tpSecFrac","_tpSecFrac")
500501
, ("tpPOSIXTime","_tpPOSIXTime")
501502
, ("tpTimeZone","_tpTimeZone")] ''TimeParse
502-
{-# INLINE _tpCentury #-}
503-
{-# INLINE _tpCenturyYear #-}
504-
{-# INLINE _tpMonth #-}
505-
{-# INLINE _tpWeekOfYear #-}
506-
{-# INLINE _tpDayOfMonth #-}
507-
{-# INLINE _tpDayOfWeek #-}
508-
{-# INLINE _tpDayOfYear #-}
509-
{-# INLINE _tpFlags #-}
510-
{-# INLINE _tpHour #-}
511-
{-# INLINE _tpMinute #-}
512-
{-# INLINE _tpSecond #-}
513-
{-# INLINE _tpSecFrac #-}
514-
{-# INLINE _tpPOSIXTime #-}
515-
{-# INLINE _tpTimeZone #-}
516503

517504
{-# INLINE flag #-}
518505
flag :: TimeFlag -> Lens' TimeParse Bool

src/Data/Thyme/Format/Human.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE TemplateHaskell #-}
12
{-# LANGUAGE CPP #-}
23
{-# LANGUAGE NamedFieldPuns #-}
34
{-# LANGUAGE RecordWildCards #-}
@@ -36,7 +37,6 @@ data Unit = Unit
3637
, plural :: ShowS
3738
}
3839
makeLensesFor [("plural","_plural")] ''Unit
39-
{-# INLINE _plural #-}
4040

4141
-- | Display 'DiffTime' or 'NominalDiffTime' in a human-readable form.
4242
{-# INLINE humanTimeDiff #-}

src/Data/Thyme/LocalTime.hs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ data TimeZone = TimeZone
7373
} deriving (Eq, Ord, Data, Typeable, Generic)
7474

7575
makeLensesFor [("timeZoneMinutes","_timeZoneMinutes"),("timeZoneSummerOnly","_timeZoneSummerOnly"),("timeZoneName","_timeZoneName")] ''TimeZone
76-
{-# INLINE _timeZoneMinutes #-}
77-
{-# INLINE _timeZoneSummerOnly #-}
78-
{-# INLINE _timeZoneName #-}
7976

8077
instance Hashable TimeZone
8178
instance NFData TimeZone
@@ -187,9 +184,6 @@ data TimeOfDay = TimeOfDay
187184
} deriving (Eq, Ord, Data, Typeable, Generic)
188185

189186
makeLensesFor [("todHour","_todHour"),("todMin","_todMin"),("todSec","_todSec")] ''TimeOfDay
190-
{-# INLINE _todHour #-}
191-
{-# INLINE _todMin #-}
192-
{-# INLINE _todSec #-}
193187

194188
derivingUnbox "TimeOfDay" [t| TimeOfDay -> Int64 |]
195189
[| \ TimeOfDay {..} -> fromIntegral (todHour .|. shiftL todMin 8)
@@ -357,8 +351,6 @@ data LocalTime = LocalTime
357351
} deriving (Eq, Ord, Data, Typeable, Generic)
358352

359353
makeLensesFor [("localDay","_localDay"),("localTimeOfDay","_localTimeOfDay")] ''LocalTime
360-
{-# INLINE _localDay #-}
361-
{-# INLINE _localTimeOfDay #-}
362354

363355
derivingUnbox "LocalTime" [t| LocalTime -> (Day, TimeOfDay) |]
364356
[| \ LocalTime {..} -> (localDay, localTimeOfDay) |]
@@ -466,8 +458,6 @@ data ZonedTime = ZonedTime
466458
} deriving (Eq, Ord, Data, Typeable, Generic)
467459

468460
makeLensesFor [("zonedTimeToLocalTime","_zonedTimeToLocalTime"),("zonedTimeZone","_zonedTimeZone")] ''ZonedTime
469-
{-# INLINE _zonedTimeToLocalTime #-}
470-
{-# INLINE _zonedTimeZone #-}
471461

472462
instance Hashable ZonedTime
473463
instance NFData ZonedTime where

stack.yaml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
1-
resolver: lts-6.19
2-
3-
compiler: ghcjs-0.2.0.9006019_ghc-7.10.3
4-
compiler-check: match-exact
5-
allow-different-user: true
6-
7-
setup-info:
8-
ghcjs:
9-
source:
10-
ghcjs-0.2.0.9006019_ghc-7.10.3:
11-
url: http://ghcjs.tolysz.org/lts-6.19-9006019.tar.gz
12-
sha1: ef4264d5a93b269ee4ec8f9d5139da030331d65a
13-
141
flags: {}
152
extra-package-dbs: []
163
packages:
174
- '.'
185
extra-deps: []
6+
resolver: lts-5.11

0 commit comments

Comments
 (0)