Skip to content

Commit

Permalink
use newtypes. make trustworthy
Browse files Browse the repository at this point in the history
  • Loading branch information
ekmett committed Mar 29, 2024
1 parent 865f853 commit 2374767
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Control/Placeholder.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP #-}

#if __GLASGOW_HASKELL__ >= 980
Expand Down Expand Up @@ -40,7 +41,7 @@ import GHC.Types (IO(IO))
import System.IO.Unsafe

-- | This is the 'Exception' thrown by 'todo', 'TODO' and 'todoIO'.
data TodoException = TodoExceptionWithLocation String
newtype TodoException = TodoExceptionWithLocation String
deriving (Typeable, Exception)

instance Show TodoException where
Expand All @@ -53,7 +54,7 @@ pattern TodoException <- TodoExceptionWithLocation _ where
TodoException = TodoExceptionWithLocation missingLocation

-- | This is the 'Exception' thrown by 'unimplmented', 'Unimplemented', and 'unimplementedIO'.
data UnimplementedException = UnimplementedExceptionWithLocation String
newtype UnimplementedException = UnimplementedExceptionWithLocation String
deriving (Typeable, Exception)

instance Show UnimplementedException where
Expand Down

0 comments on commit 2374767

Please sign in to comment.