Changeset 27 for sizechecking/branches/macs/Ops.hs
- Timestamp:
- May 5, 2014, 3:10:33 PM (12 years ago)
- File:
-
- 1 edited
-
sizechecking/branches/macs/Ops.hs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sizechecking/branches/macs/Ops.hs
r25 r27 7 7 import qualified Prelude 8 8 import Lambda 9 import Data.Lens.Light 9 10 10 11 -- infix operatorok, ezek beagyazasa picit necces, lasd a type family kesobb … … 32 33 fun _ = Q 33 34 34 instance LOps Swhere35 fun name _ = S (\ _ p -> Prelude.showsPrec pname)35 instance (SContext s) => LOps (S s) where 36 fun name _ = S (\ctx -> Prelude.showsPrec (getL prec ctx) name) 36 37 37 infixopl name p rec _ lhs rhs = S(\s p->38 let (s1, s2) = S.split2 s39 in Prelude.showParen ( p Prelude.> prec) $40 unS lhs s1 prec.38 infixopl name p _ lhs rhs = S(\ctx -> 39 let (s1, s2) = S.split2 (getL supply ctx) 40 in Prelude.showParen ((getL prec ctx) Prelude.> p) $ 41 unS lhs (setL supply s1 $ setL prec p ctx) . 41 42 Prelude.showString name . 42 unS rhs s2 (Prelude.succ prec)43 unS rhs (setL supply s2 $ setL prec (Prelude.succ p) ctx) 43 44 ) 44 infixop name prec _ lhs rhs = S(\s p -> 45 let (s1, s2) = S.split2 s 46 in Prelude.showParen (p Prelude.> prec) $ 47 unS lhs s1 (Prelude.succ prec) . 45 46 infixop name p _ lhs rhs = S(\ctx -> 47 let (s1, s2) = S.split2 (getL supply ctx) 48 in Prelude.showParen ((getL prec ctx) Prelude.> p) $ 49 unS lhs (setL supply s1 $ setL prec (Prelude.succ p) ctx) . 48 50 Prelude.showString name . 49 unS rhs s2 (Prelude.succ prec)51 unS rhs (setL supply s2 $ setL prec (Prelude.succ p) ctx) 50 52 ) 51 infixopr name prec _ lhs rhs = S(\s p -> 52 let (s1, s2) = S.split2 s 53 in Prelude.showParen (p Prelude.> prec) $ 54 unS lhs s1 (Prelude.succ prec) . 53 54 infixopr name p _ lhs rhs = S(\ctx -> 55 let (s1, s2) = S.split2 (getL supply ctx) 56 in Prelude.showParen ((getL prec ctx) Prelude.> p) $ 57 unS lhs (setL supply s1 $ setL prec (Prelude.succ p) ctx) . 55 58 Prelude.showString name . 56 unS rhs s2 prec59 unS rhs (setL supply s2 $ setL prec p ctx) 57 60 )
Note: See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/trac/tamop/chrome/site/your_project_logo.png)