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

« back to all changes in this revision

Viewing changes to src/full/Agda/TypeChecking/RecordPatterns.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 #-}
 
1
{-# LANGUAGE CPP                        #-}
 
2
{-# LANGUAGE FlexibleInstances          #-}
3
3
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
4
 
{-# LANGUAGE PatternGuards #-}
5
 
{-# LANGUAGE TupleSections #-}
 
4
{-# LANGUAGE PatternGuards              #-}
 
5
{-# LANGUAGE TupleSections              #-}
6
6
 
7
7
-- | Code which replaces pattern matching on record constructors with
8
8
-- uses of projection functions.
44
44
import Agda.Utils.Permutation hiding (dropFrom)
45
45
import Agda.Utils.Size
46
46
 
47
 
#include "../undefined.h"
 
47
#include "undefined.h"
48
48
import Agda.Utils.Impossible
49
49
 
50
50
---------------------------------------------------------------------------
456
456
      -- order (i.e. the type signature for the variable which occurs
457
457
      -- first in the list of patterns comes first).
458
458
      flattenedOldTel =
459
 
        permute (invertP $ compactP $ clausePerm clause) $
 
459
        permute (invertP __IMPOSSIBLE__ $ compactP $ clausePerm clause) $
460
460
        zip (teleNames $ clauseTel clause) $
461
461
        flattenTel $
462
462
        clauseTel clause