Permalink
Browse files

turn into a compiling cabal project

  • Loading branch information...
Mathnerd314 committed Sep 6, 2012
1 parent 0d08e7f commit 12acd115f41fb7d9a5acb94378b78dc61a517798
View
@@ -0,0 +1,20 @@
+-- Initial HTE.cabal generated by cabal init. For further
+-- documentation, see http://haskell.org/cabal/users-guide/
+
+name: HTE
+version: 0.1.0.0
+-- synopsis:
+-- description:
+license: BSD3
+license-file: LICENSE
+author: Shayan Najd
+maintainer: shayan@chalmers.se
+-- copyright:
+category: Language
+build-type: Simple
+cabal-version: >=1.8
+
+library
+ exposed-modules: Language.Haskell.THIH.Syntax, Language.Haskell.THIH.SurfaceTypes, Language.Haskell.THIH.Demotion, Language.Haskell.THIH.BasicTypes, Language.Haskell.THIH.Typecheck.Types, Language.Haskell.THIH.Typecheck.TypeConversions, Language.Haskell.THIH.Typecheck.Typecheck, Language.Haskell.THIH.Typecheck.Load, Language.Haskell.THIH.Typecheck.KindInference, Language.Haskell.THIH.Typecheck.Internals, Language.Haskell.THIH.Typecheck.Demotion, Language.Haskell.THIH.Typecheck.Combinators, Language.Haskell.THIH.Typecheck.Library.Prelude, Language.Haskell.THIH.Typecheck.Library.Monad, Language.Haskell.THIH.Typecheck.Library.Maybe, Language.Haskell.THIH.Typecheck.Library.List, Language.Haskell.Exts.ToTHIH, Language.Haskell.Exts.FromTHIH, Language.Haskell.Exts.Desugaring
+ -- other-modules:
+ build-depends: base ==4.5.*, transformers ==0.3.*, haskell-src-exts, mtl
File renamed without changes.
@@ -1,26 +0,0 @@
-Copyright (c) 2012, Shayan Najd
-All rights reserved.
-------------------------
-Refer to the file THIH-License for the license of the parts that are originaly developed by Mark P. Jones.
------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * Neither the name of the Shayan Najd nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL Shayan Najd BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,26 +0,0 @@
-Copyright (c) 2012, Shayan Najd
-All rights reserved.
-------------------------
-Refer to the file THIH-License for the license of the parts that are originaly developed by Mark P. Jones.
------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * Neither the name of the Shayan Najd nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL Shayan Najd BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -7,7 +7,7 @@ import Language.Haskell.THIH.Typecheck.Types
import Language.Haskell.THIH.BasicTypes
-moduleList = ModuleH [] [] listFunctions
+moduleList = ModuleH [] [] [] listFunctions
listFunctions
= ["findIndices" :>:
@@ -7,7 +7,7 @@ import Language.Haskell.THIH.Typecheck.Types
import Language.Haskell.THIH.BasicTypes
-moduleMaybe = ModuleH [] [] maybeFunctions
+moduleMaybe = ModuleH [] [] [] maybeFunctions
maybeFunctions
= ["isJust" :>:
@@ -1,12 +1,14 @@
-module Language.Haskell.THIH.Library.Typecheck.Monad where
+module Language.Haskell.THIH.Typecheck.Library.Monad where
--import Language.Haskell.THIH.Combinators
import Language.Haskell.THIH.Typecheck.Library.Prelude
-import Language.Haskell.THIH.Syntax
+import Language.Haskell.THIH.Syntax
import Language.Haskell.THIH.Typecheck.Types
+import Language.Haskell.THIH.Typecheck.Internals(mkInst)
import Language.Haskell.THIH.BasicTypes
+import Control.Applicative
-moduleMonad = ModuleH [] monadTypeClasses monadFunctions
+moduleMonad = ModuleH [] monadTypeClasses monadInstances monadFunctions
monadTypeClasses = [tcMonadPlus]
@@ -79,7 +81,7 @@ monadFunctions
tcMonadPlus = TypeClass [IsIn cMonad [atype]] cMonadPlus asig
- [mzeroMfun,mplusMfun] instsMonadPlus
+ [mzeroMfun,mplusMfun]
cMonadPlus = "MonadPlus"
mzeroMfun = "mzero" :>: (Forall [Kfun Star Star, Star]
([isIn1 cMonadPlus (TGen 0)] :=>
@@ -90,6 +92,8 @@ mplusMfun = "mplus" :>: (Forall [Kfun Star Star, Star]
TAp (TGen 0) (TGen 1) -->
TAp (TGen 0) (TGen 1))))
+monadInstances = Instance <$> instsMonadPlus
+
instsMonadPlus
- = [Inst [] ([] :=> isIn1 cMonadPlus tMaybe),
- Inst [] ([] :=> isIn1 cMonadPlus tList)]
+ = [mkInst [] ([] :=> isIn1 cMonadPlus tMaybe),
+ mkInst [] ([] :=> isIn1 cMonadPlus tList)]
@@ -1,35 +0,0 @@
-`Typing Haskell in Haskell' is Copyright (c) Mark P Jones
-and the Oregon Graduate Institute of Science and Technology,
-1999-2000, All rights reserved, and is distributed as
-free software under the following license.
-
-Redistribution and use in source and binary forms, with or
-without modification, are permitted provided that the following
-conditions are met:
-
-- Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-- Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following
-disclaimer in the documentation and/or other materials provided
-with the distribution.
-
-- Neither name of the copyright holders nor the names of its
-contributors may be used to endorse or promote products derived
-from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND THE
-CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR THE
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
View
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
File renamed without changes.

0 comments on commit 12acd11

Please sign in to comment.