Commit f5e98bb3 authored by chessai's avatar chessai Committed by Ben Gamari

make QSem and QSemN newtypes

Reviewers: RyanGlScott, ekmett, hvr, bgamari

Reviewed By: bgamari

Subscribers: rwbarton, carter

GHC Trac Issues: #15995

Differential Revision: https://phabricator.haskell.org/D5456
parent a0fb20ba
{-# LANGUAGE Safe #-}
{-# LANGUAGE BangPatterns #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
-----------------------------------------------------------------------------
-- |
......@@ -39,7 +38,7 @@ import Data.Maybe
--
-- is safe; it never loses a unit of the resource.
--
data QSem = QSem !(MVar (Int, [MVar ()], [MVar ()]))
newtype QSem = QSem (MVar (Int, [MVar ()], [MVar ()]))
-- The semaphore state (i, xs, ys):
--
......
{-# LANGUAGE Safe #-}
{-# LANGUAGE BangPatterns #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
-----------------------------------------------------------------------------
-- |
......@@ -41,7 +39,7 @@ import Data.Maybe
--
-- is safe; it never loses any of the resource.
--
data QSemN = QSemN !(MVar (Int, [(Int, MVar ())], [(Int, MVar ())]))
newtype QSemN = QSemN (MVar (Int, [(Int, MVar ())], [(Int, MVar ())]))
-- The semaphore state (i, xs, ys):
--
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment