Permalink
Browse files

Split THBuild off into a separate package

  • Loading branch information...
1 parent fef47bb commit 03ef4b69ecd14031957f65eacdd63a95c33ececd @DanielSchuessler committed Mar 12, 2012
Showing with 35 additions and 251 deletions.
  1. +2 −2 ConcreteNormal/Identification.hs
  2. +10 −10 Data/AscTuples.hs
  3. +3 −3 Element.hs
  4. +11 −11 Numeric/AD/Vector.hs
  5. +1 −1 PreRenderable.hs
  6. +3 −0 README
  7. +1 −1 Simplicial/DeltaSet2.hs
  8. +0 −219 THBuild.hs
  9. +2 −2 THUtil.hs
  10. +1 −1 bin/retetrahedration.hs
  11. +1 −1 hstri.cabal
@@ -17,7 +17,7 @@ import Control.Arrow
import Data.Function
import StandardCoordinates.MatchingEquations
import Language.Haskell.TH
-import THBuild
+import Language.Haskell.TH.Build
import Control.Monad
import Data.SumType
import Simplicial.DeltaSet1
@@ -61,7 +61,7 @@ instance SubSumTy TNmAdjoinQuadDiags where
$(concatMapM (\((cls,meth),ty) ->
sequence [
instanceD' (cxt[]) (cls `appT'` ty)
- [valD' meth [| \x -> $(varE meth) x . unT |]]
+ [svalD meth [| \x -> $(varE meth) x . unT |]]
]
View
@@ -19,7 +19,7 @@ import PrettyUtil
import QuickCheckUtil
import ShortShow
import Simplicial.DeltaSet3
-import THBuild
+import Language.Haskell.TH.Build
import Test.QuickCheck
import TupleTH
import Util
@@ -87,10 +87,10 @@ $(flip concatMapM [2,3,4] (\i -> do
[''Show,''Eq,''Ord,''Typeable,''Fold.Foldable,''ShortShow,''Pretty]
, sigD unAsciName (forall_a (cxt[]) [t| $asciTy_a -> $tupTy_a |])
- , valD' unAsciName (getFieldE ctorName 1 0)
+ , svalD unAsciName (getFieldE ctorName 1 0)
, sigD smartCtorTotalName (forall_a (cxt[ord_a]) [t| $tupTy_a -> EitherC LErrorCall $asciTy_a |])
- , valD' smartCtorTotalName [|
+ , svalD smartCtorTotalName [|
\as -> let as' = $(sortTuple i) as
in
case $(findSuccessiveElementsSatisfying i) (>=) as' of
@@ -102,17 +102,17 @@ $(flip concatMapM [2,3,4] (\i -> do
|]
, sigD smartCtorName (forall_a (cxt[ord_a]) [t| $tupTy_a -> $asciTy_a |])
- , valD' smartCtorName [| $unEitherC $(lift (nameBase smartCtorName)) . $(varE smartCtorTotalName) |]
+ , svalD smartCtorName [| $unEitherC $(lift (nameBase smartCtorName)) . $(varE smartCtorTotalName) |]
, tySynInstD ''Element [asciTy_a] aTy
, instanceD (cxt[])
(''AsList `appT'` asciTy_a)
- [ valD' 'asList 'Fold.toList]
+ [ svalD 'asList 'Fold.toList]
, instanceD (cxt [])
(''AscTuple1 `appT'` asciTy)
- [ valD' 'mapAscTotal
+ [ svalD 'mapAscTotal
[| \f ->
$(varE smartCtorTotalName)
. $(mapTuple' i (varE 'f))
@@ -124,13 +124,13 @@ $(flip concatMapM [2,3,4] (\i -> do
(cxt [classP ''Ord [aTy]])
(''AscTuple `appT'` tupTy_a `appT` asciTy `appT` aTy)
- [valD' 'asc ((varE . mkName $ "asc"++show i))
+ [svalD 'asc ((varE . mkName $ "asc"++show i))
- ,valD' 'ascTotal smartCtorTotalName
+ ,svalD 'ascTotal smartCtorTotalName
- ,valD' 'unAsc unAsciName
+ ,svalD 'unAsc unAsciName
- ,valD' 'unsafeAsc (
+ ,svalD 'unsafeAsc (
[| \xs ->
let
View
@@ -9,7 +9,7 @@ import qualified Data.Vector.Unboxed as VU
import Data.Tuple.OneTuple
import Data.Vect.Double.Base
import Data.Vector.Unboxed(Unbox)
-import THBuild
+import Language.Haskell.TH.Build
import TupleTH
import Data.Sequence(Seq)
import qualified Data.DList as DL
@@ -67,10 +67,10 @@ $(let
sequence [
instanceD (cxt []) (''AsList `appT'` theTupleType aT)
- [ valD' (varP 'asList) (lam1E (tupP' xs) (listE' xs)) ]
+ [ svalD (varP 'asList) (lam1E (tupP' xs) (listE' xs)) ]
, instanceD (cxt []) (''Mapable `appT'` theTupleType aT `appT'` theTupleType bT)
- [ valD' (varP 'yamap) (mapTuple n) ]
+ [ svalD (varP 'yamap) (mapTuple n) ]
]
where
View
@@ -24,7 +24,7 @@ import Language.Haskell.TH
import MathUtil
import Prelude hiding((<=))
import PrettyUtil(Pretty)
-import THBuild
+import Language.Haskell.TH.Build
import THUtil
import TupleTH
import qualified Data.Foldable as Fold
@@ -51,20 +51,20 @@ $(liftM concat $ forM WANTED_DIMS (\n ->
, instanceD (cxt []) (''Applicative `appT'` thetype)
[
- valD' 'pure
+ svalD 'pure
("_x" \-> (ctorname `appE'` (tupE' (replicate n "_x"))))
- , valD' '(<*>)
+ , svalD '(<*>)
(conP' ctorname (tupP' (n_vars "f")) \->
conP' ctorname (tupP' (n_vars "x")) \->
appE' ctorname (tupE (zipWith appE' (n_vars "f") (n_vars "x"))))
]
- , valD' ("tup"++show n) (n_vars "x" \-> ctorname `appE'` (tupE' (n_vars "x")))
+ , svalD ("tup"++show n) (n_vars "x" \-> ctorname `appE'` (tupE' (n_vars "x")))
- , valD' ("untup"++show n) (getFieldE ctorname 1 0)
+ , svalD ("untup"++show n) (getFieldE ctorname 1 0)
- , valD' ("foldT"++show n)
+ , svalD ("foldT"++show n)
( "_k" \->
conP' ctorname (tupP' (n_vars "x")) \->
foldl appE' (expQ "_k") (n_vars "x"))
@@ -73,24 +73,24 @@ $(liftM concat $ forM WANTED_DIMS (\n ->
, instanceD
(cxt [classP' ''Num "a"])
(''AdditiveGroup `appT'` (thetype `appT'` "a"))
- [ valD' 'zeroV ('pure `appE'` integerL 0)
- , valD' '(^+^) ('liftA2 `appE'` '(+))
- , valD' 'negateV ('fmap `appE'` 'negate)
+ [ svalD 'zeroV ('pure `appE'` integerL 0)
+ , svalD '(^+^) ('liftA2 `appE'` '(+))
+ , svalD 'negateV ('fmap `appE'` 'negate)
]
, instanceD
(cxt [classP' ''Num "a"])
(''VectorSpace `appT'` (thetype `appT'` "a"))
[
tySynInstD' ''Scalar [thetype `appT'` "a"] "a"
- , valD' '(*^) ("p" \-> 'fmap `appE'` ("x" \-> '(*) `appE'` "p" `appE'` "x"))
+ , svalD '(*^) ("p" \-> 'fmap `appE'` ("x" \-> '(*) `appE'` "p" `appE'` "x"))
]
, instanceD
(cxt [classP' ''Num "a"])
(''InnerSpace `appT'` (thetype `appT'` "a"))
[
- valD' '(<.>) 'innerProductForFoldableApplicative
+ svalD '(<.>) 'innerProductForFoldableApplicative
]
View
@@ -90,7 +90,7 @@ import Tetrahedron.Vertex
import Util
import qualified Data.Map as M
import Data.Maybe
-import THBuild
+import Language.Haskell.TH.Build
import PrettyUtil hiding(pr)
import Text.Groom
import R3Immersions.Simplices
View
3 README
@@ -0,0 +1,3 @@
+3-Manifold triangulations
+
+The th-build dependency is available from https://github.com/DanielSchuessler/th-build .
View
@@ -55,7 +55,7 @@ import ShortShow
import MathUtil
import FileLocation
import Util
-import THBuild
+import Language.Haskell.TH.Build
import THUtil
import Data.Lens.Common
Oops, something went wrong.

0 comments on commit 03ef4b6

Please sign in to comment.