~ubuntu-branches/ubuntu/wily/agda/wily-proposed

« back to all changes in this revision

Viewing changes to src/full/Agda/TypeChecking/ProjectionLike.hs

  • Committer: Package Import Robot
  • Author(s): Iain Lane, d5cf60f
  • Date: 2015-05-20 13:08:33 UTC
  • mfrom: (1.1.7)
  • Revision ID: package-import@ubuntu.com-20150520130833-cdcmhagwsouna237
Tags: 2.4.2.2-2
[d5cf60f] Depend on ${shlibs:Depends}, to get libc (& maybe other) deps

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
{-# LANGUAGE CPP #-}
2
 
{-# LANGUAGE FlexibleInstances #-}
3
 
{-# LANGUAGE PatternGuards #-}
 
1
{-# LANGUAGE CPP                  #-}
 
2
{-# LANGUAGE FlexibleInstances    #-}
 
3
{-# LANGUAGE PatternGuards        #-}
4
4
{-# LANGUAGE TypeSynonymInstances #-}
5
5
 
6
6
module Agda.TypeChecking.ProjectionLike where
27
27
import Agda.Utils.Size
28
28
import Agda.Utils.Permutation
29
29
 
30
 
#include "../undefined.h"
 
30
#include "undefined.h"
31
31
import Agda.Utils.Impossible
32
32
 
33
33
-- | View for a @Def f (Apply a : es)@ where @isProjection f@.
144
144
    ]
145
145
  case theDef defn of
146
146
    Function{funClauses = cls}
147
 
      | any (isNothing . getBody) cls ->
 
147
      | any (isNothing . getBodyUnraised) cls ->
148
148
        reportSLn "tc.proj.like" 30 $ "  projection-like functions cannot have absurd clauses"
149
149
    -- Constructor-headed functions can't be projection-like (at the moment). The reason
150
150
    -- for this is that invoking constructor-headedness will circumvent the inference of