@@ -10,6 +10,8 @@ import Data.List
10import qualified Data.Binary as B
10import qualified Data.Binary as B
11import Data.Binary hiding (get, put)
11import Data.Binary hiding (get, put)
13+import Util.Pretty hiding (Str)
13{- The language has:
15{- The language has:
14 * Full dependent types
16 * Full dependent types
15 * A hierarchy of universes, with cumulativity: Set : Set1, Set1 : Set2, ...
17 * A hierarchy of universes, with cumulativity: Set : Set1, Set1 : Set2, ...
@@ -197,6 +199,15 @@ data Raw = Var Name
197 | RForce Raw
199 | RForce Raw
198 | RConstant Const
200 | RConstant Const
199 deriving (Show, Eq)
201 deriving (Show, Eq)
203+instance Sized Raw where
205+ size (RBind name bind right) = 1 + size bind + size right
206+ size (RApp left right) = 1 + size left + size right
208+ size (RForce raw) = 1 + size raw
209+ size (RConstant const) = size const
201deriving instance Binary Raw
212deriving instance Binary Raw