#1369: Type error when compiling ST-monad-like code
---------------------------------+------------------------------------------
Reporter: [EMAIL PROTECTED] | 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_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs