[GHC] #1369: Type error when compiling ST-monad-like code
GHC
trac at galois.com
Tue May 22 16:23:15 EDT 2007
#1369: Type error when compiling ST-monad-like code
---------------------------------+------------------------------------------
Reporter: koen at chalmers.se | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 6.6.1
Severity: normal | Resolution: wontfix
Keywords: | Difficulty: Unknown
Os: Unknown | Testcase:
Architecture: Unknown |
---------------------------------+------------------------------------------
Comment (by Isaac Dupree):
Interesting, that makes two of three be newtype-unwrapping. It'd be ugly
to have an exception for that, though.... In this case could
{{{
where
MkM m = mm
}}}
easily become
{{{
where
m = unM mm
}}}
for the usual newtype-unwrapping "un" function
{{{
unM :: M s a -> (STRef s Int -> ST s a)
unM (MkM m) = m
}}}
? It compiles for me with that technique, unM either as a function or a
record selector works fine.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1369>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
-------------- next part --------------
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs at haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
More information about the Glasgow-haskell-bugs
mailing list