Changes between Version 11 and Version 12 of Commentary/Compiler/TypeType
- Timestamp:
- 10/18/11 01:19:05 (19 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Commentary/Compiler/TypeType
v11 v12 47 47 splitFunTy_maybe other = Nothing 48 48 }}} 49 Notice the first line, which uses the view, and recurses when the view 'fires'. Since `coreView` is non-recursive, GHC will inline it, and the optimiser will ultimately produce somethi gnlike:49 Notice the first line, which uses the view, and recurses when the view 'fires'. Since `coreView` is non-recursive, GHC will inline it, and the optimiser will ultimately produce something like: 50 50 {{{ 51 51 splitFunTy_maybe :: Type -> Maybe (Type,Type) 52 splitFunTy_maybe (PredTy p) = splitFunTy_maybe (predTypeRep p)52 splitFunTy_maybe (PredTy p) = splitFunTy_maybe (predTypeRep p) 53 53 splitFunTy_maybe (NoteTy _ ty) = splitFunTy_maybe ty 54 54 splitFunTy_maybe (FunTy t1 t2) = Just (t1,t2)
