我有一个几乎全新的django安装,当我尝试python manage.py runserver.It是给我这个错误:
配置不正确:无法加载WSGI应用程序'myproject.wsgi.application'; 导入模块时出错.
settings.py
WSGI_APPLICATION = 'myproject.wsgi.application'
Run Code Online (Sandbox Code Playgroud)
wsgi.py
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myproject.settings")
application = get_wsgi_application()
Run Code Online (Sandbox Code Playgroud) 我有以下二叉树的定义和一个获取最左边元素的函数,或者如果树是空树则返回 Nothing,但是它说x(with type a) 是无限类型,因为它返回Maybe a?
谢谢任何帮助,将不胜感激:)
\ndata Tree a = EmptyTree | Node a (Tree a) (Tree a) deriving (Show, Eq)\n\nleftistElement :: (Ord a) => Tree a -> Maybe a\nleftistElement EmptyTree = Nothing\nleftistElement (Node x left _) =\n if left == EmptyTree\n then x\n else leftistElement left\nRun Code Online (Sandbox Code Playgroud)\ntypes.hs:55:10: error:\n \xe2\x80\xa2 Occurs check: cannot construct the infinite type: a ~ Maybe a\n \xe2\x80\xa2 In the expression: x\n In the expression:\n if left …Run Code Online (Sandbox Code Playgroud)