Commit be6795a3 authored by Kai-Oliver Prott's avatar Kai-Oliver Prott

Merge branch 'master' into SpanInfo

parents 48cd8de8 242037ad
......@@ -5,6 +5,7 @@ Version 1.0.2 (under development)
=============
* Fixed bug with wrong type of free variables in the intermediate language.
* Fixed bug with generated default implementations of nullary class methods.
Version 1.0.1
=============
......
......@@ -10,9 +10,13 @@
TODO
-}
{-# LANGUAGE CPP #-}
module Base.PrettyTypes where
#if __GLASGOW_HASKELL__ >= 804
import Prelude hiding ((<>))
#endif
import Data.Maybe (fromMaybe)
import qualified Data.Set as Set (Set, toAscList)
......
......@@ -26,6 +26,10 @@
{-# LANGUAGE CPP #-}
module Checks.ExportCheck (exportCheck, expandExports) where
#if __GLASGOW_HASKELL__ >= 804
import Prelude hiding ((<>))
#endif
#if __GLASGOW_HASKELL__ < 710
import Control.Applicative ((<$>))
#endif
......
......@@ -16,6 +16,10 @@
{-# LANGUAGE CPP #-}
module Checks.KindCheck (kindCheck) where
#if __GLASGOW_HASKELL__ >= 804
import Prelude hiding ((<>))
#endif
#if __GLASGOW_HASKELL__ < 710
import Control.Applicative ((<$>), (<*>))
#endif
......
......@@ -26,6 +26,10 @@
{-# LANGUAGE CPP #-}
module Checks.SyntaxCheck (syntaxCheck) where
#if __GLASGOW_HASKELL__ >= 804
import Prelude hiding ((<>))
#endif
#if __GLASGOW_HASKELL__ < 710
import Control.Applicative ((<$>), (<*>))
#endif
......
......@@ -36,6 +36,10 @@
{-# LANGUAGE CPP #-}
module Checks.TypeCheck (typeCheck) where
#if __GLASGOW_HASKELL__ >= 804
import Prelude hiding ((<>))
#endif
#if __GLASGOW_HASKELL__ < 710
import Control.Applicative ((<$>), (<*>))
#endif
......
......@@ -14,8 +14,13 @@
This module searches for potentially irregular code and generates
warning messages.
-}
{-# LANGUAGE CPP #-}
module Checks.WarnCheck (warnCheck) where
#if __GLASGOW_HASKELL__ >= 804
import Prelude hiding ((<>))
#endif
import Control.Monad
(filterM, foldM_, guard, liftM, liftM2, when, unless)
import Control.Monad.State.Strict (State, execState, gets, modify)
......
......@@ -16,10 +16,14 @@
information between Curry modules. This is used to create Makefile
dependencies and to update programs composed of multiple modules.
-}
{-# LANGUAGE CPP #-}
module CurryDeps
( Source (..), flatDeps, deps, flattenDeps, sourceDeps, moduleDeps ) where
#if __GLASGOW_HASKELL__ >= 804
import Prelude hiding ((<>))
#endif
import Control.Monad (foldM)
import Data.List (isSuffixOf, nub)
import qualified Data.Map as Map (Map, empty, insert, lookup, toList)
......
......@@ -45,7 +45,7 @@
exported at all in order to make the interface more stable against
changes which are private to the module.
-}
{-# LANGUAGE CPP #-}
module Env.TypeConstructor
( TypeInfo (..), tcKind, clsKind, varKind, clsMethods
, TCEnv, initTCEnv, bindTypeInfo, rebindTypeInfo
......@@ -53,6 +53,10 @@ module Env.TypeConstructor
, getOrigName, reverseLookupByOrigName
) where
#if __GLASGOW_HASKELL__ >= 804
import Prelude hiding ((<>))
#endif
import Curry.Base.Ident
import Curry.Base.Pretty (Pretty(..), blankLine)
......
......@@ -22,7 +22,7 @@
information. On import two values are considered equal if their original
names match.
-}
{-# LANGUAGE CPP #-}
module Env.Value
( ValueEnv, ValueInfo (..)
, bindGlobalInfo, bindFun, qualBindFun, rebindFun, unbindFun
......@@ -31,6 +31,10 @@ module Env.Value
, ValueType (..), bindLocalVars, bindLocalVar
) where
#if __GLASGOW_HASKELL__ >= 804
import Prelude hiding ((<>))
#endif
import Curry.Base.Ident
import Curry.Base.Pretty (Pretty(..))
......
......@@ -16,9 +16,13 @@
printer which, in turn, is based on Simon Marlow's pretty printer
for Haskell.
-}
{-# LANGUAGE CPP #-}
module IL.Pretty (ppModule) where
#if __GLASGOW_HASKELL__ >= 804
import Prelude hiding ((<>))
#endif
import Curry.Base.Ident
import Curry.Base.Pretty
import IL.Type
......
......@@ -22,8 +22,13 @@
Interface files are updated by the Curry builder when necessary,
see module "CurryBuilder".
-}
{-# LANGUAGE CPP #-}
module Interfaces (loadInterfaces) where
#if __GLASGOW_HASKELL__ >= 804
import Prelude hiding ((<>))
#endif
import Control.Monad (unless)
import qualified Control.Monad.State as S (StateT, execStateT, gets, modify)
import qualified Data.Map as M (insert, member)
......
......@@ -419,10 +419,12 @@ defaultClassMethodDecl :: QualIdent -> Ident -> DTM (Decl PredType)
defaultClassMethodDecl cls f = do
pty@(PredType _ ty) <- getClassMethodType cls f
augEnv <- getAugEnv
let pats = if isAugmented augEnv (qualifyLike cls f)
let augmented = isAugmented augEnv (qualifyLike cls f)
pats = if augmented
then [ConstructorPattern NoSpanInfo predUnitType qUnitId []]
else []
return $ funDecl NoSpanInfo pty f pats $ preludeError (instType ty) $
ty' = if augmented then arrowBase ty else ty
return $ funDecl NoSpanInfo pty f pats $ preludeError (instType ty') $
"No instance or default method for class operation " ++ escName f
getClassMethodType :: QualIdent -> Ident -> DTM PredType
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment