File: SlidingDoClause.hs

package info (click to toggle)
haskell-ghc-exactprint 1.7.1.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,044 kB
  • sloc: haskell: 32,076; makefile: 7
file content (13 lines) | stat: -rw-r--r-- 465 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13


-- :bounds narrowing 35
bndCom tenv args =
  do { (bound,size) <- getBounds fail args
     ; let get (s,m,ref) = do { n <- readRef ref; return(s++" = "++show n++ m)}
     ; if bound == ""
          then do { xs <- mapM get boundRef; warnM [Dl xs "\n"]}
          else case find (\ (nm,info,ref) -> nm==bound) boundRef of
                Just (_,_,ref) -> writeRef ref size
                Nothing -> fail ("Unknown bound '"++bound++"'")
     ; return tenv
     }